Date: Sun, 17 Jun 2007 16:24:36 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-arm@freebsd.org Subject: Re: PPP Bus Error Message-ID: <20070617142435.GK5189@cicely12.cicely.de> In-Reply-To: <20070617.013852.387192063.imp@bsdimp.com> References: <286AD52D-FCA7-4814-97B7-2870B42488C6@uchicago.edu> <20070616.223540.-1975970124.imp@bsdimp.com> <20070617.013852.387192063.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 17, 2007 at 01:38:52AM -0600, M. Warner Losh wrote: > In message: <20070616.223540.-1975970124.imp@bsdimp.com> > "M. Warner Losh" <imp@bsdimp.com> writes: > : In message: <286AD52D-FCA7-4814-97B7-2870B42488C6@uchicago.edu> > : Nathan Whitehorn <nathanw@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@bwct.de info@bwct.de support@fizon.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070617142435.GK5189>