All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] D state process after unplug and umount usb disk
@ 2011-09-03 10:31 Dave Young
  2011-09-03 17:50 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Dave Young @ 2011-09-03 10:31 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton, Fengguang Wu

Hi,

Known issue?

Reproduce by:
mount /dev/sdb2 /mnt/sdb2 -t ext3
cat /mnt/sdb2/* >/dev/null
unplug usb disk
umount -f /mnt/sdb2

dmesg as below:

[ 1440.567271] SysRq : Show Blocked State
[ 1440.567278]   task                        PC stack   pid father
[ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
[ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
ffffffff00000000
[ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
ffff880037a1e000
[ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
00000000000134c0
[ 1440.567347] Call Trace:
[ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
[ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
[ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
[ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
[ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
[ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
[ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
[ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
[ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
[ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
[ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
[ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
[ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
[ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
[ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
[ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
[ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
[ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
[ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
[ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
[ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
[ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
[ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
[ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
[ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
[ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
[ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
[ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
[ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
[ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
[ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
[ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
[ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
[ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
[ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
[ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
ffffffff00000000
[ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
ffff880037a1e000
[ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
00000000000134c0
[ 1440.710225] Call Trace:
[ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
[ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
[ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
[ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
[ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
[ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
[ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
[ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
[ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
[ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
[ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
[ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
[ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
[ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
[ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
[ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
[ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
[ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
[ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
[ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
[ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
[ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
[ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
[ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
[ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
[ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
[ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
[ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
[ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
[ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
[ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
[ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
[ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17
[ 1440.710399] INFO: lockdep is turned off.

-- 
Regards
Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-03 10:31 [BUG] D state process after unplug and umount usb disk Dave Young
@ 2011-09-03 17:50 ` Andrew Morton
  2011-09-05  1:17   ` Dave Young
  2011-09-04 13:11 ` Lin Ming
  2011-09-05 13:31 ` Wu Fengguang
  2 siblings, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2011-09-03 17:50 UTC (permalink / raw)
  To: Dave Young; +Cc: Linux Kernel Mailing List, Fengguang Wu, linux-usb

(cc linux-usb)

On Sat, 3 Sep 2011 18:31:11 +0800 Dave Young <hidave.darkstar@gmail.com> wrote:

> Hi,
> 
> Known issue?

Not as far as I know.  Kernel version?

> Reproduce by:
> mount /dev/sdb2 /mnt/sdb2 -t ext3
> cat /mnt/sdb2/* >/dev/null
> unplug usb disk
> umount -f /mnt/sdb2
> 
> dmesg as below:
> 
> [ 1440.567271] SysRq : Show Blocked State
> [ 1440.567278]   task                        PC stack   pid father
> [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
> [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
> ffffffff00000000
> [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
> ffff880037a1e000
> [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
> 00000000000134c0
> [ 1440.567347] Call Trace:
> [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
> [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
> [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
> [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
> [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
> [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
> [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
> [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
> [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
> [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
> [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
> [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
> [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
> [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
> [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
> [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
> [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
> [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
> [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
> [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
> [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
> [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
> [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
> [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
> [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
> [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
> [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
> [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
> [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
> [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
> [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
> [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
> [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
> [ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
> [ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
> [ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
> ffffffff00000000
> [ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
> ffff880037a1e000
> [ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
> 00000000000134c0
> [ 1440.710225] Call Trace:
> [ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
> [ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
> [ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
> [ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
> [ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
> [ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
> [ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
> [ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
> [ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
> [ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
> [ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
> [ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
> [ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
> [ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
> [ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
> [ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
> [ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
> [ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
> [ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
> [ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
> [ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
> [ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
> [ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
> [ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
> [ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
> [ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
> [ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
> [ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
> [ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
> [ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
> [ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
> [ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
> [ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17
> [ 1440.710399] INFO: lockdep is turned off.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-03 10:31 [BUG] D state process after unplug and umount usb disk Dave Young
  2011-09-03 17:50 ` Andrew Morton
@ 2011-09-04 13:11 ` Lin Ming
  2011-09-04 13:49   ` Alan Stern
  2011-09-05 13:31 ` Wu Fengguang
  2 siblings, 1 reply; 13+ messages in thread
From: Lin Ming @ 2011-09-04 13:11 UTC (permalink / raw)
  To: Dave Young
  Cc: Linux Kernel Mailing List, Andrew Morton, fengguang.wu, linux-usb

On Sat, Sep 3, 2011 at 6:31 PM, Dave Young <hidave.darkstar@gmail.com> wrote:
> Hi,
>
> Known issue?
>
> Reproduce by:
> mount /dev/sdb2 /mnt/sdb2 -t ext3
> cat /mnt/sdb2/* >/dev/null
> unplug usb disk
> umount -f /mnt/sdb2
>
> dmesg as below:
>
> [ 1440.567271] SysRq : Show Blocked State
> [ 1440.567278]   task                        PC stack   pid father
> [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
> [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
> ffffffff00000000
> [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
> ffff880037a1e000
> [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
> 00000000000134c0
> [ 1440.567347] Call Trace:
> [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
> [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
> [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
> [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
> [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
> [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
> [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
> [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
> [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
> [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
> [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
> [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
> [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
> [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
> [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
> [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
> [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
> [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
> [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
> [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
> [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
> [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
> [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
> [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
> [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
> [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
> [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
> [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
> [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
> [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
> [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
> [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
> [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
> [ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
> [ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
> [ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
> ffffffff00000000
> [ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
> ffff880037a1e000
> [ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
> 00000000000134c0
> [ 1440.710225] Call Trace:
> [ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
> [ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
> [ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
> [ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
> [ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
> [ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
> [ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
> [ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
> [ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
> [ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
> [ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
> [ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
> [ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
> [ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
> [ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
> [ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
> [ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
> [ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
> [ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
> [ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
> [ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
> [ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
> [ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
> [ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
> [ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
> [ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
> [ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
> [ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
> [ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
> [ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
> [ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
> [ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
> [ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17

(correct Fengguang's email, he uses Intel's email)

Where does this exit signal come from?
Does USB interrupt handler will send kill signal to all processes
accessing it when it's unplugged(by hand)?

Lin Ming

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-04 13:11 ` Lin Ming
@ 2011-09-04 13:49   ` Alan Stern
  2011-09-04 14:25     ` Lin Ming
  2011-09-05  9:04     ` Dave Young
  0 siblings, 2 replies; 13+ messages in thread
From: Alan Stern @ 2011-09-04 13:49 UTC (permalink / raw)
  To: Lin Ming
  Cc: Dave Young, Linux Kernel Mailing List, Andrew Morton,
	fengguang.wu, linux-usb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 3521 bytes --]

On Sun, 4 Sep 2011, Lin Ming wrote:

> On Sat, Sep 3, 2011 at 6:31 PM, Dave Young <hidave.darkstar@gmail.com> wrote:
> > Hi,
> >
> > Known issue?
> >
> > Reproduce by:
> > mount /dev/sdb2 /mnt/sdb2 -t ext3
> > cat /mnt/sdb2/* >/dev/null
> > unplug usb disk
> > umount -f /mnt/sdb2
> >
> > dmesg as below:

BTW, this may or may not be related:

https://bugzilla.kernel.org/show_bug.cgi?id=25832  (kernel crashes when 
a mounted ext3/4 file system is physically removed)

> > [ 1440.567271] SysRq : Show Blocked State
> > [ 1440.567278]   task                        PC stack   pid father
> > [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
> > [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
> > ffffffff00000000
> > [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
> > ffff880037a1e000
> > [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
> > 00000000000134c0
> > [ 1440.567347] Call Trace:
> > [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
> > [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
> > [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
> > [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
> > [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
> > [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
> > [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
> > [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
> > [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
> > [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
> > [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
> > [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
> > [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
> > [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
> > [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
> > [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
> > [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
> > [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
> > [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
> > [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
> > [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
> > [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
> > [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
> > [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
> > [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
> > [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
> > [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
> > [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
> > [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
> > [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
> > [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
> > [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
> > [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> > [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17

> Where does this exit signal come from?
> Does USB interrupt handler will send kill signal to all processes
> accessing it when it's unplugged(by hand)?

The USB stack does not send any signals at all unless a process 
specifically asks for them.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-04 13:49   ` Alan Stern
@ 2011-09-04 14:25     ` Lin Ming
  2011-09-05  1:17       ` Alan Stern
  2011-09-05  1:21       ` Dave Young
  2011-09-05  9:04     ` Dave Young
  1 sibling, 2 replies; 13+ messages in thread
From: Lin Ming @ 2011-09-04 14:25 UTC (permalink / raw)
  To: Alan Stern
  Cc: Dave Young, Linux Kernel Mailing List, Andrew Morton,
	fengguang.wu, linux-usb

On Sun, Sep 4, 2011 at 9:49 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
>
>> Where does this exit signal come from?
>> Does USB interrupt handler will send kill signal to all processes
>> accessing it when it's unplugged(by hand)?
>
> The USB stack does not send any signals at all unless a process
> specifically asks for them.

How to ask?

I have not checked, but think umount code path will not send signal to process.
Curiously, where does the exit signal come from?

Dave,
Did you press "Ctrl + C" on cat?

Lin Ming

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-04 14:25     ` Lin Ming
@ 2011-09-05  1:17       ` Alan Stern
  2011-09-05  1:21       ` Dave Young
  1 sibling, 0 replies; 13+ messages in thread
From: Alan Stern @ 2011-09-05  1:17 UTC (permalink / raw)
  To: Lin Ming
  Cc: Dave Young, Linux Kernel Mailing List, Andrew Morton,
	fengguang.wu, linux-usb

On Sun, 4 Sep 2011, Lin Ming wrote:

> On Sun, Sep 4, 2011 at 9:49 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
> >
> >> Where does this exit signal come from?
> >> Does USB interrupt handler will send kill signal to all processes
> >> accessing it when it's unplugged(by hand)?
> >
> > The USB stack does not send any signals at all unless a process
> > specifically asks for them.
> 
> How to ask?

With the USBDEVFS_DISCSIGNAL ioctl.

> I have not checked, but think umount code path will not send signal to process.

I don't think so either.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-03 17:50 ` Andrew Morton
@ 2011-09-05  1:17   ` Dave Young
  2011-09-05  3:01     ` Dave Young
  0 siblings, 1 reply; 13+ messages in thread
From: Dave Young @ 2011-09-05  1:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List, Fengguang Wu, linux-usb

On Sun, Sep 4, 2011 at 1:50 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
> (cc linux-usb)
>
> On Sat, 3 Sep 2011 18:31:11 +0800 Dave Young <hidave.darkstar@gmail.com> wrote:
>
>> Hi,
>>
>> Known issue?
>
> Not as far as I know.  Kernel version?

3.1-rc4+
sorry, I thought dump_stack would print out kernel version

>
>> Reproduce by:
>> mount /dev/sdb2 /mnt/sdb2 -t ext3
>> cat /mnt/sdb2/* >/dev/null
>> unplug usb disk
>> umount -f /mnt/sdb2
>>
>> dmesg as below:
>>
>> [ 1440.567271] SysRq : Show Blocked State
>> [ 1440.567278]   task                        PC stack   pid father
>> [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>> [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>> ffffffff00000000
>> [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
>> ffff880037a1e000
>> [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>> 00000000000134c0
>> [ 1440.567347] Call Trace:
>> [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>> [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>> [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>> [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>> [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>> [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>> [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>> [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>> [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>> [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>> [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>> [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
>> [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>> [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>> [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>> [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>> [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>> [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>> [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>> [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
>> [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>> [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>> [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>> [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>> [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>> [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>> [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>> [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>> [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>> [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>> [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>> [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>> [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>> [ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
>> [ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
>> disables this message.
>> [ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>> [ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>> ffffffff00000000
>> [ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
>> ffff880037a1e000
>> [ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>> 00000000000134c0
>> [ 1440.710225] Call Trace:
>> [ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>> [ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>> [ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>> [ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>> [ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>> [ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>> [ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>> [ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>> [ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>> [ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>> [ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>> [ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
>> [ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>> [ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>> [ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>> [ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>> [ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>> [ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>> [ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>> [ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
>> [ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>> [ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>> [ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>> [ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>> [ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>> [ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>> [ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>> [ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>> [ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>> [ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>> [ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>> [ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>> [ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> [ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>> [ 1440.710399] INFO: lockdep is turned off.
>
>



-- 
Regards
Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-04 14:25     ` Lin Ming
  2011-09-05  1:17       ` Alan Stern
@ 2011-09-05  1:21       ` Dave Young
  1 sibling, 0 replies; 13+ messages in thread
From: Dave Young @ 2011-09-05  1:21 UTC (permalink / raw)
  To: Lin Ming
  Cc: Alan Stern, Linux Kernel Mailing List, Andrew Morton,
	fengguang.wu, linux-usb

On Sun, Sep 4, 2011 at 10:25 PM, Lin Ming <mlin@ss.pku.edu.cn> wrote:
> On Sun, Sep 4, 2011 at 9:49 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
>>
>>> Where does this exit signal come from?
>>> Does USB interrupt handler will send kill signal to all processes
>>> accessing it when it's unplugged(by hand)?
>>
>> The USB stack does not send any signals at all unless a process
>> specifically asks for them.
>
> How to ask?
>
> I have not checked, but think umount code path will not send signal to process.
> Curiously, where does the exit signal come from?
>
> Dave,
> Did you press "Ctrl + C" on cat?

Yes and no. I press ctrl+C after it hang as D state

>
> Lin Ming
>



-- 
Regards
Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-05  1:17   ` Dave Young
@ 2011-09-05  3:01     ` Dave Young
  2011-09-06  8:10       ` Dave Young
  0 siblings, 1 reply; 13+ messages in thread
From: Dave Young @ 2011-09-05  3:01 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List, Fengguang Wu, linux-usb

On Mon, Sep 5, 2011 at 9:17 AM, Dave Young <hidave.darkstar@gmail.com> wrote:
> On Sun, Sep 4, 2011 at 1:50 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
>> (cc linux-usb)
>>
>> On Sat, 3 Sep 2011 18:31:11 +0800 Dave Young <hidave.darkstar@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Known issue?
>>
>> Not as far as I know.  Kernel version?
>
> 3.1-rc4+
> sorry, I thought dump_stack would print out kernel version

3.0 no such problem, I will try bisecting this issue.

>
>>
>>> Reproduce by:
>>> mount /dev/sdb2 /mnt/sdb2 -t ext3
>>> cat /mnt/sdb2/* >/dev/null
>>> unplug usb disk
>>> umount -f /mnt/sdb2
>>>
>>> dmesg as below:
>>>
>>> [ 1440.567271] SysRq : Show Blocked State
>>> [ 1440.567278]   task                        PC stack   pid father
>>> [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>>> [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>>> ffffffff00000000
>>> [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
>>> ffff880037a1e000
>>> [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>>> 00000000000134c0
>>> [ 1440.567347] Call Trace:
>>> [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>>> [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>>> [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>>> [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>>> [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>>> [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>>> [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>>> [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>>> [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>>> [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>>> [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>>> [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
>>> [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>>> [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>>> [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>>> [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>>> [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>>> [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>>> [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>>> [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
>>> [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>>> [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>>> [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>>> [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>>> [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>>> [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>>> [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>>> [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>>> [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>>> [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>>> [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>>> [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>>> [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>>> [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>>> [ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
>>> [ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
>>> disables this message.
>>> [ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>>> [ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>>> ffffffff00000000
>>> [ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
>>> ffff880037a1e000
>>> [ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>>> 00000000000134c0
>>> [ 1440.710225] Call Trace:
>>> [ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>>> [ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>>> [ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>>> [ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>>> [ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>>> [ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>>> [ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>>> [ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>>> [ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>>> [ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>>> [ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>>> [ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
>>> [ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>>> [ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>>> [ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>>> [ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>>> [ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>>> [ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>>> [ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>>> [ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
>>> [ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>>> [ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>>> [ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>>> [ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>>> [ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>>> [ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>>> [ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>>> [ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>>> [ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>>> [ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>>> [ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>>> [ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>>> [ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>>> [ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>>> [ 1440.710399] INFO: lockdep is turned off.
>>
>>
>
>
>
> --
> Regards
> Yang RuiRui
>



-- 
Regards
Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-04 13:49   ` Alan Stern
  2011-09-04 14:25     ` Lin Ming
@ 2011-09-05  9:04     ` Dave Young
  1 sibling, 0 replies; 13+ messages in thread
From: Dave Young @ 2011-09-05  9:04 UTC (permalink / raw)
  To: Alan Stern
  Cc: Lin Ming, Linux Kernel Mailing List, Andrew Morton, fengguang.wu,
	linux-usb

On 9/4/11, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Sun, 4 Sep 2011, Lin Ming wrote:
>
>> On Sat, Sep 3, 2011 at 6:31 PM, Dave Young <hidave.darkstar@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > Known issue?
>> >
>> > Reproduce by:
>> > mount /dev/sdb2 /mnt/sdb2 -t ext3
>> > cat /mnt/sdb2/* >/dev/null
>> > unplug usb disk
>> > umount -f /mnt/sdb2
>> >
>> > dmesg as below:
>
> BTW, this may or may not be related:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=25832  (kernel crashes when
> a mounted ext3/4 file system is physically removed)

Thanks for the info, but It seems a different problem. I can not
reproduce it with 3.0 kernel for 30 times test. it can easily
reproduce with recent kernel in 1-5 times test

>
>> > [ 1440.567271] SysRq : Show Blocked State
>> > [ 1440.567278]   task                        PC stack   pid father
>> > [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310
>> > 0x00000004
>> > [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>> > ffffffff00000000
>> > [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
>> > ffff880037a1e000
>> > [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>> > 00000000000134c0
>> > [ 1440.567347] Call Trace:
>> > [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>> > [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>> > [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>> > [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>> > [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>> > [ 1440.567384]  [<ffffffff81058739>] ?
>> > autoremove_wake_function+0x34/0x34
>> > [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>> > [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>> > [ 1440.567400]  [<ffffffff810ca1ac>]
>> > truncate_inode_pages_range+0x2a6/0x32d
>> > [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>> > [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>> > [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
>> > [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>> > [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>> > [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>> > [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>> > [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>> > [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>> > [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>> > [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
>> > [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>> > [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>> > [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>> > [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>> > [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>> > [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>> > [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>> > [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>> > [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>> > [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>> > [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>> > [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>> > [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> > [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>
>> Where does this exit signal come from?
>> Does USB interrupt handler will send kill signal to all processes
>> accessing it when it's unplugged(by hand)?
>
> The USB stack does not send any signals at all unless a process
> specifically asks for them.
>
> Alan Stern
>
>


-- 
Regards
Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-03 10:31 [BUG] D state process after unplug and umount usb disk Dave Young
  2011-09-03 17:50 ` Andrew Morton
  2011-09-04 13:11 ` Lin Ming
@ 2011-09-05 13:31 ` Wu Fengguang
  2011-09-06  2:08   ` Dave Young
  2 siblings, 1 reply; 13+ messages in thread
From: Wu Fengguang @ 2011-09-05 13:31 UTC (permalink / raw)
  To: Dave Young; +Cc: Linux Kernel Mailing List, Andrew Morton

On Sat, Sep 03, 2011 at 06:31:11PM +0800, Dave Young wrote:
> Hi,
> 
> Known issue?
> 
> Reproduce by:
> mount /dev/sdb2 /mnt/sdb2 -t ext3
> cat /mnt/sdb2/* >/dev/null
> unplug usb disk
> umount -f /mnt/sdb2

When I do the above sequence on a normal disk, umount will rightfully
fail. So the error is specific to unplugging a mounted USB disk.

root@fat /home/wfg# mount /dev/sda7 /fs/sda7
root@fat /home/wfg# ls /fs/sda7
root@fat /home/wfg# cp /dev/zero /fs/sda7&
[1] 7900
root@fat /home/wfg# cat /fs/sda7/* > /dev/null&; umount -f /fs/sda7
[2] 7909
umount2: Device or resource busy
umount: /fs/sda7: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
umount2: Device or resource busy

> dmesg as below:
> 
> [ 1440.567271] SysRq : Show Blocked State
> [ 1440.567278]   task                        PC stack   pid father
> [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
> [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
> ffffffff00000000
> [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
> ffff880037a1e000
> [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
> 00000000000134c0
> [ 1440.567347] Call Trace:
> [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
> [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
> [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
> [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
> [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
> [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
> [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29

> [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
> [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
> [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf

Maybe the page is locked for read IO somewhere else, which never
managed to complete due to the unplugged USB disk?

This can be (not strictly) confirmed by running this and check if
there are locked and !uptodate pages:

        page-types -lr -b locked

If so the root cause should be, the IO requests are stuck rather than
being failed after some timeout value.

Thanks,
Fengguang

> [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
> [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
> [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
> [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
> [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
> [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
> [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
> [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
> [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
> [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
> [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
> [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
> [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
> [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
> [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
> [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
> [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
> [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
> [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
> [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
> [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
> [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
> [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
> [ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
> [ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
> [ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
> ffffffff00000000
> [ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
> ffff880037a1e000
> [ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
> 00000000000134c0
> [ 1440.710225] Call Trace:
> [ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
> [ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
> [ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
> [ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
> [ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
> [ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
> [ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
> [ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
> [ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
> [ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
> [ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
> [ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
> [ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
> [ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
> [ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
> [ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
> [ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
> [ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
> [ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
> [ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
> [ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
> [ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
> [ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
> [ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
> [ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
> [ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
> [ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
> [ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
> [ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
> [ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
> [ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
> [ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
> [ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17
> [ 1440.710399] INFO: lockdep is turned off.
> 
> -- 
> Regards
> Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-05 13:31 ` Wu Fengguang
@ 2011-09-06  2:08   ` Dave Young
  0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2011-09-06  2:08 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: Linux Kernel Mailing List, Andrew Morton

On Mon, Sep 5, 2011 at 9:31 PM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> On Sat, Sep 03, 2011 at 06:31:11PM +0800, Dave Young wrote:
>> Hi,
>>
>> Known issue?
>>
>> Reproduce by:
>> mount /dev/sdb2 /mnt/sdb2 -t ext3
>> cat /mnt/sdb2/* >/dev/null
>> unplug usb disk
>> umount -f /mnt/sdb2
>
> When I do the above sequence on a normal disk, umount will rightfully
> fail. So the error is specific to unplugging a mounted USB disk.

Yes, unplugging is necessary.

>
> root@fat /home/wfg# mount /dev/sda7 /fs/sda7
> root@fat /home/wfg# ls /fs/sda7
> root@fat /home/wfg# cp /dev/zero /fs/sda7&
> [1] 7900
> root@fat /home/wfg# cat /fs/sda7/* > /dev/null&; umount -f /fs/sda7
> [2] 7909
> umount2: Device or resource busy
> umount: /fs/sda7: device is busy.
>        (In some cases useful info about processes that use
>         the device is found by lsof(8) or fuser(1))
> umount2: Device or resource busy
>
>> dmesg as below:
>>
>> [ 1440.567271] SysRq : Show Blocked State
>> [ 1440.567278]   task                        PC stack   pid father
>> [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>> [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>> ffffffff00000000
>> [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
>> ffff880037a1e000
>> [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>> 00000000000134c0
>> [ 1440.567347] Call Trace:
>> [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>> [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>> [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>> [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>> [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>> [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>> [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>
>> [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>> [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>> [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>
> Maybe the page is locked for read IO somewhere else, which never
> managed to complete due to the unplugged USB disk?
>
> This can be (not strictly) confirmed by running this and check if
> there are locked and !uptodate pages:
>
>        page-types -lr -b locked
>
> If so the root cause should be, the IO requests are stuck rather than
> being failed after some timeout value.

offset	len	flags
38e5d	3	L____l__________________d_________
38e60	1	L____l____________________________
531e7	1	L____l__________________d_____I___
531e8	18	L____l__________________d_________


             flags	page-count       MB  symbolic-flags			long-symbolic-flags
0x0000000400000021	        27        0
L____l__________________d_________	locked,lru,mappedtodisk
0x0000000000000021	         1        0
L____l____________________________	locked,lru
0x0001000400000021	         1        0
L____l__________________d_____I___	locked,lru,mappedtodisk,readahead
             total	        29        0


BTW, forgot to tell, my kernel applied NeilBrown's
move-bdev_inode_switch_bdi-after-kill_bdev patch

>
> Thanks,
> Fengguang
>
>> [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>> [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
>> [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>> [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>> [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>> [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>> [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>> [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>> [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>> [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
>> [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>> [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>> [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>> [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>> [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>> [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>> [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>> [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>> [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>> [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>> [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>> [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>> [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>> [ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
>> [ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
>> disables this message.
>> [ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>> [ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>> ffffffff00000000
>> [ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
>> ffff880037a1e000
>> [ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>> 00000000000134c0
>> [ 1440.710225] Call Trace:
>> [ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>> [ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>> [ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>> [ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>> [ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>> [ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>> [ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>> [ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>> [ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>> [ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>> [ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>> [ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
>> [ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>> [ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>> [ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>> [ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>> [ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>> [ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>> [ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>> [ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
>> [ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>> [ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>> [ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>> [ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>> [ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>> [ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>> [ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>> [ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>> [ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>> [ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>> [ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>> [ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>> [ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> [ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>> [ 1440.710399] INFO: lockdep is turned off.
>>
>> --
>> Regards
>> Yang RuiRui
>



-- 
Regards
Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] D state process after unplug and umount usb disk
  2011-09-05  3:01     ` Dave Young
@ 2011-09-06  8:10       ` Dave Young
  0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2011-09-06  8:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List, Fengguang Wu, linux-usb

On Mon, Sep 5, 2011 at 11:01 AM, Dave Young <hidave.darkstar@gmail.com> wrote:
> On Mon, Sep 5, 2011 at 9:17 AM, Dave Young <hidave.darkstar@gmail.com> wrote:
>> On Sun, Sep 4, 2011 at 1:50 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
>>> (cc linux-usb)
>>>
>>> On Sat, 3 Sep 2011 18:31:11 +0800 Dave Young <hidave.darkstar@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Known issue?
>>>
>>> Not as far as I know.  Kernel version?
>>
>> 3.1-rc4+
>> sorry, I thought dump_stack would print out kernel version
>
> 3.0 no such problem, I will try bisecting this issue.

Unfortunately I'm lost in bisecting, some middle version does not
boot,  and there's other oops happening sometimes.

>
>>
>>>
>>>> Reproduce by:
>>>> mount /dev/sdb2 /mnt/sdb2 -t ext3
>>>> cat /mnt/sdb2/* >/dev/null
>>>> unplug usb disk
>>>> umount -f /mnt/sdb2
>>>>
>>>> dmesg as below:
>>>>
>>>> [ 1440.567271] SysRq : Show Blocked State
>>>> [ 1440.567278]   task                        PC stack   pid father
>>>> [ 1440.567312] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>>>> [ 1440.567320]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>>>> ffffffff00000000
>>>> [ 1440.567332]  00000000000134c0 00000000000134c0 00000000000134c0
>>>> ffff880037a1e000
>>>> [ 1440.567339]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>>>> 00000000000134c0
>>>> [ 1440.567347] Call Trace:
>>>> [ 1440.567357]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>>>> [ 1440.567363]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>>>> [ 1440.567368]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>>>> [ 1440.567373]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>>>> [ 1440.567378]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>>>> [ 1440.567384]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>>>> [ 1440.567390]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>>>> [ 1440.567395]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>>>> [ 1440.567400]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>>>> [ 1440.567406]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>>>> [ 1440.567411]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>>>> [ 1440.567417]  [<ffffffff8111288e>] evict+0xa3/0x15e
>>>> [ 1440.567422]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>>>> [ 1440.567426]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>>>> [ 1440.567431]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>>>> [ 1440.567436]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>>>> [ 1440.567441]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>>>> [ 1440.567445]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>>>> [ 1440.567452]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>>>> [ 1440.567457]  [<ffffffff811163bb>] mntput+0x21/0x23
>>>> [ 1440.567461]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>>>> [ 1440.567467]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>>>> [ 1440.567472]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>>>> [ 1440.567477]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>>>> [ 1440.567481]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>>>> [ 1440.567487]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>>>> [ 1440.567493]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>>>> [ 1440.567497]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>>>> [ 1440.567502]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>>>> [ 1440.567509]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>>>> [ 1440.567514]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>>>> [ 1440.567519]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>>>> [ 1440.567524]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>>>> [ 1440.567529]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>>>> [ 1440.710163] INFO: task cat:2381 blocked for more than 120 seconds.
>>>> [ 1440.710170] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
>>>> disables this message.
>>>> [ 1440.710175] cat             D ffff880037a1e378  4296  2381   2310 0x00000004
>>>> [ 1440.710188]  ffff88003cca5838 0000000000000046 ffff88003cca57e8
>>>> ffffffff00000000
>>>> [ 1440.710201]  00000000000134c0 00000000000134c0 00000000000134c0
>>>> ffff880037a1e000
>>>> [ 1440.710218]  00000000000134c0 ffff88003cca5fd8 00000000000134c0
>>>> 00000000000134c0
>>>> [ 1440.710225] Call Trace:
>>>> [ 1440.710233]  [<ffffffff810c0468>] ? lock_page+0x2a/0x2a
>>>> [ 1440.710239]  [<ffffffff815e452d>] io_schedule+0x5e/0x79
>>>> [ 1440.710244]  [<ffffffff810c0471>] sleep_on_page+0x9/0xd
>>>> [ 1440.710249]  [<ffffffff815e4adf>] __wait_on_bit_lock+0x41/0x8a
>>>> [ 1440.710253]  [<ffffffff810c0437>] __lock_page+0x61/0x68
>>>> [ 1440.710259]  [<ffffffff81058739>] ? autoremove_wake_function+0x34/0x34
>>>> [ 1440.710264]  [<ffffffff8102f704>] ? should_resched+0x9/0x29
>>>> [ 1440.710269]  [<ffffffff810c9b0b>] lock_page+0x25/0x29
>>>> [ 1440.710274]  [<ffffffff810ca1ac>] truncate_inode_pages_range+0x2a6/0x32d
>>>> [ 1440.710279]  [<ffffffff810ca240>] truncate_inode_pages+0xd/0xf
>>>> [ 1440.710284]  [<ffffffff811642cf>] ext3_evict_inode+0xc9/0x1d7
>>>> [ 1440.710289]  [<ffffffff8111288e>] evict+0xa3/0x15e
>>>> [ 1440.710294]  [<ffffffff81112b34>] dispose_list+0x3d/0x49
>>>> [ 1440.710299]  [<ffffffff81113475>] evict_inodes+0xf1/0x100
>>>> [ 1440.710303]  [<ffffffff810ffd21>] generic_shutdown_super+0x47/0xc7
>>>> [ 1440.710308]  [<ffffffff810ffdc3>] kill_block_super+0x22/0x65
>>>> [ 1440.710312]  [<ffffffff811000da>] deactivate_locked_super+0x21/0x52
>>>> [ 1440.710316]  [<ffffffff811009ab>] deactivate_super+0x35/0x39
>>>> [ 1440.710322]  [<ffffffff81116395>] mntput_no_expire+0xcb/0xd0
>>>> [ 1440.710326]  [<ffffffff811163bb>] mntput+0x21/0x23
>>>> [ 1440.710330]  [<ffffffff810ff8e7>] fput+0x196/0x1a5
>>>> [ 1440.710335]  [<ffffffff810fc7a1>] filp_close+0x6b/0x76
>>>> [ 1440.710342]  [<ffffffff8103fa8a>] put_files_struct+0x73/0xd1
>>>> [ 1440.710346]  [<ffffffff8103fb7b>] exit_files+0x46/0x4f
>>>> [ 1440.710350]  [<ffffffff8103fe01>] do_exit+0x27d/0x7b3
>>>> [ 1440.710356]  [<ffffffff8104d97f>] ? get_signal_to_deliver+0x81/0x4ac
>>>> [ 1440.710361]  [<ffffffff812e5e27>] ? do_raw_spin_lock+0x6b/0x122
>>>> [ 1440.710366]  [<ffffffff810405c5>] do_group_exit+0x7d/0xa8
>>>> [ 1440.710371]  [<ffffffff8104dd8b>] get_signal_to_deliver+0x48d/0x4ac
>>>> [ 1440.710376]  [<ffffffff81001ea2>] do_signal+0x39/0x600
>>>> [ 1440.710381]  [<ffffffff810fdb37>] ? fsnotify_access+0x5d/0x65
>>>> [ 1440.710386]  [<ffffffff810024a4>] do_notify_resume+0x27/0x69
>>>> [ 1440.710391]  [<ffffffff812e158e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>>>> [ 1440.710396]  [<ffffffff815ecd63>] int_signal+0x12/0x17
>>>> [ 1440.710399] INFO: lockdep is turned off.
>>>
>>>
>>
>>
>>
>> --
>> Regards
>> Yang RuiRui
>>
>
>
>
> --
> Regards
> Yang RuiRui
>



-- 
Regards
Yang RuiRui

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-06  8:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-03 10:31 [BUG] D state process after unplug and umount usb disk Dave Young
2011-09-03 17:50 ` Andrew Morton
2011-09-05  1:17   ` Dave Young
2011-09-05  3:01     ` Dave Young
2011-09-06  8:10       ` Dave Young
2011-09-04 13:11 ` Lin Ming
2011-09-04 13:49   ` Alan Stern
2011-09-04 14:25     ` Lin Ming
2011-09-05  1:17       ` Alan Stern
2011-09-05  1:21       ` Dave Young
2011-09-05  9:04     ` Dave Young
2011-09-05 13:31 ` Wu Fengguang
2011-09-06  2:08   ` Dave Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.