[PC-BSD Dev] PC-BSD 8.x WiFi kernel panic issues on Pentium-M

Rick rick at sloservers.com
Sat Jan 29 10:48:51 PST 2011


On 2011/01/26 9:31, Kris Moore wrote:
> On 01/26/2011 12:25, Rick wrote:
> > On 2011/01/26 8:53, Kris Moore wrote:
> >> On 01/24/2011 19:44, Rick wrote:
> >>> I'm having a wifi issue very similar to the one reported here:
> >>> http://lists.pcbsd.org/pipermail/testing/2011-January/004809.html
> >>
> >>> A short time after enabling wireless networking, the system panics and
> >>> reboots.  Each time rc.conf is wiped out.
> >>> I've tried i386 PC-BSD 8.1 and 8.2-RC2 and have this problem on two
> >>> similar laptops: Dell D610 and HP nc6000.  Both laptops are Pentium-M
> >>> class, 1GB RAM, mini-PCI.  I have tried an Intel NIC, Broadcom
> NIC, and
> >>> Ralink NIC with the same results.
> >>
> >>> Is this a known-issue?  Is there something I can do to help
> troubleshoot
> >>> this problem?
> >>
> >>> Thanks,
> >>> Rick
> >>
> >> This is a known problem in the 8.x series, for whatever reason
> >> restarting the wireless networking sometimes causes a kernel panic, and
> >> any stuff not synced to disk is lost. FWIW it seems to be fixed/better
> >> on 9.
> >>
> > _______________________________________________
> > Dev mailing list
> > Dev at lists.pcbsd.org
> > http://lists.pcbsd.org/mailman/listinfo/dev
>
>
>
> > I'll grab a 9-current snapshot and give it a try.  I haven't had this
> > problem with 8.x before, though, and it happens when turning wireless
> > networking on for the first time as well as restarting.
>
> > Also this happens every time on these two laptops--it's not an
> > intermittent problem.
>
> > Thanks,
> > Rick
>
> On my systems here, its kinda hit-n-miss.
>
> A way to confirm this problem is to try simply running "/etc/rc.d/netif
> restart" from the console. Do you see a kernel panic happen shortly
> after that?
>
> If so, what wifi chipset do you have? It may be worth reporting this to
> the FreeBSD PR system.
>
> http://www.freebsd.org/send-pr.html
>
>

I've done some more testing and research.  I've tried this with Atheros,
Ralink, Intel, and Broadcom chipsets and also three different
laptops.  running netif restart from a PC-BSD terminal window will cause
the panic.  Booting to single user mode, however, everything works
fine.  It turns out that the problem only happens when devd is also
running.  Devd in turn is calling pccard_ether.  So I tried booting into
single user mode, do mount -a, and call pccard_ether twice without
loading devd and sure enough, that causes the panic quite reliably.
After doing some more research, I came across a PR and some good
discussion about this topic:

http://forum.nginx.org/read.php?23,79546
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/144755    <-- Best info
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/137776

To summarize:
"Can you check if wpa_supplicant gets started twice after
"/etc/rc.d/netif restart"?

I have the feeling that this is a more or less known issue, a race
between devd (/etc/pccard_ether) and /etc/rc.d/netif. There is a small
window (a few ms) where this can happen and our net80211 isn't capable
of handling two running wpa_supplicants on the same interface. Which
leads to all kind of weird issues, .e.g. panics."

"Please give the attached patch a try. It does not prevent
wpa_supplicant from starting twice (for that you can define
ctrl_interface= in wpa_supplicant.conf), but should no longer panic."


Sure enough, I could see two copies of wpa_supplicant running on the
same interface just before my kernel panic, so I decided to try adding
the suggested option to wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant


This does prevent wpa_supplicant from being invoked twice and the kernel
panics have stopped.

I'd like to patch wificonfigwidgetbase.cpp to stream this out to the top
of wpa_supplicant.conf, but I'm not a QT developer and I'm having a hard
time getting netmanager to compile.  Is there a quick rundown anywhere
on building these sources?  I'm doing "qmake -spec freebsd-g++" and then
"make" but it seems that some ui_dialog*.h files are missing.

Regards,
Rick




More information about the Dev mailing list