Skip to contentSkip to conversation

Unplugging usb wlan (rt73usb) hangs the system

DISCUSSION Ozan Çağlayan 2 participants 6 messages Mar 2, 2011 – Mar 11, 2011

lore
Share & tools
lore
#0 lore raw

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,

Signature · 2 lines
Pardus Linux
http://www.pardus.org.tr/eng
[  332.443352] usb 2-3: USB disconnect, address 4
[  479.926182] INFO: task khubd:40 blocked for more than 120 seconds.
[  479.926190] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  479.926195] khubd         D ffff8801b338bb58     0    40      2 0x00000000
[  479.926640]  [<ffffffff81483fc3>] out_of_line_wait_on_bit+0x69/0x74
[  479.926645]  [<ffffffff81127e62>] ? sync_buffer+0x0/0x29
[  479.926649]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  479.926654]  [<ffffffff81127e3d>] __wait_on_buffer+0x21/0x23
[  479.926660]  [<ffffffff811a82cd>] ext4_mb_init_cache+0x23b/0x522
[  479.926666]  [<ffffffff811a86be>] ext4_mb_init_group+0x10a/0x29e
[  479.926671]  [<ffffffff811a88a2>] ext4_mb_good_group+0x50/0xd3
[  479.926677]  [<ffffffff811a9da0>] ext4_mb_regular_allocator+0x12e/0x289
[  479.926683]  [<ffffffff811ab8a2>] ext4_mb_new_blocks+0x17e/0x3a4
[  479.926689]  [<ffffffff811a1847>] ? ext4_ext_find_extent+0x122/0x2b8
[  479.926695]  [<ffffffff811a447b>] ext4_ext_map_blocks+0x1a52/0x1c40
[  479.926701]  [<ffffffff810ca188>] ? release_pages+0x7a/0x17c
[  479.926707]  [<ffffffff8124971c>] ? radix_tree_gang_lookup_tag_slot+0x81/0xa2
[  479.926712]  [<ffffffff8103cc20>] ? need_resched+0x1e/0x28
[  479.926719]  [<ffffffff8118850d>] ext4_map_blocks+0x128/0x20e
[  479.926724]  [<ffffffff8118a223>] mpage_da_map_and_submit+0x8b/0x2db
[  479.926730]  [<ffffffff8118ab9e>] ext4_da_writepages+0x31b/0x4fb
[  479.926736]  [<ffffffff810c96d1>] do_writepages+0x1c/0x25
[  479.926742]  [<ffffffff81121cdf>] writeback_single_inode+0xa0/0x1c1
[  479.926747]  [<ffffffff81121fcc>] writeback_sb_inodes+0x9f/0x118
[  479.926753]  [<ffffffff81122a07>] writeback_inodes_wb+0x16a/0x17c
[  479.926758]  [<ffffffff81122c68>] wb_writeback+0x24f/0x36c
[  479.926763]  [<ffffffff81122ec6>] wb_do_writeback+0x141/0x19a
[  479.926767]  [<ffffffff81483d79>] ? schedule_timeout+0x9f/0xbb
[  479.926772]  [<ffffffff81122fa5>] bdi_writeback_thread+0x86/0x20d
[  479.926777]  [<ffffffff81122f1f>] ? bdi_writeback_thread+0x0/0x20d
[  479.926783]  [<ffffffff81067732>] kthread+0x7d/0x85
[  479.926787]  [<ffffffff8100a824>] kernel_thread_helper+0x4/0x10
[  479.926792]  [<ffffffff810676b5>] ? kthread+0x0/0x85
[  479.926796]  [<ffffffff8100a820>] ? kernel_thread_helper+0x0/0x10
[  479.926804] INFO: task cupsd:756 blocked for more than 120 seconds.
[  479.926807] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  479.926811] cupsd         D 000000010000b91d     0   756      1 0x00000080
[  479.926818]  ffff8801aebd1a18 0000000000000086 ffff8801aebd19a8 ffffffffffffffff
[  479.926828]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801b17dae20
[  479.926837]  0000000000013a00 ffff8801aebd1fd8 0000000000013a00 0000000000013a00
[  479.926847] Call Trace:
[  479.926852]  [<ffffffff811b9e4f>] do_get_write_access+0x203/0x3d2
[  479.926858]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  479.926864]  [<ffffffff811bfc23>] ? jbd_unlock_bh_journal_head+0x11/0x13
[  479.926869]  [<ffffffff811ba11d>] jbd2_journal_get_write_access+0x26/0x3d
[  479.926874]  [<ffffffff811a5694>] __ext4_journal_get_write_access+0x51/0x5f
[  479.926879]  [<ffffffff811abeec>] ext4_free_blocks+0x424/0x71f
[  479.926884]  [<ffffffff811278ec>] ? __brelse+0x10/0x2e
[  479.926890]  [<ffffffff810f9d14>] ? __kmalloc+0xfe/0x110
[  479.926895]  [<ffffffff811a49f1>] ext4_ext_truncate+0x388/0x7e1
[  479.926901]  [<ffffffff81188f49>] ext4_truncate+0x9f/0x50e
[  479.926907]  [<ffffffff811278ec>] ? __brelse+0x10/0x2e
[  479.926912]  [<ffffffff81184516>] ? brelse+0xe/0x10
[  479.926917]  [<ffffffff8118753f>] ? ext4_mark_inode_dirty+0x1c0/0x1f3
[  479.926921]  [<ffffffff811b8e07>] ? jbd2_journal_start+0xe/0x10
[  479.926926]  [<ffffffff8118aebe>] ext4_evict_inode+0x140/0x224
[  479.926931]  [<ffffffff81118442>] evict+0x22/0x93
[  479.926934]  [<ffffffff8111874d>] iput+0x1e0/0x209
[  479.926939]  [<ffffffff81110446>] do_unlinkat+0x11c/0x16f
[  479.926944]  [<ffffffff8110e301>] ? path_put+0x1d/0x22
[  479.926949]  [<ffffffff81095f46>] ? audit_syscall_entry+0x117/0x143
[  479.926954]  [<ffffffff81111645>] sys_unlink+0x11/0x13
[  479.926958]  [<ffffffff81009a12>] system_call_fastpath+0x16/0x1b
[  479.926963] INFO: task X:758 blocked for more than 120 seconds.
[  479.926966] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  479.926969] X             D 000000010000a089     0   758    654 0x00400084
[  479.926977]  ffff8801b11f17e8 0000000000000082 ffff8800bf42f490 0000000000000000
[  479.926988]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801aebe2e20
[  479.926997]  0000000000013a00 ffff8801b11f1fd8 0000000000013a00 0000000000013a00
[  479.927007] Call Trace:
[  479.927012]  [<ffffffff81483cfc>] schedule_timeout+0x22/0xbb
[  479.927018]  [<ffffffff81046a7b>] ? try_to_wake_up+0x20f/0x221
[  479.927023]  [<ffffffff8103cc20>] ? need_resched+0x1e/0x28
[  479.927027]  [<ffffffff81483b11>] wait_for_common+0x9e/0x115
[  479.927032]  [<ffffffff81046a8d>] ? default_wake_function+0x0/0xf
[  479.927037]  [<ffffffff81483c22>] wait_for_completion+0x18/0x1a
[  479.927042]  [<ffffffff81062edd>] flush_work+0x2b/0x34
[  479.927047]  [<ffffffff8106273d>] ? wq_barrier_func+0x0/0xf
[  479.927051]  [<ffffffff81063973>] flush_delayed_work+0x3d/0x41
[  479.927057]  [<ffffffff812db152>] tty_flush_to_ldisc+0x10/0x12
[  479.927106]  [<ffffffff812d6405>] input_available_p+0x12/0x4f
[  479.927113]  [<ffffffff812d64a5>] n_tty_poll+0x63/0x12c
[  479.927119]  [<ffffffff812d3aba>] tty_poll+0x61/0x7b
[  479.927125]  [<ffffffff8111411c>] do_select+0x33d/0x51e
[  479.927132]  [<ffffffff81113b04>] ? __pollwait+0x0/0xc7
[  479.927138]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927143]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927147]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927152]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927156]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927161]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927166]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927172]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927178]  [<ffffffff81113bcb>] ? pollwake+0x0/0x4f
[  479.927185]  [<ffffffff8111446c>] core_sys_select+0x16f/0x20e
[  479.927200]  [<ffffffffa01c950a>] ? nouveau_gem_ioctl_pushbuf+0x0/0xe24 [nouveau]
[  479.927206]  [<ffffffff8106a7c6>] ? __remove_hrtimer+0x78/0x85
[  479.927213]  [<ffffffff810527bb>] ? timespec_add_safe+0x32/0x5f
[  479.927219]  [<ffffffff8100fb66>] ? read_tsc+0x9/0x19
[  479.927225]  [<ffffffff8106f610>] ? ktime_get_ts+0x80/0x89
[  479.927231]  [<ffffffff8111459c>] sys_select+0x91/0xb9
[  479.927237]  [<ffffffff81009a12>] system_call_fastpath+0x16/0x1b
[  479.927259] INFO: task yakuake:1215 blocked for more than 120 seconds.
[  479.927262] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  479.927266] yakuake       D 00000001000098d7     0  1215      1 0x00000080
[  479.927275]  ffff88018f75f9e8 0000000000000086 ffff88018f75fa68 0000000200000000
[  479.927287]  0000000000013a00 0000000000013a00 0000000000013a00 ffff88019172c530
[  479.927298]  0000000000013a00 ffff88018f75ffd8 0000000000013a00 0000000000013a00
[  479.927309] Call Trace:
[  479.927314]  [<ffffffff810c153d>] ? sync_page+0x0/0x48
[  479.927319]  [<ffffffff814839fd>] io_schedule+0x42/0x5d
[  479.927323]  [<ffffffff810c1581>] sync_page+0x44/0x48
[  479.927328]  [<ffffffff81483e27>] __wait_on_bit_lock+0x41/0x8a
[  479.927333]  [<ffffffff810c14ff>] __lock_page+0x61/0x68
[  479.927338]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  479.927344]  [<ffffffff8103cc33>] ? should_resched+0x9/0x29
[  479.927349]  [<ffffffff810c152b>] lock_page+0x25/0x2a
[  479.927354]  [<ffffffff810c1662>] find_lock_page+0x2e/0x51
[  479.927359]  [<ffffffff810c19a9>] grab_cache_page_write_begin+0x3d/0x9e
[  479.927365]  [<ffffffff810f6d9c>] ? arch_local_irq_save+0x16/0x1c
[  479.927370]  [<ffffffff81189972>] ext4_da_write_begin+0x141/0x218
[  479.927375]  [<ffffffff811b9431>] ? jbd2_journal_stop+0x2de/0x2f0
[  479.927381]  [<ffffffff810c0ca1>] generic_file_buffered_write+0xf5/0x221
[  479.927386]  [<ffffffff81484e72>] ? _raw_spin_lock_irq+0x1a/0x1c
[  479.927392]  [<ffffffff810c234a>] __generic_file_aio_write+0x24a/0x27a
[  479.927398]  [<ffffffff8103cc20>] ? need_resched+0x1e/0x28
[  479.927404]  [<ffffffff810c23d0>] generic_file_aio_write+0x56/0xa6
[  479.927411]  [<ffffffff81181bc0>] ext4_file_write+0xa5/0xb1
[  479.927417]  [<ffffffff81105697>] do_sync_write+0xc6/0x103
[  479.927424]  [<ffffffff8103cc20>] ? need_resched+0x1e/0x28
[  479.927431]  [<ffffffff812182e5>] ? security_file_permission+0x29/0x2e
[  479.927436]  [<ffffffff81105d5b>] vfs_write+0xa7/0xfa
[  479.927441]  [<ffffffff81105f53>] sys_write+0x45/0x69
[  479.927446]  [<ffffffff81009a12>] system_call_fastpath+0x16/0x1b
[  599.634491] khubd         D ffff8801b338bb58     0    40      2 0x00000000
[  599.634504]  ffff8801b338b9f0 0000000000000046 ffff8800bf48f340 0000000000000000
[  599.634516]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801b3381710
[  599.634528]  0000000000013a00 ffff8801b338bfd8 0000000000013a00 0000000000013a00
[  599.634538] Call Trace:
[  599.634546]  [<ffffffff81483cfc>] schedule_timeout+0x22/0xbb
[  599.634553]  [<ffffffff81484e86>] ? _raw_spin_unlock_irqrestore+0x12/0x14
[  599.634560]  [<ffffffff8103cc20>] ? need_resched+0x1e/0x28
[  599.634565]  [<ffffffff81483b11>] wait_for_common+0x9e/0x115
[  599.634572]  [<ffffffff81046a8d>] ? default_wake_function+0x0/0xf
[  599.634578]  [<ffffffff81046aac>] ? wake_up_process+0x10/0x12
[  599.634583]  [<ffffffff81483c22>] wait_for_completion+0x18/0x1a
[  599.634590]  [<ffffffff81062d21>] wait_on_work+0x108/0x142
[  599.634596]  [<ffffffff8106273d>] ? wq_barrier_func+0x0/0xf
[  599.634602]  [<ffffffff810635cb>] __cancel_work_timer+0xbd/0xfc
[  599.634609]  [<ffffffff81063624>] cancel_work_sync+0xb/0xd
[  599.634617]  [<ffffffffa01b4831>] rt2x00lib_remove_dev+0x31/0xf4 [rt2x00lib]
[  599.634624]  [<ffffffffa007a0ae>] rt2x00usb_disconnect+0x29/0x99 [rt2x00usb]
[  599.634632]  [<ffffffff8135a1b9>] usb_unbind_interface+0x69/0x13c
[  599.634639]  [<ffffffff812ffdf3>] __device_release_driver+0x7e/0xd4
[  599.634645]  [<ffffffff812ffe67>] device_release_driver+0x1e/0x2b
[  599.634651]  [<ffffffff812ffa23>] bus_remove_device+0x84/0x95
[  599.634657]  [<ffffffff812fd417>] device_del+0x138/0x18a
[  599.634663]  [<ffffffff8135842e>] usb_disable_device+0x4c/0xf3
[  599.634670]  [<ffffffff813523e4>] usb_disconnect+0x8e/0xf6
[  599.634675]  [<ffffffff81353877>] hub_thread+0x45a/0xd7f
[  599.634681]  [<ffffffff810405c6>] ? finish_task_switch+0x84/0xa3
[  599.634688]  [<ffffffff81067bc7>] ? autoremove_wake_function+0x0/0x34
[  599.634695]  [<ffffffff8135341d>] ? hub_thread+0x0/0xd7f
[  599.634700]  [<ffffffff81067732>] kthread+0x7d/0x85
[  599.634706]  [<ffffffff8100a824>] kernel_thread_helper+0x4/0x10
[  599.634712]  [<ffffffff810676b5>] ? kthread+0x0/0x85
[  599.634718]  [<ffffffff8100a820>] ? kernel_thread_helper+0x0/0x10
[  599.634727] INFO: task jbd2/sda1-8:275 blocked for more than 120 seconds.
[  599.634730] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  599.634734] jbd2/sda1-8   D 000000010000aea1     0   275      2 0x00000000
[  599.634744]  ffff8801ae967b40 0000000000000046 ffff8801ae967ab0 ffffffffffffffff
[  599.634754]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801ae862e20
[  599.634765]  0000000000013a00 ffff8801ae967fd8 0000000000013a00 0000000000013a00
[  599.634775] Call Trace:
[  599.634781]  [<ffffffff810c153d>] ? sync_page+0x0/0x48
[  599.634786]  [<ffffffff810c153d>] ? sync_page+0x0/0x48
[  599.634791]  [<ffffffff814839fd>] io_schedule+0x42/0x5d
[  599.634796]  [<ffffffff810c1581>] sync_page+0x44/0x48
[  599.634801]  [<ffffffff81483f27>] __wait_on_bit+0x43/0x76
[  599.634807]  [<ffffffff810c173b>] wait_on_page_bit+0x6d/0x74
[  599.634814]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  599.634820]  [<ffffffff810c9f97>] ? pagevec_lookup_tag+0x20/0x29
[  599.634826]  [<ffffffff810c1d06>] filemap_fdatawait_range+0x97/0x160
[  599.634832]  [<ffffffff810c1deb>] filemap_fdatawait+0x1c/0x1e
[  599.634839]  [<ffffffff811bb2e4>] jbd2_journal_commit_transaction+0xa3d/0x1411
[  599.634846]  [<ffffffff81067bc7>] ? autoremove_wake_function+0x0/0x34
[  599.634852]  [<ffffffff811c05f1>] kjournald2+0x138/0x363
[  599.634857]  [<ffffffff81067bc7>] ? autoremove_wake_function+0x0/0x34
[  599.634863]  [<ffffffff811c04b9>] ? kjournald2+0x0/0x363
[  599.634869]  [<ffffffff81067732>] kthread+0x7d/0x85
[  599.634875]  [<ffffffff8100a824>] kernel_thread_helper+0x4/0x10
[  599.634881]  [<ffffffff810676b5>] ? kthread+0x0/0x85
[  599.634887]  [<ffffffff8100a820>] ? kernel_thread_helper+0x0/0x10
[  599.634893] INFO: task flush-8:0:538 blocked for more than 120 seconds.
[  599.634897] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  599.634901] flush-8:0     D 000000010000978d     0   538      2 0x00000000
[  599.634911]  ffff8801b09ab510 0000000000000046 ffff8801b09ab490 ffffffffffffffff
[  599.634923]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801aebe5c40
[  599.634936]  0000000000013a00 ffff8801b09abfd8 0000000000013a00 0000000000013a00
[  599.634947] Call Trace:
[  599.634952]  [<ffffffff81127e62>] ? sync_buffer+0x0/0x29
[  599.634957]  [<ffffffff81127e62>] ? sync_buffer+0x0/0x29
[  599.634962]  [<ffffffff814839fd>] io_schedule+0x42/0x5d
[  599.634967]  [<ffffffff81127e87>] sync_buffer+0x25/0x29
[  599.634971]  [<ffffffff81483f27>] __wait_on_bit+0x43/0x76
[  599.634977]  [<ffffffff81483fc3>] out_of_line_wait_on_bit+0x69/0x74
[  599.634983]  [<ffffffff81127e62>] ? sync_buffer+0x0/0x29
[  599.634989]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  599.634995]  [<ffffffff81127e3d>] __wait_on_buffer+0x21/0x23
[  599.635003]  [<ffffffff811a82cd>] ext4_mb_init_cache+0x23b/0x522
[  599.635009]  [<ffffffff811a86be>] ext4_mb_init_group+0x10a/0x29e
[  599.635015]  [<ffffffff811a88a2>] ext4_mb_good_group+0x50/0xd3
[  599.635021]  [<ffffffff811a9da0>] ext4_mb_regular_allocator+0x12e/0x289
[  599.635027]  [<ffffffff811ab8a2>] ext4_mb_new_blocks+0x17e/0x3a4
[  599.635033]  [<ffffffff811a1847>] ? ext4_ext_find_extent+0x122/0x2b8
[  599.635039]  [<ffffffff811a447b>] ext4_ext_map_blocks+0x1a52/0x1c40
[  599.635045]  [<ffffffff810ca188>] ? release_pages+0x7a/0x17c
[  599.635052]  [<ffffffff8124971c>] ? radix_tree_gang_lookup_tag_slot+0x81/0xa2
[  599.635059]  [<ffffffff8103cc20>] ? need_resched+0x1e/0x28
[  599.635065]  [<ffffffff8118850d>] ext4_map_blocks+0x128/0x20e
[  599.635072]  [<ffffffff8118a223>] mpage_da_map_and_submit+0x8b/0x2db
[  599.635078]  [<ffffffff8118ab9e>] ext4_da_writepages+0x31b/0x4fb
[  599.635084]  [<ffffffff810c96d1>] do_writepages+0x1c/0x25
[  599.635090]  [<ffffffff81121cdf>] writeback_single_inode+0xa0/0x1c1
[  599.635095]  [<ffffffff81121fcc>] writeback_sb_inodes+0x9f/0x118
[  599.635102]  [<ffffffff81122a07>] writeback_inodes_wb+0x16a/0x17c
[  599.635107]  [<ffffffff81122c68>] wb_writeback+0x24f/0x36c
[  599.635114]  [<ffffffff81122ec6>] wb_do_writeback+0x141/0x19a
[  599.635119]  [<ffffffff81483d79>] ? schedule_timeout+0x9f/0xbb
[  599.635124]  [<ffffffff81122fa5>] bdi_writeback_thread+0x86/0x20d
[  599.635130]  [<ffffffff81122f1f>] ? bdi_writeback_thread+0x0/0x20d
[  599.635135]  [<ffffffff81067732>] kthread+0x7d/0x85
[  599.635141]  [<ffffffff8100a824>] kernel_thread_helper+0x4/0x10
[  599.635147]  [<ffffffff810676b5>] ? kthread+0x0/0x85
[  599.635152]  [<ffffffff8100a820>] ? kernel_thread_helper+0x0/0x10
[  599.635160] INFO: task auditd:681 blocked for more than 120 seconds.
[  599.635164] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  599.635168] auditd        D 00000001000141ba     0   681      1 0x00000000
[  599.635177]  ffff8801b177dcf8 0000000000000082 ffff8801b177dc68 ffffffff810c9f97
[  599.635188]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801b1234530
[  599.635199]  0000000000013a00 ffff8801b177dfd8 0000000000013a00 0000000000013a00
[  599.635209] Call Trace:
[  599.635213]  [<ffffffff810c9f97>] ? pagevec_lookup_tag+0x20/0x29
[  599.635219]  [<ffffffff810c153d>] ? sync_page+0x0/0x48
[  599.635224]  [<ffffffff810c153d>] ? sync_page+0x0/0x48
[  599.635229]  [<ffffffff814839fd>] io_schedule+0x42/0x5d
[  599.635234]  [<ffffffff810c1581>] sync_page+0x44/0x48
[  599.635240]  [<ffffffff81483f27>] __wait_on_bit+0x43/0x76
[  599.635247]  [<ffffffff810c173b>] wait_on_page_bit+0x6d/0x74
[  599.635253]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  599.635259]  [<ffffffff810c9f97>] ? pagevec_lookup_tag+0x20/0x29
[  599.635265]  [<ffffffff810c1d06>] filemap_fdatawait_range+0x97/0x160
[  599.635271]  [<ffffffff810c96d1>] ? do_writepages+0x1c/0x25
[  599.635277]  [<ffffffff810c1f4d>] ? __filemap_fdatawrite_range+0x4b/0x4d
[  599.635283]  [<ffffffff810c1f8d>] filemap_write_and_wait_range+0x3e/0x51
[  599.635289]  [<ffffffff81125bca>] vfs_fsync_range+0x36/0x79
[  599.635295]  [<ffffffff81125c6b>] vfs_fsync+0x17/0x19
[  599.635301]  [<ffffffff81125c96>] do_fsync+0x29/0x3e
[  599.635306]  [<ffffffff81125ec0>] sys_fsync+0xb/0xf
[  599.635311]  [<ffffffff81009a12>] system_call_fastpath+0x16/0x1b
[  809.996280] SysRq : Emergency Sync
[  810.187825] SysRq : Emergency Sync
[  810.706597] SysRq : Emergency Sync
[  811.057764] SysRq : Emergency Remount R/O
[  814.505597] SysRq : Emergency Remount R/O
[  814.545501] SysRq : Resetting
[  599.634807]  [<ffffffff810c173b>] wait_on_page_bit+0x6d/0x74
[  599.634814]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  599.634820]  [<ffffffff810c9f97>] ? pagevec_lookup_tag+0x20/0x29
[  599.634826]  [<ffffffff810c1d06>] filemap_fdatawait_range+0x97/0x160
[  599.634832]  [<ffffffff810c1deb>] filemap_fdatawait+0x1c/0x1e
[  599.634839]  [<ffffffff811bb2e4>] jbd2_journal_commit_transaction+0xa3d/0x1411
[  599.634846]  [<ffffffff81067bc7>] ? autoremove_wake_function+0x0/0x34
[  599.634852]  [<ffffffff811c05f1>] kjournald2+0x138/0x363
[  599.634857]  [<ffffffff81067bc7>] ? autoremove_wake_function+0x0/0x34
[  599.634863]  [<ffffffff811c04b9>] ? kjournald2+0x0/0x363
[  599.634869]  [<ffffffff81067732>] kthread+0x7d/0x85
[  599.634875]  [<ffffffff8100a824>] kernel_thread_helper+0x4/0x10
[  599.634881]  [<ffffffff810676b5>] ? kthread+0x0/0x85
[  599.634887]  [<ffffffff8100a820>] ? kernel_thread_helper+0x0/0x10
[  599.634893] INFO: task flush-8:0:538 blocked for more than 120 seconds.
[  599.634897] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  599.634901] flush-8:0     D 000000010000978d     0   538      2 0x00000000
[  599.634911]  ffff8801b09ab510 0000000000000046 ffff8801b09ab490 ffffffffffffffff
[  599.634923]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801aebe5c40
[  599.634936]  0000000000013a00 ffff8801b09abfd8 0000000000013a00 0000000000013a00
[  599.634947] Call Trace:
[  599.634952]  [<ffffffff81127e62>] ? sync_buffer+0x0/0x29
[  599.634957]  [<ffffffff81127e62>] ? sync_buffer+0x0/0x29
[  599.634962]  [<ffffffff814839fd>] io_schedule+0x42/0x5d
[  599.634967]  [<ffffffff81127e87>] sync_buffer+0x25/0x29
[  599.634971]  [<ffffffff81483f27>] __wait_on_bit+0x43/0x76
[  599.634977]  [<ffffffff81483fc3>] out_of_line_wait_on_bit+0x69/0x74
[  599.634983]  [<ffffffff81127e62>] ? sync_buffer+0x0/0x29
[  599.634989]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  599.634995]  [<ffffffff81127e3d>] __wait_on_buffer+0x21/0x23
[  599.635003]  [<ffffffff811a82cd>] ext4_mb_init_cache+0x23b/0x522
[  599.635009]  [<ffffffff811a86be>] ext4_mb_init_group+0x10a/0x29e
[  599.635015]  [<ffffffff811a88a2>] ext4_mb_good_group+0x50/0xd3
[  599.635021]  [<ffffffff811a9da0>] ext4_mb_regular_allocator+0x12e/0x289
[  599.635027]  [<ffffffff811ab8a2>] ext4_mb_new_blocks+0x17e/0x3a4
[  599.635033]  [<ffffffff811a1847>] ? ext4_ext_find_extent+0x122/0x2b8
[  599.635039]  [<ffffffff811a447b>] ext4_ext_map_blocks+0x1a52/0x1c40
[  599.635045]  [<ffffffff810ca188>] ? release_pages+0x7a/0x17c
[  599.635052]  [<ffffffff8124971c>] ? radix_tree_gang_lookup_tag_slot+0x81/0xa2
[  599.635059]  [<ffffffff8103cc20>] ? need_resched+0x1e/0x28
[  599.635065]  [<ffffffff8118850d>] ext4_map_blocks+0x128/0x20e
[  599.635072]  [<ffffffff8118a223>] mpage_da_map_and_submit+0x8b/0x2db
[  599.635078]  [<ffffffff8118ab9e>] ext4_da_writepages+0x31b/0x4fb
[  599.635084]  [<ffffffff810c96d1>] do_writepages+0x1c/0x25
[  599.635090]  [<ffffffff81121cdf>] writeback_single_inode+0xa0/0x1c1
[  599.635095]  [<ffffffff81121fcc>] writeback_sb_inodes+0x9f/0x118
[  599.635102]  [<ffffffff81122a07>] writeback_inodes_wb+0x16a/0x17c
[  599.635107]  [<ffffffff81122c68>] wb_writeback+0x24f/0x36c
[  599.635114]  [<ffffffff81122ec6>] wb_do_writeback+0x141/0x19a
[  599.635119]  [<ffffffff81483d79>] ? schedule_timeout+0x9f/0xbb
[  599.635124]  [<ffffffff81122fa5>] bdi_writeback_thread+0x86/0x20d
[  599.635130]  [<ffffffff81122f1f>] ? bdi_writeback_thread+0x0/0x20d
[  599.635135]  [<ffffffff81067732>] kthread+0x7d/0x85
[  599.635141]  [<ffffffff8100a824>] kernel_thread_helper+0x4/0x10
[  599.635147]  [<ffffffff810676b5>] ? kthread+0x0/0x85
[  599.635152]  [<ffffffff8100a820>] ? kernel_thread_helper+0x0/0x10
[  599.635160] INFO: task auditd:681 blocked for more than 120 seconds.
[  599.635164] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  599.635168] auditd        D 00000001000141ba     0   681      1 0x00000000
[  599.635177]  ffff8801b177dcf8 0000000000000082 ffff8801b177dc68 ffffffff810c9f97
[  599.635188]  0000000000013a00 0000000000013a00 0000000000013a00 ffff8801b1234530
[  599.635199]  0000000000013a00 ffff8801b177dfd8 0000000000013a00 0000000000013a00
[  599.635209] Call Trace:
[  599.635213]  [<ffffffff810c9f97>] ? pagevec_lookup_tag+0x20/0x29
[  599.635219]  [<ffffffff810c153d>] ? sync_page+0x0/0x48
[  599.635224]  [<ffffffff810c153d>] ? sync_page+0x0/0x48
[  599.635229]  [<ffffffff814839fd>] io_schedule+0x42/0x5d
[  599.635234]  [<ffffffff810c1581>] sync_page+0x44/0x48
[  599.635240]  [<ffffffff81483f27>] __wait_on_bit+0x43/0x76
[  599.635247]  [<ffffffff810c173b>] wait_on_page_bit+0x6d/0x74
[  599.635253]  [<ffffffff81067bfb>] ? wake_bit_function+0x0/0x2c
[  599.635259]  [<ffffffff810c9f97>] ? pagevec_lookup_tag+0x20/0x29
[  599.635265]  [<ffffffff810c1d06>] filemap_fdatawait_range+0x97/0x160
[  599.635271]  [<ffffffff810c96d1>] ? do_writepages+0x1c/0x25
[  599.635277]  [<ffffffff810c1f4d>] ? __filemap_fdatawrite_range+0x4b/0x4d
[  599.635283]  [<ffffffff810c1f8d>] filemap_write_and_wait_range+0x3e/0x51
[  599.635289]  [<ffffffff81125bca>] vfs_fsync_range+0x36/0x79
[  599.635295]  [<ffffffff81125c6b>] vfs_fsync+0x17/0x19
[  599.635301]  [<ffffffff81125c96>] do_fsync+0x29/0x3e
[  599.635306]  [<ffffffff81125ec0>] sys_fsync+0xb/0xf
[  599.635311]  [<ffffffff81009a12>] system_call_fastpath+0x16/0x1b
#1 lore raw
Quoted 21 lines · Ozan Çağlayan

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.

Quoted 4 lines

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

#2 lore raw
Quoted 11 lines · Stanislaw Gruszka

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!

Signature · 4 lines
Ozan Caglayan

Pardus Linux
http://www.pardus.org.tr/eng
#3 lore raw

Hello

Quoted 11 lines · Ozan Çağlayan
Quoted 9 lines · Stanislaw Gruszka

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
Quoted 6 lines
Quoted 2 lines

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

#4 lore raw

09-03-2011 12:36 tarihinde, Stanislaw Gruszka yazdı:

Quoted 7 lines

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

#5 lore raw
Quoted 9 lines · Ozan Çağlayan

09-03-2011 12:36 tarihinde, Stanislaw Gruszka yazdı:

Quoted 7 lines

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

Quoted 8 lines

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