Bug 14463

Summary: usb thumbdrive forgotten to umount resulting in error upon subsequent physical plugging in.
Product: IO/Storage Reporter: Peter Teoh (htmldeveloper)
Component: OtherAssignee: io_other
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.32-rc4 Subsystem:
Regression: No Bisected commit-id:

Description Peter Teoh 2009-10-25 11:02:23 UTC
I *think* it is because I did not umount my filesystem before I plugged out my USB thumbdrive, and after plugging out, i check the filesystem is still "mounted", so I plugged in back the device and umount it.

But the error message is that the device does not exists anymore, even just before that "df" clearly showed it is still mounted.

The dmesg output is as follows (the output is a result of first plugging in, and subsequent plugging out and in repeated a few times):

[10858.010317] usb-storage: waiting for device to settle before scanning
[10863.011224] scsi 7:0:0:0: Direct-Access     Multi    Flash Reader     1.00 PQ: 0 ANSI: 0
[10863.015666] sd 7:0:0:0: Attached scsi generic sg2 type 0
[10863.499628] sd 7:0:0:0: [sdc] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
[10863.502245] sd 7:0:0:0: [sdc] Write Protect is off
[10863.502250] sd 7:0:0:0: [sdc] Mode Sense: 03 00 00 00
[10863.502254] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[10863.502366] usb-storage: device scan complete
[10863.511618] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[10863.511639]  sdc: sdc1
[10863.524625] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[10863.524634] sd 7:0:0:0: [sdc] Attached SCSI removable disk
[10878.554662] usb 1-1: USB disconnect, address 3
[10895.363158] usb 1-1: new high speed USB device using ehci_hcd and address 4
[10895.480005] usb 1-1: configuration #1 chosen from 1 choice
[10895.482437] scsi8 : SCSI emulation for USB Mass Storage devices
[10895.484772] usb-storage: device found at 4
[10895.484774] usb-storage: waiting for device to settle before scanning
[10900.485308] scsi 8:0:0:0: Direct-Access     Multi    Flash Reader     1.00 PQ: 0 ANSI: 0
[10900.489504] sd 8:0:0:0: Attached scsi generic sg2 type 0
[10900.970628] sd 8:0:0:0: [sdd] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
[10900.972751] sd 8:0:0:0: [sdd] Write Protect is off
[10900.972756] sd 8:0:0:0: [sdd] Mode Sense: 03 00 00 00
[10900.972759] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[10900.977313] usb-storage: device scan complete
[10900.982458] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[10900.982477]  sdd: sdd1
[10900.995354] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[10900.995367] sd 8:0:0:0: [sdd] Attached SCSI removable disk
[10930.103624] usb 1-1: USB disconnect, address 4
[10932.225170] usb 1-1: new high speed USB device using ehci_hcd and address 5
[10932.342517] usb 1-1: configuration #1 chosen from 1 choice
[10932.361016] scsi9 : SCSI emulation for USB Mass Storage devices
[10932.366315] usb-storage: device found at 5
[10932.366318] usb-storage: waiting for device to settle before scanning
[10937.367188] scsi 9:0:0:0: Direct-Access     Multi    Flash Reader     1.00 PQ: 0 ANSI: 0
[10937.371386] sd 9:0:0:0: Attached scsi generic sg2 type 0
[10937.379608] usb-storage: device scan complete
[10937.855336] sd 9:0:0:0: [sdd] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
[10937.857531] sd 9:0:0:0: [sdd] Write Protect is off
[10937.857536] sd 9:0:0:0: [sdd] Mode Sense: 03 00 00 00
[10937.857540] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[10937.867209] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[10937.867233]  sdd: sdd1
[10937.880579] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[10937.880589] sd 9:0:0:0: [sdd] Attached SCSI removable disk
[10972.792702] usb 1-1: USB disconnect, address 5
[11041.201064] INFO: task umount:11856 blocked for more than 120 seconds.
[11041.201068] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[11041.201072] umount        D 0000000000000002  5600 11856  11847 0x00000080
[11041.201081]  ffff88011625bcd8 0000000000000086 ffff880028216500 ffff88013e58ad20
[11041.201088]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58 ffff88011625bfd8
[11041.201094]  0000000000016500 ffff88011625bfd8 0000000000016500 ffff88013e58ad20
[11041.201100] Call Trace:
[11041.201111]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
[11041.201117]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
[11041.201124]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
[11041.201130]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
[11041.201136]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11041.201141]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11041.201145]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
[11041.201151]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
[11041.201156]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
[11041.201161]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
[11041.201167]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
[11041.201177]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
[11041.201183]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
[11041.201187]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
[11041.201193]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
[11041.201197]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
[11041.201202]  [<ffffffff81172e90>] sys_umount+0x436/0x477
[11041.201208]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
[11041.201214]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
[11129.535917] kmemleak: 32 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
[11161.201065] INFO: task umount:11856 blocked for more than 120 seconds.
[11161.201069] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[11161.201073] umount        D 0000000000000002  5600 11856  11847 0x00000080
[11161.201082]  ffff88011625bcd8 0000000000000086 ffff880028216500 ffff88013e58ad20
[11161.201089]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58 ffff88011625bfd8
[11161.201095]  0000000000016500 ffff88011625bfd8 0000000000016500 ffff88013e58ad20
[11161.201102] Call Trace:
[11161.201111]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
[11161.201118]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
[11161.201124]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
[11161.201131]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
[11161.201136]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11161.201141]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11161.201146]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
[11161.201151]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
[11161.201156]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
[11161.201162]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
[11161.201168]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
[11161.201176]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
[11161.201181]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
[11161.201186]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
[11161.201191]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
[11161.201196]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
[11161.201201]  [<ffffffff81172e90>] sys_umount+0x436/0x477
[11161.201207]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
[11161.201213]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
[11281.201063] INFO: task umount:11856 blocked for more than 120 seconds.
[11281.201067] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[11281.201071] umount        D 0000000000000002  5600 11856  11847 0x00000080
[11281.201080]  ffff88011625bcd8 0000000000000086 ffff880028216500 ffff88013e58ad20
[11281.201087]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58 ffff88011625bfd8
[11281.201093]  0000000000016500 ffff88011625bfd8 0000000000016500 ffff88013e58ad20
[11281.201099] Call Trace:
[11281.201109]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
[11281.201115]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
[11281.201122]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
[11281.201128]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
[11281.201134]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11281.201139]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11281.201144]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
[11281.201149]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
[11281.201154]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
[11281.201159]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
[11281.201166]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
[11281.201173]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
[11281.201178]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
[11281.201183]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
[11281.201188]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
[11281.201193]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
[11281.201197]  [<ffffffff81172e90>] sys_umount+0x436/0x477
[11281.201203]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
[11281.201210]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
[11401.201067] INFO: task umount:11856 blocked for more than 120 seconds.
[11401.201071] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[11401.201075] umount        D 0000000000000002  5600 11856  11847 0x00000080
[11401.201084]  ffff88011625bcd8 0000000000000086 ffff880028216500 ffff88013e58ad20
[11401.201091]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58 ffff88011625bfd8
[11401.201098]  0000000000016500 ffff88011625bfd8 0000000000016500 ffff88013e58ad20
[11401.201104] Call Trace:
[11401.201114]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
[11401.201120]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
[11401.201128]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
[11401.201135]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
[11401.201140]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11401.201145]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
[11401.201150]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
[11401.201156]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
[11401.201161]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
[11401.201166]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
[11401.201172]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
[11401.201179]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
[11401.201185]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
[11401.201190]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
[11401.201195]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
[11401.201200]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
[11401.201205]  [<ffffffff81172e90>] sys_umount+0x436/0x477
[11401.201211]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
[11401.201218]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
[11441.637167] usb 1-1: new high speed USB device using ehci_hcd and address 6

