2011-05-18 08:19:00

by Walter Goldens

[permalink] [raw]
Subject: rt2x00: rt2800usb causing kernel panic /compat-wireless/

A very peculiar bug.

With compat-wireless from 16.05 a nasty bug started to manifest itself. Right around association time, the rt2800usb causes kernel panic. The system freezes and the Caps Lock and Num Lock leds on the keyboard begin to flash.

Unfortunately there are no recoverable traces after the system failure to aid this bug report or to indicate its origin.

I believe it may somehow be related to Ubuntu's network-manager. If I turn off the network-manager service, I can go into monitor mode for example, but if network-manager is running and I plug my USB dongle, it starts to associate, a second or two later the system is in complete meltdown.

Nothing concrete, but a hunch is telling me this has something to do with the association mechanism of the rt2800usb. Compat-wireless from few days back exhibits no such foul play.

Walter


2011-05-18 14:41:23

by Larry Finger

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On 05/18/2011 08:04 AM, Mohammed Shafi wrote:
> On Wed, May 18, 2011 at 6:21 PM, Gertjan van Wingerde
> <[email protected]> wrote:
>> On 05/18/11 14:41, Mohammed Shafi wrote:
>>> On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
>>> <[email protected]> wrote:
>>>>>> A very peculiar bug.
>>>>>>
>>>>>> With compat-wireless from 16.05 a nasty bug started to
>>>>> manifest itself. Right around association time, the
>>>>> rt2800usb causes kernel panic. The system freezes and the
>>>>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>>>>
>>>>> also ath9k, iwlagn.
>>>>>
>>>>>>
>>>>>> Unfortunately there are no recoverable traces after
>>>>> the system failure to aid this bug report or to indicate its
>>>>> origin.
>>>>>>
>>>>>> I believe it may somehow be related to Ubuntu's
>>>>> network-manager. If I turn off the network-manager service,
>>>>> I can go into monitor mode for example, but if
>>>>> network-manager is running and I plug my USB dongle, it
>>>>> starts to associate, a second or two later the system is in
>>>>> complete meltdown.
>>>>>
>>>>> same thing, monitor mode worked perfectly fine.
>>>>>
>>>>>>
>>>>>> Nothing concrete, but a hunch is telling me this has
>>>>> something to do with the association mechanism of the
>>>>> rt2800usb. Compat-wireless from few days back exhibits no
>>>>> such foul play.
>>>>>
>>>>> yes just right at the association complete freeze.
>>>>>
>>>>
>>>> That's strange. I wonder what's the connection with this bug and network-manager. Because when I manually tried to associate, dmesg reported the association attempt timed out.
>>>
>>> no even when we use iw dev connect command we can see the panic.
>>
>> Yeah, I've seen this freeze as well using one of the later compat-wireless packages using just iw and wpa_supplicant to bring up the card. This is on all sorts of rt2x00 supported devices.
>>
>> However, I don't believe this to be an rt2x00-specific bug, as exactly the same rt2x00 sources inside a compat-wireless-2.6.39rc7 package do not produce the freeze.
>>
>>> some expert suspected that there is a chance of kfree_rcu in
>>> compat-wireless may have caused the problem
>>>
>>
>> That's where my suspicion is as well, but I didn't have the time to further investigate. Since my focus was on rt2x00 I used the compat-wireless-2.6.39rc7 package to test my patches. I only did a quick check, and the kfree_rcu compatibility fix that was done in compat-wireless did seem to match the kfree_rcu code is present in linux-next, but maybe there is an odd side-effect.
>
> I could not exactly remember this panic came just after kfree_rcu backported..

This problem also occurs with rtl8192se from compat-wireless. When it was
reported to me, a photo of the console log was included (attached). The crash is
a NULL pointer in rcu_do_batch.clone.19 (I think - the photo quality is minimal.).

Larry




Attachments:
2011-05-18 09.51.03.jpg (528.35 kB)

2011-05-18 11:56:16

by Walter Goldens

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

