Kernel Panic on DREAMPLUG: Alignment Fault 1

Ian Lepore ian at FreeBSD.org
Thu Aug 1 13:28:37 UTC 2013


On Thu, 2013-08-01 at 10:32 +0200, Mattia Rossi wrote:
> On 01/08/13 14:03, Ian Lepore wrote:
> > On Thu, 2013-08-01 at 04:29 +0200, Mattia Rossi wrote:
> >> On 01/08/13 00:31, Ian Lepore wrote:
> >>> On Wed, 2013-07-31 at 17:38 +0200, Mattia Rossi wrote:
> >>>> Hi all,
> >>>>
> >>>> this might be related to the WLI-UC-GNM Alignment Fault, but definitely
> >>>> has nothing to do with Wireless LAN.
> >>>> It rather seems that there's a problem with the USB subsystem.
> >>>>
> >>>> See dmesg an backtrace below.
> >>>> [snip]
> >>>>
> >>>> Currently trying to find where the issue could be.
> >>>>
> >>>> Mat
> >>> This is a strange abort, and if it's usb-related that's only accidental
> >>> I think.  It says it's an alignment fault, but the fault address reg has
> >>> a 32-bit aligned value in it.  That makes me think it must be an
> >>> ldrd/strd instruction (requires 64-bit alignment) that's faulting.
> >>>
> >>> Is this compiled with clang?  I think it emits such instructions and gcc
> >>> doesn't.  Except I don't think clang should use those instructions on
> >>> armv5, because of the alignment requirements.
> >>>
> >>> -- Ian
> >> Hi Ian,
> >>
> >> sorry, forgot to add that contrary to the WLI-UC-GNM problem, I'm still
> >> compiling using gcc on FreeBSD 9.1
> >>
> >> The abort is completely reproducible each time at the same place...
> >> I've tried to recompile the kernel a few times, also changing the root
> >> device, but it gets stuck there and aborts..
> >>
> >> I actually have no clue on what's going on here. Any hints on how to get
> >> more information about this?
> >>
> >> Cheers,
> >>
> >> Mat
> > Actually, it looks like you're using clang (I keep forgetting this comes
> > out in dmesg now):
> >
> >>> FreeBSD 10.0-CURRENT #9 r253846M: Wed Jul 31 17:24:31 CEST 2013
> >>> root at freebsd9.1-base:/usr/obj/arm.arm/usr/devel/dreamplug/sys/DREAMPLUG-100m
> >>> FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
> > Is the 'M' in r253846M anything significant?
> >
> > I haven't built for dreamplug in a long time (I haven't done much of
> > anything with computers for several months).  I'll get a build going and
> > see if I get the same kind of problems.
> >
> > -- Ian
> >
> Gee... I guess I'm using CLANG then...
> So, this messes a bit with my understanding of the relation of host and 
> guest...
> I always thought, that the host system decides which compiler gets used 
> for cross-compiling, and not the guest (which means the source tree)
> So If my default compiler is gcc on the host, everything should be 
> compiled with gcc.
> Given that I haven't changed anything of that, how comes that the kernel 
> is compiled using clang?
> Especially given that the clang version on the host will not be a very 
> up-to-date version?
> Or does clang get built during the make process, and then used as the 
> compiler?
> 
> Anyhow, I'll try to compile with gcc, and see what happens.

The host system's compiler (gcc in your case) is used to build the
selected compiler from src/, then that new compiler is used to build the
rest of src/ into a runnable system.  You can define WITHOUT_CLANG_IS_CC
and WITHOUT_EABI to use gcc, and you should probably add WITHOUT_CLANG
to avoid building it since it won't be used (and it takes forever to
build).

After rebuilding with clang/eabi I get exactly the same crash in the
same spot (even the same fault address).  I'll see if I can figure out
what the actual problem is.

-- Ian



More information about the freebsd-arm mailing list