読者です 読者をやめる 読者になる 読者になる

ddでディスクイメージをusbメモリに書き込もうとしたら全然終わらない\(^o^)/

linux

使っているカーネルはこんなバージョン。
[masami@moon:~]% uname -a
Linux moon 2.6.30-rc5-x86tip-tip #1 SMP Sat May 9 22:38:05 JST 2009 x86_64 GNU/Linux

やっていることは何の変哲もないddコマンドなんだけど、killコマンドすら受け付けん。。
[masami@moon:~/build/tinycore]% sudo dd if=./hda.img of=/dev/sdf bs=1M

psコマンドでプロセスの状態を見ると、ステータスがDなのでこんな状態。
D 割り込み不可能なスリープ状態 (通常 IO 中)

デッドロックか?と思ってAlt+SysRq+dで確認。

[51339.950125] SysRq : Show Locks Held
[51339.950133] 
[51339.950134] Showing all locks held in the system:
[51339.950161] 1 lock held by getty/3706:
[51339.950164]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff803d66b2>] n_tty_read+0x259/0x714
[51339.950177] 1 lock held by getty/3707:
[51339.950180]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff803d66b2>] n_tty_read+0x259/0x714
[51339.950188] 1 lock held by getty/3708:
[51339.950190]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff803d66b2>] n_tty_read+0x259/0x714
[51339.950199] 1 lock held by getty/3709:
[51339.950201]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff803d66b2>] n_tty_read+0x259/0x714
[51339.950209] 1 lock held by getty/3710:
[51339.950211]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff803d66b2>] n_tty_read+0x259/0x714
[51339.950219] 1 lock held by getty/3711:
[51339.950221]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff803d66b2>] n_tty_read+0x259/0x714
[51339.950236] 1 lock held by usb-storage/8435:
[51339.950238]  #0:  (&(us->dev_mutex)){+.+...}, at: [<ffffffffa01047ce>] usb_stor_control_thread+0x4a/0x1f9 [usb_storage]
[51339.950272] 1 lock held by hald-addon-stor/8476:
[51339.950274]  #0:  (&bdev->bd_mutex){+.+.+.}, at: [<ffffffff8030538b>] __blkdev_get+0x78/0x356
[51339.950285] 1 lock held by dd/8558:
[51339.950287]  #0:  (&bdev->bd_mutex){+.+.+.}, at: [<ffffffff80305183>] __blkdev_put+0x2b/0x15b
[51339.950295] 1 lock held by zsh/8559:
[51339.950297]  #0:  (&tty->atomic_read_lock){+.+.+.}, at: [<ffffffff803d66b2>] n_tty_read+0x259/0x714
[51339.950305] 
[51339.950307] =============================================
[51339.950308] 

その後のdmesgで何かメッセージが出てないか確認するとこんなメッセージが出てきていた。