> > A very peculiar bug.
> >
> > With compat-wireless from 16.05 a nasty bug started to
> manifest itself. Right around association time, the
> rt2800usb causes kernel panic. The system freezes and the
> Caps Lock and Num Lock leds on the keyboard begin to flash.
>
> also ath9k, iwlagn.
>
> >
> > Unfortunately there are no recoverable traces after
> the system failure to aid this bug report or to indicate its
> origin.
> >
> > I believe it may somehow be related to Ubuntu's
> network-manager. If I turn off the network-manager service,
> I can go into monitor mode for example, but if
> network-manager is running and I plug my USB dongle, it
> starts to associate, a second or two later the system is in
> complete meltdown.
>
> same thing, monitor mode worked perfectly fine.
>
> >
> > Nothing concrete, but a hunch is telling me this has
> something to do with the association mechanism of the
> rt2800usb. Compat-wireless from few days back exhibits no
> such foul play.
>
> yes just right at the association complete freeze.
>

That's strange. I wonder what's the connection with this bug and network-manager. Because when I manually tried to associate, dmesg reported the association attempt timed out.

Walter

2011-05-18 14:46:43

by Mohammed Shafi

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On Wed, May 18, 2011 at 8:11 PM, Larry Finger <[email protected]> wrote:
> On 05/18/2011 08:04 AM, Mohammed Shafi wrote:
>>
>> On Wed, May 18, 2011 at 6:21 PM, Gertjan van Wingerde
>> <[email protected]> ?wrote:
>>>
>>> On 05/18/11 14:41, Mohammed Shafi wrote:
>>>>
>>>> On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
>>>> <[email protected]> ?wrote:
>>>>>>>
>>>>>>> A very peculiar bug.
>>>>>>>
>>>>>>> With compat-wireless from 16.05 a nasty bug started to
>>>>>>
>>>>>> manifest itself. Right around association time, the
>>>>>> rt2800usb causes kernel panic. The system freezes and the
>>>>>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>>>>>
>>>>>> also ath9k, iwlagn.
>>>>>>
>>>>>>>
>>>>>>> Unfortunately there are no recoverable traces after
>>>>>>
>>>>>> the system failure to aid this bug report or to indicate its
>>>>>> origin.
>>>>>>>
>>>>>>> I believe it may somehow be related to Ubuntu's
>>>>>>
>>>>>> network-manager. If I turn off the network-manager service,
>>>>>> I can go into monitor mode for example, but if
>>>>>> network-manager is running and I plug my USB dongle, it
>>>>>> starts to associate, a second or two later the system is in
>>>>>> complete meltdown.
>>>>>>
>>>>>> same thing, monitor mode worked perfectly fine.
>>>>>>
>>>>>>>
>>>>>>> Nothing concrete, but a hunch is telling me this has
>>>>>>
>>>>>> something to do with the association mechanism of the
>>>>>> rt2800usb. Compat-wireless from few days back exhibits no
>>>>>> such foul play.
>>>>>>
>>>>>> yes just right at the association complete freeze.
>>>>>>
>>>>>
>>>>> That's strange. I wonder what's the connection with this bug and
>>>>> network-manager. Because when I manually tried to associate, dmesg reported
>>>>> the association attempt timed out.
>>>>
>>>> no even when we use iw dev connect command we can see the panic.
>>>
>>> Yeah, I've seen this freeze as well using one of the later
>>> compat-wireless packages using just iw and wpa_supplicant to bring up the
>>> card. This is on all sorts of rt2x00 supported devices.
>>>
>>> However, I don't believe this to be an rt2x00-specific bug, as exactly
>>> the same rt2x00 sources inside a compat-wireless-2.6.39rc7 package do not
>>> produce the freeze.
>>>
>>>> some expert suspected that there is a chance of kfree_rcu in
>>>> compat-wireless may have caused the problem
>>>>
>>>
>>> That's where my suspicion is as well, but I didn't have the time to
>>> further investigate. Since my focus was on rt2x00 I used the
>>> compat-wireless-2.6.39rc7 package to test my patches. I only did a quick
>>> check, and the kfree_rcu compatibility fix that was done in compat-wireless
>>> did seem to match the kfree_rcu code is present in linux-next, but maybe
>>> there is an odd side-effect.
>>
>> I could not exactly remember this panic came just after kfree_rcu
>> backported..
>
> This problem also occurs with rtl8192se from compat-wireless. When it was
> reported to me, a photo of the console log was included (attached). The
> crash is a NULL pointer in rcu_do_batch.clone.19 (I think - the photo
> quality is minimal.).

thanks!, same type of call trace which I had also obtained, hopefully there in
http://pastebin.com/CZrSZrme
http://pastebin.com/gwZJGDG4



>
> Larry
>
>
>
>