This is from linus git tree.
Comment 1 Andrew Morton 2009-10-28 23:27:09 UTC
On Sun, 25 Oct 2009 11:02:25 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=14463
> 
>            Summary: usb thumbdrive forgotten to umount resulting in error
>                     upon subsequent physical plugging in.
>            Product: IO/Storage
>            Version: 2.5
>     Kernel Version: 2.6.32-rc4
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: io_other@kernel-bugs.osdl.org
>         ReportedBy: htmldeveloper@gmail.com
>         Regression: No
> 
> 
> I *think* it is because I did not umount my filesystem before I plugged out
> my
> USB thumbdrive, and after plugging out, i check the filesystem is still
> "mounted", so I plugged in back the device and umount it.
> 
> But the error message is that the device does not exists anymore, even just
> before that "df" clearly showed it is still mounted.
> 
> The dmesg output is as follows (the output is a result of first plugging in,
> and subsequent plugging out and in repeated a few times):
> 
> [10858.010317] usb-storage: waiting for device to settle before scanning
> [10863.011224] scsi 7:0:0:0: Direct-Access     Multi    Flash Reader     1.00
> PQ: 0 ANSI: 0
> [10863.015666] sd 7:0:0:0: Attached scsi generic sg2 type 0
> [10863.499628] sd 7:0:0:0: [sdc] 3842048 512-byte logical blocks: (1.96
> GB/1.83
> GiB)
> [10863.502245] sd 7:0:0:0: [sdc] Write Protect is off
> [10863.502250] sd 7:0:0:0: [sdc] Mode Sense: 03 00 00 00
> [10863.502254] sd 7:0:0:0: [sdc] Assuming drive cache: write through
> [10863.502366] usb-storage: device scan complete
> [10863.511618] sd 7:0:0:0: [sdc] Assuming drive cache: write through
> [10863.511639]  sdc: sdc1
> [10863.524625] sd 7:0:0:0: [sdc] Assuming drive cache: write through
> [10863.524634] sd 7:0:0:0: [sdc] Attached SCSI removable disk
> [10878.554662] usb 1-1: USB disconnect, address 3
> [10895.363158] usb 1-1: new high speed USB device using ehci_hcd and address
> 4
> [10895.480005] usb 1-1: configuration #1 chosen from 1 choice
> [10895.482437] scsi8 : SCSI emulation for USB Mass Storage devices
> [10895.484772] usb-storage: device found at 4
> [10895.484774] usb-storage: waiting for device to settle before scanning
> [10900.485308] scsi 8:0:0:0: Direct-Access     Multi    Flash Reader     1.00
> PQ: 0 ANSI: 0
> [10900.489504] sd 8:0:0:0: Attached scsi generic sg2 type 0
> [10900.970628] sd 8:0:0:0: [sdd] 3842048 512-byte logical blocks: (1.96
> GB/1.83
> GiB)
> [10900.972751] sd 8:0:0:0: [sdd] Write Protect is off
> [10900.972756] sd 8:0:0:0: [sdd] Mode Sense: 03 00 00 00
> [10900.972759] sd 8:0:0:0: [sdd] Assuming drive cache: write through
> [10900.977313] usb-storage: device scan complete
> [10900.982458] sd 8:0:0:0: [sdd] Assuming drive cache: write through
> [10900.982477]  sdd: sdd1
> [10900.995354] sd 8:0:0:0: [sdd] Assuming drive cache: write through
> [10900.995367] sd 8:0:0:0: [sdd] Attached SCSI removable disk
> [10930.103624] usb 1-1: USB disconnect, address 4
> [10932.225170] usb 1-1: new high speed USB device using ehci_hcd and address
> 5
> [10932.342517] usb 1-1: configuration #1 chosen from 1 choice
> [10932.361016] scsi9 : SCSI emulation for USB Mass Storage devices
> [10932.366315] usb-storage: device found at 5
> [10932.366318] usb-storage: waiting for device to settle before scanning
> [10937.367188] scsi 9:0:0:0: Direct-Access     Multi    Flash Reader     1.00
> PQ: 0 ANSI: 0
> [10937.371386] sd 9:0:0:0: Attached scsi generic sg2 type 0
> [10937.379608] usb-storage: device scan complete
> [10937.855336] sd 9:0:0:0: [sdd] 3842048 512-byte logical blocks: (1.96
> GB/1.83
> GiB)
> [10937.857531] sd 9:0:0:0: [sdd] Write Protect is off
> [10937.857536] sd 9:0:0:0: [sdd] Mode Sense: 03 00 00 00
> [10937.857540] sd 9:0:0:0: [sdd] Assuming drive cache: write through
> [10937.867209] sd 9:0:0:0: [sdd] Assuming drive cache: write through
> [10937.867233]  sdd: sdd1
> [10937.880579] sd 9:0:0:0: [sdd] Assuming drive cache: write through
> [10937.880589] sd 9:0:0:0: [sdd] Attached SCSI removable disk
> [10972.792702] usb 1-1: USB disconnect, address 5
> [11041.201064] INFO: task umount:11856 blocked for more than 120 seconds.
> [11041.201068] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> message.
> [11041.201072] umount        D 0000000000000002  5600 11856  11847 0x00000080
> [11041.201081]  ffff88011625bcd8 0000000000000086 ffff880028216500
> ffff88013e58ad20
> [11041.201088]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> ffff88011625bfd8
> [11041.201094]  0000000000016500 ffff88011625bfd8 0000000000016500
> ffff88013e58ad20
> [11041.201100] Call Trace:
> [11041.201111]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> [11041.201117]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> [11041.201124]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> [11041.201130]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> [11041.201136]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11041.201141]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11041.201145]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> [11041.201151]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> [11041.201156]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> [11041.201161]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> [11041.201167]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> [11041.201177]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> [11041.201183]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> [11041.201187]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> [11041.201193]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> [11041.201197]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> [11041.201202]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> [11041.201208]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> [11041.201214]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> [11129.535917] kmemleak: 32 new suspected memory leaks (see
> /sys/kernel/debug/kmemleak)
> [11161.201065] INFO: task umount:11856 blocked for more than 120 seconds.
> [11161.201069] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> message.
> [11161.201073] umount        D 0000000000000002  5600 11856  11847 0x00000080
> [11161.201082]  ffff88011625bcd8 0000000000000086 ffff880028216500
> ffff88013e58ad20
> [11161.201089]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> ffff88011625bfd8
> [11161.201095]  0000000000016500 ffff88011625bfd8 0000000000016500
> ffff88013e58ad20
> [11161.201102] Call Trace:
> [11161.201111]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> [11161.201118]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> [11161.201124]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> [11161.201131]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> [11161.201136]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11161.201141]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11161.201146]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> [11161.201151]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> [11161.201156]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> [11161.201162]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> [11161.201168]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> [11161.201176]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> [11161.201181]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> [11161.201186]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> [11161.201191]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> [11161.201196]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> [11161.201201]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> [11161.201207]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> [11161.201213]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> [11281.201063] INFO: task umount:11856 blocked for more than 120 seconds.
> [11281.201067] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> message.
> [11281.201071] umount        D 0000000000000002  5600 11856  11847 0x00000080
> [11281.201080]  ffff88011625bcd8 0000000000000086 ffff880028216500
> ffff88013e58ad20
> [11281.201087]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> ffff88011625bfd8
> [11281.201093]  0000000000016500 ffff88011625bfd8 0000000000016500
> ffff88013e58ad20
> [11281.201099] Call Trace:
> [11281.201109]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> [11281.201115]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> [11281.201122]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> [11281.201128]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> [11281.201134]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11281.201139]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11281.201144]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> [11281.201149]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> [11281.201154]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> [11281.201159]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> [11281.201166]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> [11281.201173]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> [11281.201178]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> [11281.201183]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> [11281.201188]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> [11281.201193]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> [11281.201197]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> [11281.201203]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> [11281.201210]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> [11401.201067] INFO: task umount:11856 blocked for more than 120 seconds.
> [11401.201071] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> message.
> [11401.201075] umount        D 0000000000000002  5600 11856  11847 0x00000080
> [11401.201084]  ffff88011625bcd8 0000000000000086 ffff880028216500
> ffff88013e58ad20
> [11401.201091]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> ffff88011625bfd8
> [11401.201098]  0000000000016500 ffff88011625bfd8 0000000000016500
> ffff88013e58ad20
> [11401.201104] Call Trace:
> [11401.201114]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> [11401.201120]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> [11401.201128]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> [11401.201135]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> [11401.201140]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11401.201145]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> [11401.201150]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> [11401.201156]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> [11401.201161]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> [11401.201166]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> [11401.201172]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> [11401.201179]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> [11401.201185]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> [11401.201190]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> [11401.201195]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> [11401.201200]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> [11401.201205]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> [11401.201211]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> [11401.201218]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> [11441.637167] usb 1-1: new high speed USB device using ehci_hcd and address
> 6
> 
> This is from linus git tree.
Comment 2 Matthew Dharm 2009-10-29 00:51:39 UTC
This is likely a bug somewhere in the filesystem or block layers.

