Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265385 - net-wireless/broadcom-sta driver crashes kernel
Summary: net-wireless/broadcom-sta driver crashes kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-07 22:04 UTC by denis
Modified: 2010-01-15 22:30 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ooop & emerge --info (wl_op_and_emergenfo.txt,75.30 KB, text/plain)
2009-04-07 22:05 UTC, denis
Details
lspci -vv (lspci_output.txt,20.68 KB, text/plain)
2009-05-07 20:09 UTC, denis
Details
/var/log/messages (zima_messages,865.83 KB, text/plain)
2009-05-07 22:02 UTC, denis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description denis 2009-04-07 22:04:42 UTC
On inserting (modeprobe) the wl.ko driver into kernel, kernel oops, then crashes. To get crash sure thing is to try rmmod wl.

Note, this I can confirm only using these versions of broadcom-sta & kernel:

sys-kernel/tuxonice-sources-2.6.29
net-wireless/broadcom-sta-5.10.79.10-r2

I did NOT see this behaviour on these versions of the packages:

sys-kernel/tuxonice-sources-2.6.28-r8
net-wireless/broadcom-sta-5.10.79.10-r1

In fact I did not catch any such crash with the above combination. I was however, not using it for sufficiently long time to say it never happens on those versions.

Reproducible: Always

Steps to Reproduce:
1. modprobe wl (get oop)
2. rmmod wl (get crash)


Actual Results:  
Most often first I get Oop on modprobe. The kernel crash comes on attempt to remove the module, rmmod wl.
This seems repeatable 99% of the time, but on rare occasions I seems get clean insert, and remove.

Expected Results:  
Clean insert & remove.

See attachment for Ooop message and emerge --info.

Also, on one occastion, after modprobe wl and getting Ooop, i was unable to rmmod wl even though lsmod did not show anything using it.

