Filesystems
核心:“迴聲 0 > /proc/sys/kernel/hung_task_timeout_secs”
我在系統日誌中遇到了這個錯誤。知道這是什麼意思嗎?系統在Ubuntu 12.04上執行,核心:
3.8.0-35-generic #52~precise1
在我看來,嘗試寫入磁碟時失敗了……
[151850.317166] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [151850.318428] ffff8803640f5be8 0000000000000082 0000000034c733da ffff88040e233ec0 [151850.318444] ffff880408149740 ffff880403c6c5c0 0000000000000001 ffff8803edae80a8 [151850.318468] [<ffffffff816f41c9>] schedule+0x29/0x70 [151850.318481] [<ffffffff816f30b7>] __mutex_lock_slowpath+0xd7/0x150 [151850.318497] [<ffffffff816f2cca>] mutex_lock+0x2a/0x50 [151850.318510] [<ffffffff811aa006>] path_lookupat+0x236/0x7a0 [151850.318523] [<ffffffff811aade0>] ? getname_flags.part.31+0x30/0x150 [151850.318537] [<ffffffff811aaf6e>] ? getname_flags+0x6e/0x80 [151850.318552] [<ffffffff813141f4>] ? apparmor_inode_getattr+0x54/0x60 [151850.318565] [<ffffffff811bb929>] ? mntput_no_expire+0x49/0x160 [151850.318578] [<ffffffff811ab711>] user_path_at+0x11/0x20 [151850.318588] [<ffffffff811a0c3e>] vfs_lstat+0x1e/0x20 [151850.318602] [<ffffffff816fdf5d>] system_call_fastpath+0x1a/0x1f [151850.319634] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [151850.376552] [<ffffffff816f41c9>] schedule+0x29/0x70 [151850.376565] [<ffffffff816f30b7>] __mutex_lock_slowpath+0xd7/0x150 [151850.376579] [<ffffffff816f2cca>] mutex_lock+0x2a/0x50 [151850.376590] [<ffffffff811aa006>] path_lookupat+0x236/0x7a0 [151850.376602] [<ffffffff811aade0>] ? getname_flags.part.31+0x30/0x150 [151850.376616] [<ffffffff811aaf6e>] ? getname_flags+0x6e/0x80 [151850.376680] [<ffffffff813141f4>] ? apparmor_inode_getattr+0x54/0x60 [151850.376691] [<ffffffff811bb929>] ? mntput_no_expire+0x49/0x160 [151850.376704] [<ffffffff811ab711>] user_path_at+0x11/0x20 [151850.406554] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [151850.465132] sftp-server D ffff880403bfdf60 0 15199 1 0x00000000 [151850.465158] ffff8803d2c87fd8 ffff8803d2c87fd8 ffff8803d2c87fd8 0000000000013ec0 [151850.465173] ffffffff81c15440 ffff88040583ae80 0000000000000001 ffff8803edae80a8 [151850.465263] [<ffffffff811aa006>] path_lookupat+0x236/0x7a0 [151850.465269] [<ffffffff81186441>] ? kmem_cache_alloc+0x31/0x140 [151850.465275] [<ffffffff811aade0>] ? getname_flags.part.31+0x30/0x150 [151850.465283] [<ffffffff811aa5a4>] filename_lookup+0x34/0xc0 [151850.465289] [<ffffffff811aaf6e>] ? getname_flags+0x6e/0x80 [151850.465296] [<ffffffff811ab6b9>] user_path_at_empty+0x59/0xa0 [151850.465303] [<ffffffff813141f4>] ? apparmor_inode_getattr+0x54/0x60 [151850.465309] [<ffffffff81087e9a>] ? lg_local_unlock+0x1a/0x20 [151850.465315] [<ffffffff811bb929>] ? mntput_no_expire+0x49/0x160 [151850.465320] [<ffffffff811a0946>] ? cp_new_stat+0x116/0x130 [151850.465327] [<ffffffff811ab711>] user_path_at+0x11/0x20 [151850.465332] [<ffffffff811a0bc1>] vfs_fstatat+0x51/0xb0 [151850.465337] [<ffffffff811a0c3e>] vfs_lstat+0x1e/0x20 [151850.465343] [<ffffffff811a0dea>] sys_newlstat+0x1a/0x40 [151850.465350] [<ffffffff816fdf5d>] system_call_fastpath+0x1a/0x1f
如果某個程序(在這種情況下
sftp-server
)在 120 秒(預設限制)內沒有獲得 CPU,則會出現該消息。這可能是由系統上的高負載引起的。通常這可能是由於等待任何資源,最有可能的候選者是 CPU、磁碟和網路。在調試此類問題時,您可以測試磁碟上的寫入速度:
$ dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k; rm -f /tmp/output 1024+0 records in 1024+0 records out 402653184 bytes (403 MB) copied, 2753.13 s, 146 kB/s
您應該期望以 MB/s 為單位的值,例如
50-230 MB/s
取決於硬碟驅動器。在這種情況下,吞吐量146 kB/s
極低,可能會導致此類核心消息。您還可以使用它
iostat -x 5
來監視磁碟使用率。