--
shafi

2011-05-18 12:41:48

by Mohammed Shafi

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
<[email protected]> wrote:
>> > A very peculiar bug.
>> >
>> > With compat-wireless from 16.05 a nasty bug started to
>> manifest itself. Right around association time, the
>> rt2800usb causes kernel panic. The system freezes and the
>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>
>> also ath9k, iwlagn.
>>
>> >
>> > Unfortunately there are no recoverable traces after
>> the system failure to aid this bug report or to indicate its
>> origin.
>> >
>> > I believe it may somehow be related to Ubuntu's
>> network-manager. If I turn off the network-manager service,
>> I can go into monitor mode for example, but if
>> network-manager is running and I plug my USB dongle, it
>> starts to associate, a second or two later the system is in
>> complete meltdown.
>>
>> same thing, monitor mode worked perfectly fine.
>>
>> >
>> > Nothing concrete, but a hunch is telling me this has
>> something to do with the association mechanism of the
>> rt2800usb. Compat-wireless from few days back exhibits no
>> such foul play.
>>
>> yes just right at the association complete freeze.
>>
>
> That's strange. I wonder what's the connection with this bug and network-manager. Because when I manually tried to associate, dmesg reported the association attempt timed out.

no even when we use iw dev connect command we can see the panic. some
expert suspected that there is a chance of kfree_rcu in
compat-wireless may have caused the problem

>
> Walter
>



--
shafi

2011-05-18 09:16:22

by Mohammed Shafi

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On Wed, May 18, 2011 at 1:48 PM, Walter Goldens
<[email protected]> wrote:
> A very peculiar bug.
>
> With compat-wireless from 16.05 a nasty bug started to manifest itself. Right around association time, the rt2800usb causes kernel panic. The system freezes and the Caps Lock and Num Lock leds on the keyboard begin to flash.

also ath9k, iwlagn.

>
> Unfortunately there are no recoverable traces after the system failure to aid this bug report or to indicate its origin.
>
> I believe it may somehow be related to Ubuntu's network-manager. If I turn off the network-manager service, I can go into monitor mode for example, but if network-manager is running and I plug my USB dongle, it starts to associate, a second or two later the system is in complete meltdown.

same thing, monitor mode worked perfectly fine.

>
> Nothing concrete, but a hunch is telling me this has something to do with the association mechanism of the rt2800usb. Compat-wireless from few days back exhibits no such foul play.

yes just right at the association complete freeze.

>
> Walter
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>



--
shafi

2011-05-18 15:45:21

by Mohammed Shafi

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

just a quick update, once again I blindly used this patches which
seems to solve the problem,
agg-rx.c still uses the call_rcu thing, so I thought work.c ,
aggr-tx.c can make use of call_rcu .
thanks to the guy who mailed this patch!

need to test more