When a USB storage device is removed and then re-plugged, the kernel cannot
be certain that the device that was added was the same as the device that
was removed.

It looks from this that the filesystem that is still mounted needs to be
more cleanly disconnected from the underlying storage device when that
device is removed.

Matt

On Wed, Oct 28, 2009 at 04:27:06PM -0700, Andrew Morton wrote:
> On Sun, 25 Oct 2009 11:02:25 GMT
> bugzilla-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=14463
> > 
> >            Summary: usb thumbdrive forgotten to umount resulting in error
> >                     upon subsequent physical plugging in.
> >            Product: IO/Storage
> >            Version: 2.5
> >     Kernel Version: 2.6.32-rc4
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: Other
> >         AssignedTo: io_other@kernel-bugs.osdl.org
> >         ReportedBy: htmldeveloper@gmail.com
> >         Regression: No
> > 
> > 
> > I *think* it is because I did not umount my filesystem before I plugged out
> my
> > USB thumbdrive, and after plugging out, i check the filesystem is still
> > "mounted", so I plugged in back the device and umount it.
> > 
> > But the error message is that the device does not exists anymore, even just
> > before that "df" clearly showed it is still mounted.
> > 
> > The dmesg output is as follows (the output is a result of first plugging
> in,
> > and subsequent plugging out and in repeated a few times):
> > 
> > [10858.010317] usb-storage: waiting for device to settle before scanning
> > [10863.011224] scsi 7:0:0:0: Direct-Access     Multi    Flash Reader    
> 1.00
> > PQ: 0 ANSI: 0
> > [10863.015666] sd 7:0:0:0: Attached scsi generic sg2 type 0
> > [10863.499628] sd 7:0:0:0: [sdc] 3842048 512-byte logical blocks: (1.96
> GB/1.83
> > GiB)
> > [10863.502245] sd 7:0:0:0: [sdc] Write Protect is off
> > [10863.502250] sd 7:0:0:0: [sdc] Mode Sense: 03 00 00 00
> > [10863.502254] sd 7:0:0:0: [sdc] Assuming drive cache: write through
> > [10863.502366] usb-storage: device scan complete
> > [10863.511618] sd 7:0:0:0: [sdc] Assuming drive cache: write through
> > [10863.511639]  sdc: sdc1
> > [10863.524625] sd 7:0:0:0: [sdc] Assuming drive cache: write through
> > [10863.524634] sd 7:0:0:0: [sdc] Attached SCSI removable disk
> > [10878.554662] usb 1-1: USB disconnect, address 3
> > [10895.363158] usb 1-1: new high speed USB device using ehci_hcd and
> address 4
> > [10895.480005] usb 1-1: configuration #1 chosen from 1 choice
> > [10895.482437] scsi8 : SCSI emulation for USB Mass Storage devices
> > [10895.484772] usb-storage: device found at 4
> > [10895.484774] usb-storage: waiting for device to settle before scanning
> > [10900.485308] scsi 8:0:0:0: Direct-Access     Multi    Flash Reader    
> 1.00
> > PQ: 0 ANSI: 0
> > [10900.489504] sd 8:0:0:0: Attached scsi generic sg2 type 0
> > [10900.970628] sd 8:0:0:0: [sdd] 3842048 512-byte logical blocks: (1.96
> GB/1.83
> > GiB)
> > [10900.972751] sd 8:0:0:0: [sdd] Write Protect is off
> > [10900.972756] sd 8:0:0:0: [sdd] Mode Sense: 03 00 00 00
> > [10900.972759] sd 8:0:0:0: [sdd] Assuming drive cache: write through
> > [10900.977313] usb-storage: device scan complete
> > [10900.982458] sd 8:0:0:0: [sdd] Assuming drive cache: write through
> > [10900.982477]  sdd: sdd1
> > [10900.995354] sd 8:0:0:0: [sdd] Assuming drive cache: write through
> > [10900.995367] sd 8:0:0:0: [sdd] Attached SCSI removable disk
> > [10930.103624] usb 1-1: USB disconnect, address 4
> > [10932.225170] usb 1-1: new high speed USB device using ehci_hcd and
> address 5
> > [10932.342517] usb 1-1: configuration #1 chosen from 1 choice
> > [10932.361016] scsi9 : SCSI emulation for USB Mass Storage devices
> > [10932.366315] usb-storage: device found at 5
> > [10932.366318] usb-storage: waiting for device to settle before scanning
> > [10937.367188] scsi 9:0:0:0: Direct-Access     Multi    Flash Reader    
> 1.00
> > PQ: 0 ANSI: 0
> > [10937.371386] sd 9:0:0:0: Attached scsi generic sg2 type 0
> > [10937.379608] usb-storage: device scan complete
> > [10937.855336] sd 9:0:0:0: [sdd] 3842048 512-byte logical blocks: (1.96
> GB/1.83
> > GiB)
> > [10937.857531] sd 9:0:0:0: [sdd] Write Protect is off
> > [10937.857536] sd 9:0:0:0: [sdd] Mode Sense: 03 00 00 00
> > [10937.857540] sd 9:0:0:0: [sdd] Assuming drive cache: write through
> > [10937.867209] sd 9:0:0:0: [sdd] Assuming drive cache: write through
> > [10937.867233]  sdd: sdd1
> > [10937.880579] sd 9:0:0:0: [sdd] Assuming drive cache: write through
> > [10937.880589] sd 9:0:0:0: [sdd] Attached SCSI removable disk
> > [10972.792702] usb 1-1: USB disconnect, address 5
> > [11041.201064] INFO: task umount:11856 blocked for more than 120 seconds.
> > [11041.201068] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> > message.
> > [11041.201072] umount        D 0000000000000002  5600 11856  11847
> 0x00000080
> > [11041.201081]  ffff88011625bcd8 0000000000000086 ffff880028216500
> > ffff88013e58ad20
> > [11041.201088]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> > ffff88011625bfd8
> > [11041.201094]  0000000000016500 ffff88011625bfd8 0000000000016500
> > ffff88013e58ad20
> > [11041.201100] Call Trace:
> > [11041.201111]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> > [11041.201117]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> > [11041.201124]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> > [11041.201130]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> > [11041.201136]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11041.201141]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11041.201145]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> > [11041.201151]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> > [11041.201156]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> > [11041.201161]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> > [11041.201167]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> > [11041.201177]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> > [11041.201183]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> > [11041.201187]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> > [11041.201193]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> > [11041.201197]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> > [11041.201202]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> > [11041.201208]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> > [11041.201214]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> > [11129.535917] kmemleak: 32 new suspected memory leaks (see
> > /sys/kernel/debug/kmemleak)
> > [11161.201065] INFO: task umount:11856 blocked for more than 120 seconds.
> > [11161.201069] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> > message.
> > [11161.201073] umount        D 0000000000000002  5600 11856  11847
> 0x00000080
> > [11161.201082]  ffff88011625bcd8 0000000000000086 ffff880028216500
> > ffff88013e58ad20
> > [11161.201089]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> > ffff88011625bfd8
> > [11161.201095]  0000000000016500 ffff88011625bfd8 0000000000016500
> > ffff88013e58ad20
> > [11161.201102] Call Trace:
> > [11161.201111]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> > [11161.201118]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> > [11161.201124]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> > [11161.201131]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> > [11161.201136]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11161.201141]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11161.201146]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> > [11161.201151]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> > [11161.201156]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> > [11161.201162]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> > [11161.201168]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> > [11161.201176]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> > [11161.201181]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> > [11161.201186]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> > [11161.201191]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> > [11161.201196]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> > [11161.201201]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> > [11161.201207]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> > [11161.201213]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> > [11281.201063] INFO: task umount:11856 blocked for more than 120 seconds.
> > [11281.201067] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> > message.
> > [11281.201071] umount        D 0000000000000002  5600 11856  11847
> 0x00000080
> > [11281.201080]  ffff88011625bcd8 0000000000000086 ffff880028216500
> > ffff88013e58ad20
> > [11281.201087]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> > ffff88011625bfd8
> > [11281.201093]  0000000000016500 ffff88011625bfd8 0000000000016500
> > ffff88013e58ad20
> > [11281.201099] Call Trace:
> > [11281.201109]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> > [11281.201115]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> > [11281.201122]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> > [11281.201128]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> > [11281.201134]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11281.201139]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11281.201144]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> > [11281.201149]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> > [11281.201154]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> > [11281.201159]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> > [11281.201166]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> > [11281.201173]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> > [11281.201178]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> > [11281.201183]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> > [11281.201188]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> > [11281.201193]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> > [11281.201197]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> > [11281.201203]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> > [11281.201210]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> > [11401.201067] INFO: task umount:11856 blocked for more than 120 seconds.
> > [11401.201071] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
> this
> > message.
> > [11401.201075] umount        D 0000000000000002  5600 11856  11847
> 0x00000080
> > [11401.201084]  ffff88011625bcd8 0000000000000086 ffff880028216500
> > ffff88013e58ad20
> > [11401.201091]  ffff88011625bd08 ffffffff81053dcf 0000000000010b58
> > ffff88011625bfd8
> > [11401.201098]  0000000000016500 ffff88011625bfd8 0000000000016500
> > ffff88013e58ad20
> > [11401.201104] Call Trace:
> > [11401.201114]  [<ffffffff81053dcf>] ? select_task_rq_fair+0x18c/0x9a6
> > [11401.201120]  [<ffffffff81056af8>] ? enqueue_task_fair+0x4a1/0x4b7
> > [11401.201128]  [<ffffffff81179f8e>] bdi_sched_wait+0x15/0x20
> > [11401.201135]  [<ffffffff815065de>] __wait_on_bit+0x6f/0xd4
> > [11401.201140]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11401.201145]  [<ffffffff81179f79>] ? bdi_sched_wait+0x0/0x20
> > [11401.201150]  [<ffffffff815066c0>] out_of_line_wait_on_bit+0x7d/0x91
> > [11401.201156]  [<ffffffff8108c0cb>] ? wake_bit_function+0x0/0x67
> > [11401.201161]  [<ffffffff81179f3a>] ? bdi_queue_work+0xed/0x12c
> > [11401.201166]  [<ffffffff8117a036>] sync_inodes_sb+0x9d/0x20b
> > [11401.201172]  [<ffffffff8117fafa>] __sync_filesystem+0x7d/0xcb
> > [11401.201179]  [<ffffffff8117fe22>] sync_filesystem+0x88/0x94
> > [11401.201185]  [<ffffffff811534be>] generic_shutdown_super+0x40/0x14a
> > [11401.201190]  [<ffffffff811535f6>] kill_block_super+0x2e/0x5b
> > [11401.201195]  [<ffffffff811540bf>] deactivate_super+0xa3/0xcd
> > [11401.201200]  [<ffffffff811725e6>] mntput_no_expire+0x121/0x182
> > [11401.201205]  [<ffffffff81172e90>] sys_umount+0x436/0x477
> > [11401.201211]  [<ffffffff810bf67a>] ? audit_syscall_entry+0x298/0x2cb
> > [11401.201218]  [<ffffffff81014872>] system_call_fastpath+0x16/0x1b
> > [11441.637167] usb 1-1: new high speed USB device using ehci_hcd and
> address 6
> > 
> > This is from linus git tree.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

