最近我在我的/var/log/messeges
and中看到了这些消息dmesg | less
:
kernel: INFO: task flush-8:32:1065 blocked for more than 120 seconds.
kernel: Not tainted 2.6.32-696.el6.x86_64 #1
kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
kernel: flush-8:32 D 0000000000000004 0 1065 2 0x00000000
kernel: ffff88063389b840 0000000000000046 0000000000000000 0005120000000001
kernel: ffff880636304ce0 ffff8806363098c0 00022e760ddb7d3a ffff88062db31360
kernel: 0000000000011200 000000012494c97a ffff88062e0fbad8 ffff88063389bfd8
kernel: Call Trace:
kernel: [<ffffffff811d11e0>] ? sync_buffer+0x0/0x50
kernel: [<ffffffff8154ae83>] io_schedule+0x73/0xc0
kernel: [<ffffffff811d1220>] sync_buffer+0x40/0x50
kernel: [<ffffffff8154b73a>] __wait_on_bit_lock+0x5a/0xc0
kernel: [<ffffffff811d11e0>] ? sync_buffer+0x0/0x50
kernel: [<ffffffff8154b818>] out_of_line_wait_on_bit_lock+0x78/0x90
kernel: [<ffffffff810a68c0>] ? wake_bit_function+0x0/0x50
kernel: [<ffffffff811d1540>] ? end_buffer_async_write+0x0/0x190
kernel: [<ffffffff811d13c6>] __lock_buffer+0x36/0x40
kernel: [<ffffffff811d26c5>] __block_write_full_page+0x305/0x330
kernel: [<ffffffff811d1540>] ? end_buffer_async_write+0x0/0x190
kernel: [<ffffffff811d27d0>] block_write_full_page_endio+0xe0/0x120
kernel: [<ffffffffa0211d00>] ? buffer_unmapped+0x0/0x20 [ext3]
kernel: [<ffffffff811d2825>] block_write_full_page+0x15/0x20
kernel: [<ffffffffa021288d>] ext3_ordered_writepage+0x1ed/0x240 [ext3]
kernel: [<ffffffff81142367>] __writepage+0x17/0x40
kernel: [<ffffffff8114362d>] write_cache_pages+0x1fd/0x4c0
kernel: [<ffffffff81009913>] ? __switch_to+0x2f3/0x340
kernel: [<ffffffff81142350>] ? __writepage+0x0/0x40
kernel: [<ffffffff81299899>] ? cpumask_next_and+0x29/0x50
kernel: [<ffffffff81064054>] ? find_busiest_group+0x254/0xa50
kernel: [<ffffffff81143914>] generic_writepages+0x24/0x30
kernel: [<ffffffff81143955>] do_writepages+0x35/0x40
kernel: [<ffffffff811c6f1d>] writeback_single_inode+0xdd/0x290
kernel: [<ffffffff811c731d>] writeback_sb_inodes+0xbd/0x170
kernel: [<ffffffff811c747b>] writeback_inodes_wb+0xab/0x1b0
kernel: [<ffffffff811c7873>] wb_writeback+0x2f3/0x410
kernel: [<ffffffff8154a68e>] ? schedule+0x3ee/0xb70
kernel: [<ffffffff811c7b3d>] wb_do_writeback+0x1ad/0x250
kernel: [<ffffffff8108f000>] ? process_timeout+0x0/0x10
kernel: [<ffffffff811c7c86>] bdi_writeback_thread+0xa6/0x220
kernel: [<ffffffff811c7be0>] ? bdi_writeback_thread+0x0/0x220
kernel: [<ffffffff810a63ae>] kthread+0x9e/0xc0
kernel: [<ffffffff8100c28a>] child_rip+0xa/0x20
kernel: [<ffffffff810a6310>] ? kthread+0x0/0xc0
kernel: [<ffffffff8100c280>] ? child_rip+0x0/0x20
今天,其中一台 VM 机器重新启动。当我检查时messeges
,我看到了上面的消息,然后是一些数据库错误。那个网络有问题,这台机器失去了与其主要的连接,刚刚重新启动。我的问题是:这些内核消息是什么,我应该在哪里搜索问题?他们和网络有关系吗?它只发生在VM机器上吗?
该警告是由于资源匮乏造成的。
如果在虚拟机中,这可能是主机超额订阅的线索。
请注意,这是一个警告(因此是 INFO 关键字),可以忽略它。但是,我建议处理导致它的潜在问题,因为它们必然会随着时间的推移而恶化。
我会选择 I/O 存储的缺乏或资源/过度使用。
您也可以尝试运行:
如果这对您有用,请将其永久放置,以便在启动时应用它
/etc/sysctl.conf
:请参阅Linux Kernel panic issue: How to fix hang_task_timeout_secs and blocked for more than 120 seconds 问题