On Wed, May 18, 2011 at 8:16 PM, Mohammed Shafi
<[email protected]> wrote:
> On Wed, May 18, 2011 at 8:11 PM, Larry Finger <[email protected]> wrote:
>> On 05/18/2011 08:04 AM, Mohammed Shafi wrote:
>>>
>>> On Wed, May 18, 2011 at 6:21 PM, Gertjan van Wingerde
>>> <[email protected]> ?wrote:
>>>>
>>>> On 05/18/11 14:41, Mohammed Shafi wrote:
>>>>>
>>>>> On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
>>>>> <[email protected]> ?wrote:
>>>>>>>>
>>>>>>>> A very peculiar bug.
>>>>>>>>
>>>>>>>> With compat-wireless from 16.05 a nasty bug started to
>>>>>>>
>>>>>>> manifest itself. Right around association time, the
>>>>>>> rt2800usb causes kernel panic. The system freezes and the
>>>>>>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>>>>>>
>>>>>>> also ath9k, iwlagn.
>>>>>>>
>>>>>>>>
>>>>>>>> Unfortunately there are no recoverable traces after
>>>>>>>
>>>>>>> the system failure to aid this bug report or to indicate its
>>>>>>> origin.
>>>>>>>>
>>>>>>>> I believe it may somehow be related to Ubuntu's
>>>>>>>
>>>>>>> network-manager. If I turn off the network-manager service,
>>>>>>> I can go into monitor mode for example, but if
>>>>>>> network-manager is running and I plug my USB dongle, it
>>>>>>> starts to associate, a second or two later the system is in
>>>>>>> complete meltdown.
>>>>>>>
>>>>>>> same thing, monitor mode worked perfectly fine.
>>>>>>>
>>>>>>>>
>>>>>>>> Nothing concrete, but a hunch is telling me this has
>>>>>>>
>>>>>>> something to do with the association mechanism of the
>>>>>>> rt2800usb. Compat-wireless from few days back exhibits no
>>>>>>> such foul play.
>>>>>>>
>>>>>>> yes just right at the association complete freeze.
>>>>>>>
>>>>>>
>>>>>> That's strange. I wonder what's the connection with this bug and
>>>>>> network-manager. Because when I manually tried to associate, dmesg reported
>>>>>> the association attempt timed out.
>>>>>
>>>>> no even when we use iw dev connect command we can see the panic.
>>>>
>>>> Yeah, I've seen this freeze as well using one of the later
>>>> compat-wireless packages using just iw and wpa_supplicant to bring up the
>>>> card. This is on all sorts of rt2x00 supported devices.
>>>>
>>>> However, I don't believe this to be an rt2x00-specific bug, as exactly
>>>> the same rt2x00 sources inside a compat-wireless-2.6.39rc7 package do not
>>>> produce the freeze.
>>>>
>>>>> some expert suspected that there is a chance of kfree_rcu in
>>>>> compat-wireless may have caused the problem
>>>>>
>>>>
>>>> That's where my suspicion is as well, but I didn't have the time to
>>>> further investigate. Since my focus was on rt2x00 I used the
>>>> compat-wireless-2.6.39rc7 package to test my patches. I only did a quick
>>>> check, and the kfree_rcu compatibility fix that was done in compat-wireless
>>>> did seem to match the kfree_rcu code is present in linux-next, but maybe
>>>> there is an odd side-effect.
>>>
>>> I could not exactly remember this panic came just after kfree_rcu
>>> backported..
>>
>> This problem also occurs with rtl8192se from compat-wireless. When it was
>> reported to me, a photo of the console log was included (attached). The
>> crash is a NULL pointer in rcu_do_batch.clone.19 (I think - the photo
>> quality is minimal.).
>
> thanks!, same type of call trace which I had also obtained, hopefully there in
> ?http://pastebin.com/CZrSZrme
> ?http://pastebin.com/gwZJGDG4
>
>
>
>>
>> Larry
>>
>>
>>
>>
>
>
>
> --
> shafi
>



--
shafi


Attachments:
compat-wireless-no-kfree-rcu.patch (1.99 kB)

2011-05-18 13:04:17

by Mohammed Shafi

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On Wed, May 18, 2011 at 6:21 PM, Gertjan van Wingerde
<[email protected]> wrote:
> On 05/18/11 14:41, Mohammed Shafi wrote:
>> On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
>> <[email protected]> wrote:
>>>>> A very peculiar bug.
>>>>>
>>>>> With compat-wireless from 16.05 a nasty bug started to
>>>> manifest itself. Right around association time, the
>>>> rt2800usb causes kernel panic. The system freezes and the
>>>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>>>
>>>> also ath9k, iwlagn.
>>>>
>>>>>
>>>>> Unfortunately there are no recoverable traces after
>>>> the system failure to aid this bug report or to indicate its
>>>> origin.
>>>>>
>>>>> I believe it may somehow be related to Ubuntu's
>>>> network-manager. If I turn off the network-manager service,
>>>> I can go into monitor mode for example, but if
>>>> network-manager is running and I plug my USB dongle, it
>>>> starts to associate, a second or two later the system is in
>>>> complete meltdown.
>>>>
>>>> same thing, monitor mode worked perfectly fine.
>>>>
>>>>>
>>>>> Nothing concrete, but a hunch is telling me this has
>>>> something to do with the association mechanism of the
>>>> rt2800usb. Compat-wireless from few days back exhibits no
>>>> such foul play.
>>>>
>>>> yes just right at the association complete freeze.
>>>>
>>>
>>> That's strange. I wonder what's the connection with this bug and network-manager. Because when I manually tried to associate, dmesg reported the association attempt timed out.
>>
>> no even when we use iw dev connect command we can see the panic.
>
> Yeah, I've seen this freeze as well using one of the later compat-wireless packages using just iw and wpa_supplicant to bring up the card. This is on all sorts of rt2x00 supported devices.
>
> However, I don't believe this to be an rt2x00-specific bug, as exactly the same rt2x00 sources inside a compat-wireless-2.6.39rc7 package do not produce the freeze.
>
>> some expert suspected that there is a chance of kfree_rcu in
>> compat-wireless may have caused the problem
>>
>
> That's where my suspicion is as well, but I didn't have the time to further investigate. Since my focus was on rt2x00 I used the compat-wireless-2.6.39rc7 package to test my patches. I only did a quick check, and the kfree_rcu compatibility fix that was done in compat-wireless did seem to match the kfree_rcu code is present in linux-next, but maybe there is an odd side-effect.