With wl inserted and Oop'ed, i also saw that running ifconfig generated another Ooop message everytime I ran it.
Comment 1 denis 2009-04-07 22:05:35 UTC
Created attachment 187645 [details]
Ooop & emerge --info
Comment 2 MATSUU Takuto (RETIRED) gentoo-dev 2009-04-08 18:00:33 UTC
p.masked =net-wireless/broadcom-sta-5.10.79.10-r2
Comment 3 Rick Harris 2009-04-20 23:26:37 UTC
(In reply to comment #2)
> p.masked =net-wireless/broadcom-sta-5.10.79.10-r2
> 

Except all versions of net-wireless/broadcom-sta-5.10.79.10* crash a 2.6.29 kernel.

Perhaps instead of masking this package completely we need to have the ebuild check the kernel version and die if /usr/src/linux is pointing to a kernel tree greater than 2.6.28.
Comment 4 MATSUU Takuto (RETIRED) gentoo-dev 2009-04-21 03:40:06 UTC
my Dell Inspiron mini9(bcm4315? bcm4310?) works fine with 2.6.29 + broadcom-sta.
I think that it is your chip related issue.
Comment 5 Rick Harris 2009-04-21 06:56:26 UTC
It does ?
You could be right, mine's a BCM4311 (rev 01) and 2.6.29 is guaranteed to crash hard with all  5.10.79.10 versions currently in portage.

Guess I'll hold off on the kernel upgrade until Broadcom either release a patch or a newer version :(
Quite frustrating really as I'm still stuck on 2.6.26 due to poor kernel releases
(hit with that fatal mmap + vesafb bug on 2.6.27 and 2.6.28).

*grumble* * grumble*
Comment 6 MATSUU Takuto (RETIRED) gentoo-dev 2009-05-03 04:39:06 UTC
broadcom-sta-5.10.91.9 in cvs.

Comment 7 Alexander Feldman 2009-05-05 20:04:28 UTC
5.10.79.10 was patched improperly for kernels >= 2.6.29. I have fixed the patch and it is availabe at "http://llama.gs/stuff/hybrid-portsrc-x86_32-v5_10_79_10.patch". Apply this to the original module sources and don't apply other patches. The new version (5.10.91.9) is not stable on my system.
Comment 8 MATSUU Takuto (RETIRED) gentoo-dev 2009-05-07 16:07:41 UTC
broadcom-sta-5.10.79.10-r4
broadcom-sta-5.10.91.9-r1
in cvs. please test.
Comment 9 denis 2009-05-07 19:41:27 UTC
(In reply to comment #8)
> broadcom-sta-5.10.79.10-r4
> broadcom-sta-5.10.91.9-r1
> in cvs. please test.
> 

(In reply to comment #8)
> broadcom-sta-5.10.79.10-r4
> broadcom-sta-5.10.91.9-r1
> in cvs. please test.
> 

I'm sorry I;ve just tested this and got kernel panic immediately. Unlikely there was anything logged before it ...
The last line was kernel panic ... fatal exception in interrupt.

Comment 10 denis 2009-05-07 20:08:18 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > broadcom-sta-5.10.79.10-r4
> > broadcom-sta-5.10.91.9-r1
> > in cvs. please test.
> > 
> 
> (In reply to comment #8)
> > broadcom-sta-5.10.79.10-r4
> > broadcom-sta-5.10.91.9-r1
> > in cvs. please test.
> > 
> 
> I'm sorry I;ve just tested this and got kernel panic immediately. Unlikely
> there was anything logged before it ...
> The last line was kernel panic ... fatal exception in interrupt.
> 

Differences in my environment from original report:

Kernel - 2.6.29-tuxonice-r1(In reply to comment #9)
> (In reply to comment #8)
> > broadcom-sta-5.10.79.10-r4
> > broadcom-sta-5.10.91.9-r1
> > in cvs. please test.
> > 
> 
> (In reply to comment #8)
> > broadcom-sta-5.10.79.10-r4
> > broadcom-sta-5.10.91.9-r1
> > in cvs. please test.
> > 
> 
> I'm sorry I;ve just tested this and got kernel panic immediately. Unlikely
> there was anything logged before it ...
> The last line was kernel panic ... fatal exception in interrupt.
> 

Just to underline differences in my setup to original report.
Current versions:
sys-kernel/tuxonice-sources-2.6.29-r1 
net-wireless/broadcom-sta-5.10.91.9-r1

previous:
sys-kernel/tuxonice-sources-2.6.29
net-wireless/broadcom-sta-5.10.79.10-r2.

In case you need to check my broadcom chip see lspci output in attachments.


Comment 11 denis 2009-05-07 20:09:49 UTC
Created attachment 190643 [details]
lspci -vv

Check the broadcom chip?
Comment 12 denis 2009-05-07 21:52:22 UTC
(In reply to comment #8)
> broadcom-sta-5.10.79.10-r4
> broadcom-sta-5.10.91.9-r1
> in cvs. please test.
> 

I've done some trials, and I've found 2 cases and a way to produce each:
1) generate Oops (which you can see in syslog); 2) kernel crash (not logged).

In both cases, blacklist autoloading of wl.ko on boot.

For  case (1):
Boot in. Then do 
for ((i=0; i<32; ++i)); do modprobe -v wl; rmmod -v wl; done
I actually get an Ooop within first 5 iterations. After such oop then you cannot insert/remove modules anymore (See attached messages log).

For case (2):
To make the kernel crash, and make it fast(er), this is a way that seems to 'work well' (i say may be 3/5 times ..)

Start your netbook. Turn off your wife either, before linux starts booting, or after boot up (on my s9 i use the lime wifi button). 
After booting, do (with wifi off)
modprobe -v wl
rmmod -v wl lib80211

Then, turn on the wifi. Repeat until crash
modprobe -v wl
rmmod -v wl lib80211

You should get kernel crash within first few times. You also may first encounter an Oops as in case (1) above, and you have to restart this process.
But I'm able to reproduce the kernel crash quite quickly.

Cheers.


Comment 13 denis 2009-05-07 22:02:35 UTC
Created attachment 190654 [details]
/var/log/messages

Start from bottom up perhaps ..
Comment 14 Cosmin Giradu 2009-05-08 08:24:32 UTC
Finally working (on 2.6.29).

I have had this problem with kernel 2.6.29 (reported in #248450). Not tested yet with 2.6.30.

Hardware: Dell Vostro 1510
Wireless: 06:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g [14e4:4315] (rev 01)
Kernel: 2.6.29-gentoo-r3 #1 SMP Wed May 6 15:26:26 EEST 2009 i686

Working ebuild version: net-wireless/broadcom-sta-5.10.91.9-r1
Comment 15 denis 2009-05-10 10:04:45 UTC
(In reply to comment #14)
> Finally working (on 2.6.29).
> 
> I have had this problem with kernel 2.6.29 (reported in #248450). Not tested
> yet with 2.6.30.
> 
> Hardware: Dell Vostro 1510
> Wireless: 06:00.0 Network controller [0280]: Broadcom Corporation BCM4312
> 802.11b/g [14e4:4315] (rev 01)
> Kernel: 2.6.29-gentoo-r3 #1 SMP Wed May 6 15:26:26 EEST 2009 i686
> 
> Working ebuild version: net-wireless/broadcom-sta-5.10.91.9-r1
> 

broadcom-sta-5.10.79.10-r4  Also DOES NOT work here. I get same stuff as for 5.10.91.9-r1.

Ndiswrapper & windows driver seems to work smooth on 2.6.28 or 2.6.29 kernel, so seems I have to stick with it for now.
Comment 16 rpansky 2009-07-29 16:29:20 UTC
broadcom-sta-5.10.91.9-r4 seems to be unstable with gentoo-sources-2.6.30-r4
(oops and sometimes panic on boot, i.e., when the module is to be inserted), while net-wireless/broadcom-sta-5.10.91.9-r1 works perfectly.
So, let us panic:
# modprobe wl
BUG: unable to handle kernel NULL pointer dereference at 00000010
eth1: Broadcom BCM4315 802.11 Wireless Controller 5.10.91.9
IP: [<c044ff4d>] _spin_lock_bh+0xd/0x20
Comment 17 Joseph Cheek 2009-07-30 20:55:25 UTC
I can confirm that broadcom-sta-5.10.91.9-r4 crashes my gentoo-sources-2.6.30-r4 kernel (kernel panic when starting /etc/init.d/modules at boot).  it's reproducible about 80% of the time.

i will check 5.10.91.9-r1 and report back.

> broadcom-sta-5.10.91.9-r4 seems to be unstable with gentoo-sources-2.6.30-r4
> (oops and sometimes panic on boot, i.e., when the module is to be inserted),
> while net-wireless/broadcom-sta-5.10.91.9-r1 works perfectly.
Comment 18 Cosmin Giradu 2009-07-31 06:42:46 UTC
(In reply to comment #17)
> I can confirm that broadcom-sta-5.10.91.9-r4 crashes my
> gentoo-sources-2.6.30-r4 kernel (kernel panic when starting /etc/init.d/modules
> at boot).  it's reproducible about 80% of the time.
> 
> i will check 5.10.91.9-r1 and report back.
> 
> > broadcom-sta-5.10.91.9-r4 seems to be unstable with gentoo-sources-2.6.30-r4
> > (oops and sometimes panic on boot, i.e., when the module is to be inserted),
> > while net-wireless/broadcom-sta-5.10.91.9-r1 works perfectly.
> 

I'm running net-wireless/broadcom-sta-5.10.91.9-r4 on top of 2.6.30-gentoo-r4 and I have no issues. You should check that you have the following enabled:

from: https://bugs.gentoo.org/show_bug.cgi?id=248450#c88
$ zgrep CONFIG_COMPAT_NET_DEV_OPS /proc/config.gz
CONFIG_COMPAT_NET_DEV_OPS=y

$ zgrep LIB80211 /proc/config.gz
CONFIG_LIB80211=y
CONFIG_LIB80211_CRYPT_WEP=m
CONFIG_LIB80211_CRYPT_CCMP=m
CONFIG_LIB80211_CRYPT_TKIP=m

a heads up: https://bugs.gentoo.org/show_bug.cgi?id=248450#c93

At least the TKIP module and CONFIG_LIB80211 ARE already enabled probably (there'a a config check in the ebuild), but it's always good to make sure :)

Good luck!
Comment 19 Joseph Cheek 2009-07-31 12:35:36 UTC
I can verify that broadcom-sta-5.10.91.9-r1 works fine for me.  here's my relevant config:

$ zgrep CONFIG_COMPAT_NET_DEV_OPS /proc/config.gz
CONFIG_COMPAT_NET_DEV_OPS=y
$ zgrep LIB80211 /proc/config.gz
CONFIG_LIB80211=m
# CONFIG_LIB80211_DEBUG is not set

looking at the ebuild, IEEE80211_CRYPT_TKIP is only required for kernels less than 2.6.29.  I'll rebuild with it and try it anyway.

(In reply to comment #18)
> I'm running net-wireless/broadcom-sta-5.10.91.9-r4 on top of 2.6.30-gentoo-r4
> and I have no issues. You should check that you have the following enabled:
> 
> from: https://bugs.gentoo.org/show_bug.cgi?id=248450#c88
> $ zgrep CONFIG_COMPAT_NET_DEV_OPS /proc/config.gz
> CONFIG_COMPAT_NET_DEV_OPS=y
> 
> $ zgrep LIB80211 /proc/config.gz
> CONFIG_LIB80211=y
> CONFIG_LIB80211_CRYPT_WEP=m
> CONFIG_LIB80211_CRYPT_CCMP=m
> CONFIG_LIB80211_CRYPT_TKIP=m
> 
> a heads up: https://bugs.gentoo.org/show_bug.cgi?id=248450#c93
> 
> At least the TKIP module and CONFIG_LIB80211 ARE already enabled probably
> (there'a a config check in the ebuild), but it's always good to make sure :)
> 
> Good luck!
Comment 20 Piotr 2009-08-05 14:26:45 UTC
I have BCM4322 and for me also on gentoo-sources-2.6.30-r4 broadcom-sta-5.10.91.9-r5 causes kernel panic while boot. broadcom-sta-5.10.91.9-r1 works fine so far.
Comment 21 Joseph Cheek 2009-08-05 14:35:12 UTC
still crashes with broadcom-sta-5.10.91.9-r4.  r1 works fine.

$ zgrep LIB80211 /proc/config.gz
CONFIG_LIB80211=y
CONFIG_LIB80211_CRYPT_WEP=y
CONFIG_LIB80211_CRYPT_CCMP=y
CONFIG_LIB80211_CRYPT_TKIP=y
# CONFIG_LIB80211_DEBUG is not set


> (In reply to comment #18)
> > I'm running net-wireless/broadcom-sta-5.10.91.9-r4 on top of 2.6.30-gentoo-r4
> > and I have no issues. You should check that you have the following enabled:
> > 
> > from: https://bugs.gentoo.org/show_bug.cgi?id=248450#c88
> > $ zgrep CONFIG_COMPAT_NET_DEV_OPS /proc/config.gz
> > CONFIG_COMPAT_NET_DEV_OPS=y
> > 
> > $ zgrep LIB80211 /proc/config.gz
> > CONFIG_LIB80211=y
> > CONFIG_LIB80211_CRYPT_WEP=m
> > CONFIG_LIB80211_CRYPT_CCMP=m
> > CONFIG_LIB80211_CRYPT_TKIP=m
> > 
> > a heads up: https://bugs.gentoo.org/show_bug.cgi?id=248450#c93
> > 
> > At least the TKIP module and CONFIG_LIB80211 ARE already enabled probably
> > (there'a a config check in the ebuild), but it's always good to make sure :)
> > 
> > Good luck!
> 

Comment 22 MATSUU Takuto (RETIRED) gentoo-dev 2010-01-15 22:30:24 UTC
Fixed. please reopen if you still have the issue.