It's not that hard.  No matter what the problem is, tell the customer 
to reinstall Windows.
					-- Nurse
User Friendly, 3/22/1998
Comment 3 Peter Teoh 2009-10-29 05:56:35 UTC
I forgotten to highlight (if it is not implicit enough) that upon second time plugging in the USB device, the OS did not identify the USB as a new device, which is clearly shown in the dmesg output.
Comment 4 Alan Stern 2009-11-09 16:33:49 UTC
On Wed, 28 Oct 2009, Andrew Morton wrote:

> > http://bugzilla.kernel.org/show_bug.cgi?id=14463
> > 
> >            Summary: usb thumbdrive forgotten to umount resulting in error
> >                     upon subsequent physical plugging in.

> > I *think* it is because I did not umount my filesystem before I plugged out
> my
> > USB thumbdrive, and after plugging out, i check the filesystem is still
> > "mounted", so I plugged in back the device and umount it.

This looks like a duplicate of bug #14481.  For a resolution, see

	http://marc.info/?l=linux-kernel&m=125732051204244&w=4

Alan Stern
Comment 5 Peter Teoh 2009-11-21 15:27:29 UTC
Yes, I tested it fine now in 2.6.32-rc8.   Essentially I pulled out the thumbdrive without unmounting, and push it back, everything went fine - got dismounted and remounted again nicely, thank you very much!!!
Comment 6 Peter Teoh 2009-11-21 15:28:38 UTC

*** This bug has been marked as a duplicate of bug 14481 ***