I could not exactly remember this panic came just after kfree_rcu backported..

>
> ---
> Gertjan
>



--
shafi

2011-05-18 16:04:12

by Mohammed Shafi

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On Wed, May 18, 2011 at 9:18 PM, Mohammed Shafi
<[email protected]> wrote:
> On Wed, May 18, 2011 at 9:15 PM, Mohammed Shafi
> <[email protected]> wrote:
>> just a quick update, once again I blindly used this patches which
>> seems to solve the problem,
>> agg-rx.c still uses the call_rcu thing, so I thought work.c ,
>> aggr-tx.c can make use of call_rcu .
>> thanks to the guy who mailed this patch!
>>
>> need to test more
>
> from this thread
> http://comments.gmane.org/gmane.linux.kernel.wireless.general/69332
>
> will test with compat wireless 16-05-2011

looks like reverting back to call_free_rcu fixes(with the help of the
compat-wireless-no-kfree-rcu.patch
) fixes this, thanks to Felix who pointed this backporting of kfree_rcu thing

>>
>>
>> On Wed, May 18, 2011 at 8:16 PM, Mohammed Shafi
>> <[email protected]> wrote:
>>> On Wed, May 18, 2011 at 8:11 PM, Larry Finger <[email protected]> wrote:
>>>> On 05/18/2011 08:04 AM, Mohammed Shafi wrote:
>>>>>
>>>>> On Wed, May 18, 2011 at 6:21 PM, Gertjan van Wingerde
>>>>> <[email protected]> ?wrote:
>>>>>>
>>>>>> On 05/18/11 14:41, Mohammed Shafi wrote:
>>>>>>>
>>>>>>> On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
>>>>>>> <[email protected]> ?wrote:
>>>>>>>>>>
>>>>>>>>>> A very peculiar bug.
>>>>>>>>>>
>>>>>>>>>> With compat-wireless from 16.05 a nasty bug started to
>>>>>>>>>
>>>>>>>>> manifest itself. Right around association time, the
>>>>>>>>> rt2800usb causes kernel panic. The system freezes and the
>>>>>>>>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>>>>>>>>
>>>>>>>>> also ath9k, iwlagn.
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Unfortunately there are no recoverable traces after
>>>>>>>>>
>>>>>>>>> the system failure to aid this bug report or to indicate its
>>>>>>>>> origin.
>>>>>>>>>>
>>>>>>>>>> I believe it may somehow be related to Ubuntu's
>>>>>>>>>
>>>>>>>>> network-manager. If I turn off the network-manager service,
>>>>>>>>> I can go into monitor mode for example, but if
>>>>>>>>> network-manager is running and I plug my USB dongle, it
>>>>>>>>> starts to associate, a second or two later the system is in
>>>>>>>>> complete meltdown.
>>>>>>>>>
>>>>>>>>> same thing, monitor mode worked perfectly fine.
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Nothing concrete, but a hunch is telling me this has
>>>>>>>>>
>>>>>>>>> something to do with the association mechanism of the
>>>>>>>>> rt2800usb. Compat-wireless from few days back exhibits no
>>>>>>>>> such foul play.
>>>>>>>>>
>>>>>>>>> yes just right at the association complete freeze.
>>>>>>>>>
>>>>>>>>
>>>>>>>> That's strange. I wonder what's the connection with this bug and
>>>>>>>> network-manager. Because when I manually tried to associate, dmesg reported
>>>>>>>> the association attempt timed out.
>>>>>>>
>>>>>>> no even when we use iw dev connect command we can see the panic.
>>>>>>
>>>>>> Yeah, I've seen this freeze as well using one of the later
>>>>>> compat-wireless packages using just iw and wpa_supplicant to bring up the
>>>>>> card. This is on all sorts of rt2x00 supported devices.
>>>>>>
>>>>>> However, I don't believe this to be an rt2x00-specific bug, as exactly
>>>>>> the same rt2x00 sources inside a compat-wireless-2.6.39rc7 package do not
>>>>>> produce the freeze.
>>>>>>
>>>>>>> some expert suspected that there is a chance of kfree_rcu in
>>>>>>> compat-wireless may have caused the problem
>>>>>>>
>>>>>>
>>>>>> That's where my suspicion is as well, but I didn't have the time to
>>>>>> further investigate. Since my focus was on rt2x00 I used the
>>>>>> compat-wireless-2.6.39rc7 package to test my patches. I only did a quick
>>>>>> check, and the kfree_rcu compatibility fix that was done in compat-wireless
>>>>>> did seem to match the kfree_rcu code is present in linux-next, but maybe
>>>>>> there is an odd side-effect.
>>>>>
>>>>> I could not exactly remember this panic came just after kfree_rcu
>>>>> backported..
>>>>
>>>> This problem also occurs with rtl8192se from compat-wireless. When it was
>>>> reported to me, a photo of the console log was included (attached). The
>>>> crash is a NULL pointer in rcu_do_batch.clone.19 (I think - the photo
>>>> quality is minimal.).
>>>
>>> thanks!, same type of call trace which I had also obtained, hopefully there in
>>> ?http://pastebin.com/CZrSZrme
>>> ?http://pastebin.com/gwZJGDG4
>>>
>>>
>>>
>>>>
>>>> Larry
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> shafi
>>>
>>
>>
>>
>> --
>> shafi
>>
>
>
>
> --
> shafi
>



