2011-03-02 17:16:06

by Ozan Çağlayan

[permalink] [raw]
Subject: Unplugging usb wlan (rt73usb) hangs the system

Hi,

I have a bunch of different Edimax and Asus WLAN sticks that are working
very well in Linux 2.6.37.2 with the rt73usb driver. But there's a
really annoying problem which causes the system to hang upon unplugging
those sticks.

First X server goes. Then you can SSH into the machine for a while, and
then I/O operations will start to fail. Magic SysRQ can be used to
safely sync/unmount/reboot the system.

It's happening very frequently but there are times that nothing bad happens.

As far as I can tell, it happens much more frequently if you were
associated to an AP when you unplugged the stick but let me clear this
after testing plug/unplug without associating at all.

One thing that is quite sure is that after unplugging the stick, if you
do nothing with your keyboard, the problem seems not to appear, e.g. I'm
moving the mouse cursor for a while, no problem at all but once I hit
pageup/pagedown to browse on the current konsole screenbuffer, it hangs!
So the problem seems to be triggered after keyboard interrupts.

I've set up a netconsole connection and got the dmesg for a while.
There's no oops/warning/error but every 2 minutes another tasks
generates a stacktrace because of 120 seconds timeout. I'm attaching the
log.

Thanks,


--
Pardus Linux
http://www.pardus.org.tr/eng


Attachments:
lock (22.45 kB)

2011-03-09 10:08:15

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: Unplugging usb wlan (rt73usb) hangs the system

On Wed, Mar 02, 2011 at 07:16:05PM +0200, Ozan Çağlayan wrote:
> I have a bunch of different Edimax and Asus WLAN sticks that are working
> very well in Linux 2.6.37.2 with the rt73usb driver. But there's a
> really annoying problem which causes the system to hang upon unplugging
> those sticks.
>
> First X server goes. Then you can SSH into the machine for a while, and
> then I/O operations will start to fail. Magic SysRQ can be used to
> safely sync/unmount/reboot the system.
>
> It's happening very frequently but there are times that nothing bad happens.
>
> As far as I can tell, it happens much more frequently if you were
> associated to an AP when you unplugged the stick but let me clear this
> after testing plug/unplug without associating at all.
>
> One thing that is quite sure is that after unplugging the stick, if you
> do nothing with your keyboard, the problem seems not to appear, e.g. I'm
> moving the mouse cursor for a while, no problem at all but once I hit
> pageup/pagedown to browse on the current konsole screenbuffer, it hangs!
> So the problem seems to be triggered after keyboard interrupts.
>
> I've set up a netconsole connection and got the dmesg for a while.
> There's no oops/warning/error but every 2 minutes another tasks
> generates a stacktrace because of 120 seconds timeout. I'm attaching the
> log.

I can confirm problem exist in 2.6.37. I can not reproduce it in
current wireless-testing. I did not investigate further, I guess
issue is fixed by:

commit d7bb5f845f437662296adbfeaab8fbfce1c32289
Author: Johannes Stezenbach <[email protected]>
Date: Mon Dec 13 12:32:49 2010 +0100

rt2x00: fix hang when unplugging USB device in us

Stanislaw

2011-03-09 10:37:12

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: Unplugging usb wlan (rt73usb) hangs the system

Hello

On Wed, Mar 09, 2011 at 12:16:58PM +0200, Ozan Çağlayan wrote:
> On 09.03.2011 12:06, Stanislaw Gruszka wrote:
>
> >
> > I can confirm problem exist in 2.6.37. I can not reproduce it in
> > current wireless-testing. I did not investigate further, I guess
> > issue is fixed by:
> >
> > commit d7bb5f845f437662296adbfeaab8fbfce1c32289
> > Author: Johannes Stezenbach <[email protected]>
> > Date: Mon Dec 13 12:32:49 2010 +0100
> >
> > rt2x00: fix hang when unplugging USB device in us
> >
>
> Hi, I'll test ASAP and if we confirm that it's the fix, it should be (it
> should have been actually with a commit message that serious) CC'ed to
> [email protected].

Plese test also that one.

commit 070192dd2975c0e97bbdeac7623b755235c6db7d
Author: Ivo van Doorn <[email protected]>
Date: Thu Nov 4 20:41:05 2010 +0100

rt2x00: Fix crash on USB unplug

Thanks
Stanislaw

2011-03-11 09:22:30

by Ozan Çağlayan

[permalink] [raw]
Subject: Re: Unplugging usb wlan (rt73usb) hangs the system

09-03-2011 12:36 tarihinde, Stanislaw Gruszka yazdı:
> Plese test also that one.
> commit 070192dd2975c0e97bbdeac7623b755235c6db7d
> Author: Ivo van Doorn<[email protected]>
> Date: Thu Nov 4 20:41:05 2010 +0100
>
> rt2x00: Fix crash on USB unplug
>

OK applied 2 commits on top of 2.6.37.3 and tested with an Edimax and an
Asus stick, no problem so far.
But I wonder why are they still in wireless-next? They are quite old
commits dating from November, shouldn't they already
be merged to the linux-2.6 tree?

AFAIK they have to be first applied to linux-2.6 in order to be pulled
to 2.6.3x.y stable trees.

Thanks
Ozan Caglayan


2011-03-09 10:16:52

by Ozan Çağlayan

[permalink] [raw]
Subject: Re: Unplugging usb wlan (rt73usb) hangs the system

On 09.03.2011 12:06, Stanislaw Gruszka wrote:

>
> I can confirm problem exist in 2.6.37. I can not reproduce it in
> current wireless-testing. I did not investigate further, I guess
> issue is fixed by:
>
> commit d7bb5f845f437662296adbfeaab8fbfce1c32289
> Author: Johannes Stezenbach <[email protected]>
> Date: Mon Dec 13 12:32:49 2010 +0100
>
> rt2x00: fix hang when unplugging USB device in us
>

Hi, I'll test ASAP and if we confirm that it's the fix, it should be (it
should have been actually with a commit message that serious) CC'ed to
[email protected].

Thanks!


--
Ozan Caglayan

Pardus Linux
http://www.pardus.org.tr/eng

2011-03-11 10:22:15

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: Unplugging usb wlan (rt73usb) hangs the system

On Fri, Mar 11, 2011 at 11:18:27AM +0200, Ozan Çağlayan wrote:
> 09-03-2011 12:36 tarihinde, Stanislaw Gruszka yazdı:
> >Plese test also that one.
> >commit 070192dd2975c0e97bbdeac7623b755235c6db7d
> >Author: Ivo van Doorn<[email protected]>
> >Date: Thu Nov 4 20:41:05 2010 +0100
> >
> > rt2x00: Fix crash on USB unplug
> >
>
> OK applied 2 commits on top of 2.6.37.3 and tested with an Edimax
> and an Asus stick, no problem so far.
> But I wonder why are they still in wireless-next? They are quite old
> commits dating from November, shouldn't they already
> be merged to the linux-2.6 tree?
>
> AFAIK they have to be first applied to linux-2.6 in order to be
> pulled to 2.6.3x.y stable trees.

Both commits are in 2.6.38, I will post them to stable today.
Thanks for reporting and testing!

Stanislaw