PPP Bus Error

Bernd Walter ticso at cicely12.cicely.de
Sun Jun 17 14:24:53 UTC 2007


On Sun, Jun 17, 2007 at 01:38:52AM -0600, M. Warner Losh wrote:
> In message: <20070616.223540.-1975970124.imp at bsdimp.com>
>             "M. Warner Losh" <imp at bsdimp.com> writes:
> : In message: <286AD52D-FCA7-4814-97B7-2870B42488C6 at uchicago.edu>
> :             Nathan Whitehorn <nathanw at uchicago.edu> writes:
> : : I'm trying to establish a PPPoE connection and both ppp and mpd exit  
> : : with bus errors, and weird traces. Reading through the list, I see  
> : : someone experienced a similar error last year. Because they both  
> : : fail, I suspect the bug is in the netgraph ppp stuff (an alignment  
> : : bug, maybe?), but I was interested in knowing whether anyone else has  
> : : solved this problem already. Thanks,
> : 
> : I'd check all the alignment of structures.  I suspect that's what's
> : doing you in...  Not all the code in the FreeBSD kernel has been
> : carefully audited for proper structure alignment.
> 
> P.S.  Can you send me a traceback?  Since it is ppp, the userland
> program, the bus error is what you get when you do an unaligned
> access.

mpd3 has such errors, but I did not care much because I successfully use
mpd4.
I have the following in libmap.conf:
libpthread.so.2         libthr.so.2
libpthread.so           libthr.so
It was required, but it might just be because of not compiled in kernel
support.
At least the mpd4 problem was no bus error.

Userland ppp runs as well, but required the following patch to
not bus error:
==== //depot/projects/arm/src/usr.sbin/ppp/lcp.c#2 - /data/builder/arm-p4/src/usr.sbin/ppp/lcp.c ====
939c939,940
<       memcpy(&req, opt, sizeof req);
---
>       //memcpy(&req, opt, sizeof req);
>       bcopy(opt, &req, sizeof(req));

Not shure if this is still required with gcc4.2, since it was an
alignment problem with gcc supplied memcpy.
Therefor I did not commit this one.

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd at bwct.de           info at bwct.de            support at fizon.de


More information about the freebsd-arm mailing list