--
shafi

2011-05-18 12:51:08

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On 05/18/11 14:41, Mohammed Shafi wrote:
> On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
> <[email protected]> wrote:
>>>> A very peculiar bug.
>>>>
>>>> With compat-wireless from 16.05 a nasty bug started to
>>> manifest itself. Right around association time, the
>>> rt2800usb causes kernel panic. The system freezes and the
>>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>>
>>> also ath9k, iwlagn.
>>>
>>>>
>>>> Unfortunately there are no recoverable traces after
>>> the system failure to aid this bug report or to indicate its
>>> origin.
>>>>
>>>> I believe it may somehow be related to Ubuntu's
>>> network-manager. If I turn off the network-manager service,
>>> I can go into monitor mode for example, but if
>>> network-manager is running and I plug my USB dongle, it
>>> starts to associate, a second or two later the system is in
>>> complete meltdown.
>>>
>>> same thing, monitor mode worked perfectly fine.
>>>
>>>>
>>>> Nothing concrete, but a hunch is telling me this has
>>> something to do with the association mechanism of the
>>> rt2800usb. Compat-wireless from few days back exhibits no
>>> such foul play.
>>>
>>> yes just right at the association complete freeze.
>>>
>>
>> That's strange. I wonder what's the connection with this bug and network-manager. Because when I manually tried to associate, dmesg reported the association attempt timed out.
>
> no even when we use iw dev connect command we can see the panic.

Yeah, I've seen this freeze as well using one of the later compat-wireless packages using just iw and wpa_supplicant to bring up the card. This is on all sorts of rt2x00 supported devices.

However, I don't believe this to be an rt2x00-specific bug, as exactly the same rt2x00 sources inside a compat-wireless-2.6.39rc7 package do not produce the freeze.

> some expert suspected that there is a chance of kfree_rcu in
> compat-wireless may have caused the problem
>

That's where my suspicion is as well, but I didn't have the time to further investigate. Since my focus was on rt2x00 I used the compat-wireless-2.6.39rc7 package to test my patches. I only did a quick check, and the kfree_rcu compatibility fix that was done in compat-wireless did seem to match the kfree_rcu code is present in linux-next, but maybe there is an odd side-effect.

---
Gertjan

2011-05-18 15:48:51

by Mohammed Shafi

[permalink] [raw]
Subject: Re: rt2x00: rt2800usb causing kernel panic /compat-wireless/

On Wed, May 18, 2011 at 9:15 PM, Mohammed Shafi
<[email protected]> wrote:
> just a quick update, once again I blindly used this patches which
> seems to solve the problem,
> agg-rx.c still uses the call_rcu thing, so I thought work.c ,
> aggr-tx.c can make use of call_rcu .
> thanks to the guy who mailed this patch!
>
> need to test more

