Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Mar 2014 14:43:12 +0000
From:      Andrew Turner <andrew@fubar.geek.nz>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@FreeBSD.org>
Subject:   Re: Raspberry pi 11 Current panic
Message-ID:  <20140329144312.47a1372b@bender.Home>
In-Reply-To: <1396025476.81853.147.camel@revolution.hippie.lan>
References:  <CAKE2PDtG%2BdqkvASjUBLx2QNyVSpqU1-_oGCERDCmcAMHUYuzgg@mail.gmail.com> <CAJ-Vmona-PrELOyz1jEy9VoSyxQrYGrOybkQMQyXkDDrUtE1oA@mail.gmail.com> <CAKE2PDu9C==qZOZy0CT983gU=56OMVVqK-Mcj%2Bt4vbXRsm9G=g@mail.gmail.com> <1396025476.81853.147.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Mar 2014 10:51:16 -0600
Ian Lepore <ian@FreeBSD.org> wrote:

> On Tue, 2014-03-25 at 16:32 -0700, jungleboogie0 wrote:
> > And now to the group:
> > 
> > 
> > U-Boot 2013.01-rc1-svn18531 (Mar 24 2014 - 09:11:00)
> [...]
> > > >
> > > > I grabbed 11-CURRENT for raspberry pi here:
> > > > ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0
> > > >
> > > > Booted up my pi and I'm trying to run vnstat but this occurs:
> > > >
> > > > root@raspberry-pi:~ # vmstat
> > > >  procs      memory      page                    disks     faults
> > > cpu
> > > >  r b w     avm    fpanic: mutex process lock not owned at
> > > > /usr/src/sys/kern/kern_sig.c:2874
> > > > KDB: enter: panic
> > > > [ thread pid 747 tid 100063 ]
> > > > Stopped at      $d:     ldrb    r15, [r15, r15, ror r15]!
> > > >
> > > > So far I've been able to do this 3 times in a row by simply
> > > > logging in
> > > and
> > > > typing vmstat.
> > > >
> > > > Is this expected behavior?
> > > >
> 
> It took me a while to get around to this, but I can confirm that if
> you download the r263665 rpi image it behaves exactly as shown.  On
> the other hand, if I build r263665 locally and boot from it I have no
> problems, but that's with an NFS root filesystem so it's not quite an
> identical test.
> 
> The actual problem that causes the panic appears to be secondary
> fallout from an attempt to kill the process because of a floating
> point exception in supervisor mode.  I think we have another mail
> thread about a similar problem.  The kernel isn't supposed to be
> using floating point hardware, so I'll look into that.  I have a
> vague suspicion we may be accidentally using an instruction not
> supported by the vfp version in the rpi while saving/restoring the
> state or something like that.

The problem is we were not setting the floating point state correctly
and should have been emulating a few instructions in the kernel. I've
fixed this in r263913 and added a few other fixes for issues I found in
r263914.

There are 4 floating point instructions in the kernel, the are to save
and restore the floating point registers on context switch. In this
case the exception bit wasn't being cleared when it should have causing
a second exception when we try to perform the context switch.

Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140329144312.47a1372b>