[51361.424105] INFO: task hald-addon-stor:8476 blocked for more than 120 seconds.
[51361.424111] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[51361.424115] hald-addon-st D ffff880086ce9900     0  8476   3530 0x00000000
[51361.424122]  ffff8800aa5f8000 0000000000000046 ffff8800544a86d8 0000000100000246
[51361.424128]  ffff8800544a8000 00000000001d6080 000000000000f6d0 ffff8800544a8000
[51361.424135]  ffff8800544a82f8 0000000000000246 0000000000000000 ffff8800544a8000
[51361.424142] Call Trace:
[51361.424152]  [<ffffffff8026e1a4>] ? mark_held_locks+0x4b/0x67
[51361.424158]  [<ffffffff804afdae>] ? __mutex_lock_common+0x1f7/0x38c
[51361.424165]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51361.424169]  [<ffffffff804afdbd>] ? __mutex_lock_common+0x206/0x38c
[51361.424174]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51361.424180]  [<ffffffff803f6eab>] ? kobj_lookup+0x120/0x157
[51361.424185]  [<ffffffff80305670>] ? blkdev_open+0x0/0x96
[51361.424190]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51361.424195]  [<ffffffff8037cd95>] ? _raw_spin_unlock+0x8b/0x92
[51361.424200]  [<ffffffff80305670>] ? blkdev_open+0x0/0x96
[51361.424204]  [<ffffffff803056d7>] ? blkdev_open+0x67/0x96
[51361.424209]  [<ffffffff802e0ade>] ? __dentry_open+0x148/0x265
[51361.424214]  [<ffffffff802ec08f>] ? do_filp_open+0x3ea/0x7d6
[51361.424220]  [<ffffffff8021716e>] ? native_sched_clock+0x2e/0x5b
[51361.424224]  [<ffffffff802171a0>] ? sched_clock+0x5/0x8
[51361.424229]  [<ffffffff8026cdbf>] ? lock_release_holdtime+0x2a/0x11e
[51361.424233]  [<ffffffff804b0dd8>] ? _spin_unlock+0x17/0x20
[51361.424238]  [<ffffffff802f5391>] ? alloc_fd+0x112/0x123
[51361.424243]  [<ffffffff802e08ee>] ? do_sys_open+0x48/0xc5
[51361.424248]  [<ffffffff80210ac2>] ? system_call_fastpath+0x16/0x1b
[51361.424252] 1 lock held by hald-addon-stor/8476:
[51361.424255]  #0:  (&bdev->bd_mutex){+.+.+.}, at: [<ffffffff8030538b>] __blkdev_get+0x78/0x356
[51481.428077] INFO: task hald-addon-stor:8476 blocked for more than 120 seconds.
[51481.428082] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[51481.428086] hald-addon-st D ffff880086ce9900     0  8476   3530 0x00000000
[51481.428093]  ffff8800aa5f8000 0000000000000046 ffff8800544a86d8 0000000100000246
[51481.428100]  ffff8800544a8000 00000000001d6080 000000000000f6d0 ffff8800544a8000
[51481.428106]  ffff8800544a82f8 0000000000000246 0000000000000000 ffff8800544a8000
[51481.428113] Call Trace:
[51481.428122]  [<ffffffff8026e1a4>] ? mark_held_locks+0x4b/0x67
[51481.428129]  [<ffffffff804afdae>] ? __mutex_lock_common+0x1f7/0x38c
[51481.428136]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51481.428140]  [<ffffffff804afdbd>] ? __mutex_lock_common+0x206/0x38c
[51481.428144]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51481.428151]  [<ffffffff803f6eab>] ? kobj_lookup+0x120/0x157
[51481.428155]  [<ffffffff80305670>] ? blkdev_open+0x0/0x96
[51481.428160]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51481.428166]  [<ffffffff8037cd95>] ? _raw_spin_unlock+0x8b/0x92
[51481.428170]  [<ffffffff80305670>] ? blkdev_open+0x0/0x96
[51481.428175]  [<ffffffff803056d7>] ? blkdev_open+0x67/0x96
[51481.428180]  [<ffffffff802e0ade>] ? __dentry_open+0x148/0x265
[51481.428185]  [<ffffffff802ec08f>] ? do_filp_open+0x3ea/0x7d6
[51481.428190]  [<ffffffff8021716e>] ? native_sched_clock+0x2e/0x5b
[51481.428195]  [<ffffffff802171a0>] ? sched_clock+0x5/0x8
[51481.428199]  [<ffffffff8026cdbf>] ? lock_release_holdtime+0x2a/0x11e
[51481.428203]  [<ffffffff804b0dd8>] ? _spin_unlock+0x17/0x20
[51481.428208]  [<ffffffff802f5391>] ? alloc_fd+0x112/0x123
[51481.428212]  [<ffffffff802e08ee>] ? do_sys_open+0x48/0xc5
[51481.428218]  [<ffffffff80210ac2>] ? system_call_fastpath+0x16/0x1b
[51481.428222] 1 lock held by hald-addon-stor/8476:
[51481.428224]  #0:  (&bdev->bd_mutex){+.+.+.}, at: [<ffffffff8030538b>] __blkdev_get+0x78/0x356
[51601.424288] INFO: task hald-addon-stor:8476 blocked for more than 120 seconds.
[51601.424293] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[51601.424297] hald-addon-st D ffff880086ce9900     0  8476   3530 0x00000000
[51601.424304]  ffff8800aa5f8000 0000000000000046 ffff8800544a86d8 0000000100000246
[51601.424311]  ffff8800544a8000 00000000001d6080 000000000000f6d0 ffff8800544a8000
[51601.424318]  ffff8800544a82f8 0000000000000246 0000000000000000 ffff8800544a8000
[51601.424324] Call Trace:
[51601.424334]  [<ffffffff8026e1a4>] ? mark_held_locks+0x4b/0x67
[51601.424340]  [<ffffffff804afdae>] ? __mutex_lock_common+0x1f7/0x38c
[51601.424347]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51601.424352]  [<ffffffff804afdbd>] ? __mutex_lock_common+0x206/0x38c
[51601.424356]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51601.424363]  [<ffffffff803f6eab>] ? kobj_lookup+0x120/0x157
[51601.424368]  [<ffffffff80305670>] ? blkdev_open+0x0/0x96
[51601.424372]  [<ffffffff8030538b>] ? __blkdev_get+0x78/0x356
[51601.424378]  [<ffffffff8037cd95>] ? _raw_spin_unlock+0x8b/0x92
[51601.424383]  [<ffffffff80305670>] ? blkdev_open+0x0/0x96
[51601.424388]  [<ffffffff803056d7>] ? blkdev_open+0x67/0x96
[51601.424393]  [<ffffffff802e0ade>] ? __dentry_open+0x148/0x265
[51601.424398]  [<ffffffff802ec08f>] ? do_filp_open+0x3ea/0x7d6
[51601.424404]  [<ffffffff8021716e>] ? native_sched_clock+0x2e/0x5b
[51601.424408]  [<ffffffff802171a0>] ? sched_clock+0x5/0x8
[51601.424413]  [<ffffffff8026cdbf>] ? lock_release_holdtime+0x2a/0x11e
[51601.424418]  [<ffffffff804b0dd8>] ? _spin_unlock+0x17/0x20
[51601.424423]  [<ffffffff802f5391>] ? alloc_fd+0x112/0x123
[51601.424427]  [<ffffffff802e08ee>] ? do_sys_open+0x48/0xc5
[51601.424433]  [<ffffffff80210ac2>] ? system_call_fastpath+0x16/0x1b
[51601.424437] 1 lock held by hald-addon-stor/8476:
[51601.424440]  #0:  (&bdev->bd_mutex){+.+.+.}, at: [<ffffffff8030538b>] __blkdev_get+0x78/0x356
[masami@moon:~]% 

何分か待っていたらプロセスは終了したので良いけど、何かがどこかでおかしいのはまちがいなさそう/(^o^)\