from this thread
http://comments.gmane.org/gmane.linux.kernel.wireless.general/69332

will test with compat wireless 16-05-2011
>
>
> On Wed, May 18, 2011 at 8:16 PM, Mohammed Shafi
> <[email protected]> wrote:
>> On Wed, May 18, 2011 at 8:11 PM, Larry Finger <[email protected]> wrote:
>>> On 05/18/2011 08:04 AM, Mohammed Shafi wrote:
>>>>
>>>> On Wed, May 18, 2011 at 6:21 PM, Gertjan van Wingerde
>>>> <[email protected]> ?wrote:
>>>>>
>>>>> On 05/18/11 14:41, Mohammed Shafi wrote:
>>>>>>
>>>>>> On Wed, May 18, 2011 at 5:26 PM, Walter Goldens
>>>>>> <[email protected]> ?wrote:
>>>>>>>>>
>>>>>>>>> A very peculiar bug.
>>>>>>>>>
>>>>>>>>> With compat-wireless from 16.05 a nasty bug started to
>>>>>>>>
>>>>>>>> manifest itself. Right around association time, the
>>>>>>>> rt2800usb causes kernel panic. The system freezes and the
>>>>>>>> Caps Lock and Num Lock leds on the keyboard begin to flash.
>>>>>>>>
>>>>>>>> also ath9k, iwlagn.
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Unfortunately there are no recoverable traces after
>>>>>>>>
>>>>>>>> the system failure to aid this bug report or to indicate its
>>>>>>>> origin.
>>>>>>>>>
>>>>>>>>> I believe it may somehow be related to Ubuntu's
>>>>>>>>
>>>>>>>> network-manager. If I turn off the network-manager service,
>>>>>>>> I can go into monitor mode for example, but if
>>>>>>>> network-manager is running and I plug my USB dongle, it
>>>>>>>> starts to associate, a second or two later the system is in
>>>>>>>> complete meltdown.
>>>>>>>>
>>>>>>>> same thing, monitor mode worked perfectly fine.
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Nothing concrete, but a hunch is telling me this has
>>>>>>>>
>>>>>>>> something to do with the association mechanism of the
>>>>>>>> rt2800usb. Compat-wireless from few days back exhibits no
>>>>>>>> such foul play.
>>>>>>>>
>>>>>>>> yes just right at the association complete freeze.
>>>>>>>>
>>>>>>>
>>>>>>> That's strange. I wonder what's the connection with this bug and
>>>>>>> network-manager. Because when I manually tried to associate, dmesg reported
>>>>>>> the association attempt timed out.
>>>>>>
>>>>>> no even when we use iw dev connect command we can see the panic.
>>>>>
>>>>> Yeah, I've seen this freeze as well using one of the later
>>>>> compat-wireless packages using just iw and wpa_supplicant to bring up the
>>>>> card. This is on all sorts of rt2x00 supported devices.
>>>>>
>>>>> However, I don't believe this to be an rt2x00-specific bug, as exactly
>>>>> the same rt2x00 sources inside a compat-wireless-2.6.39rc7 package do not
>>>>> produce the freeze.
>>>>>
>>>>>> some expert suspected that there is a chance of kfree_rcu in
>>>>>> compat-wireless may have caused the problem
>>>>>>
>>>>>
>>>>> That's where my suspicion is as well, but I didn't have the time to
>>>>> further investigate. Since my focus was on rt2x00 I used the
>>>>> compat-wireless-2.6.39rc7 package to test my patches. I only did a quick
>>>>> check, and the kfree_rcu compatibility fix that was done in compat-wireless
>>>>> did seem to match the kfree_rcu code is present in linux-next, but maybe
>>>>> there is an odd side-effect.
>>>>
>>>> I could not exactly remember this panic came just after kfree_rcu
>>>> backported..
>>>
>>> This problem also occurs with rtl8192se from compat-wireless. When it was
>>> reported to me, a photo of the console log was included (attached). The
>>> crash is a NULL pointer in rcu_do_batch.clone.19 (I think - the photo
>>> quality is minimal.).
>>
>> thanks!, same type of call trace which I had also obtained, hopefully there in
>> ?http://pastebin.com/CZrSZrme
>> ?http://pastebin.com/gwZJGDG4
>>
>>
>>
>>>
>>> Larry
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> shafi
>>
>
>
>
> --
> shafi
>



--
shafi