运行Ubuntu 10.04的Xen PV guest虚拟机上与IO相关的locking

我有一个Xen PV guest,运行Ubuntu 10.04。 我不运行底层的主机。 内核是Ubuntu提供的股票:

Linux nephos 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux 

该机器服务器作为一个LAMPnetworking/数据库服务器与我们内部开发的一堆Perl Web应用程序。 由于我们在周一早上上线并让用户在机器上松动,一天可靠地进入一个状态,我们无法从命令行重新启动它,CGI脚本变得反应迟钝,ping时间甚至激增像ls这样的命令在某些目录中失败(可能是正在等待写入的目录)。

top在状态D显示了一些进程,主要是名为fleet.cgidoc.pl ,这是我们的应用程序。 试图killkill -9这些进程默默地失败。 sudo reboot返回,声称机器即将closures,但不会将广播消息发送给即将发生的其他shell用户,也不会重新启动机器。

当机器开始locking时,系统日志中会显示如下所示的行:

 Dec 14 12:05:45 nephos kernel: [71040.150212] INFO: task mysqld:2708 blocked for more than 120 seconds. Dec 14 12:05:45 nephos kernel: [71040.150234] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Dec 14 12:05:45 nephos kernel: [71040.150247] mysqld D ffff880002d4dbc0 0 2708 1 0x00000000 Dec 14 12:05:45 nephos kernel: [71040.150256] ffff8800fa5e9918 0000000000000286 0000000000015bc0 0000000000015bc0 Dec 14 12:05:45 nephos kernel: [71040.150264] ffff8800ec5883c0 ffff8800fa5e9fd8 0000000000015bc0 ffff8800ec588000 Dec 14 12:05:45 nephos kernel: [71040.150272] 0000000000015bc0 ffff8800fa5e9fd8 0000000000015bc0 ffff8800ec5883c0 Dec 14 12:05:45 nephos kernel: [71040.150280] Call Trace: Dec 14 12:05:45 nephos kernel: [71040.150309] [<ffffffff8116d1d0>] ? sync_buffer+0x0/0x50 Dec 14 12:05:45 nephos kernel: [71040.150320] [<ffffffff815555c7>] io_schedule+0x47/0x70 Dec 14 12:05:45 nephos kernel: [71040.150325] [<ffffffff8116d215>] sync_buffer+0x45/0x50 Dec 14 12:05:45 nephos kernel: [71040.150330] [<ffffffff81555a9a>] __wait_on_bit_lock+0x5a/0xc0 Dec 14 12:05:45 nephos kernel: [71040.150334] [<ffffffff8116d1d0>] ? sync_buffer+0x0/0x50 Dec 14 12:05:45 nephos kernel: [71040.150339] [<ffffffff81555b78>] out_of_line_wait_on_bit_lock+0x78/0x90 Dec 14 12:05:45 nephos kernel: [71040.150347] [<ffffffff81084fe0>] ? wake_bit_function+0x0/0x40 Dec 14 12:05:45 nephos kernel: [71040.150353] [<ffffffff8116c1e7>] ? __find_get_block_slow+0xb7/0x130 Dec 14 12:05:45 nephos kernel: [71040.150357] [<ffffffff8116d396>] __lock_buffer+0x36/0x40 Dec 14 12:05:45 nephos kernel: [71040.150365] [<ffffffff81212164>] do_get_write_access+0x554/0x5d0 Dec 14 12:05:45 nephos kernel: [71040.150369] [<ffffffff8116cb57>] ? __getblk+0x27/0x50 Dec 14 12:05:45 nephos kernel: [71040.150374] [<ffffffff81212371>] journal_get_write_access+0x31/0x50 Dec 14 12:05:45 nephos kernel: [71040.150381] [<ffffffff811c5f9d>] __ext3_journal_get_write_access+0x2d/0x60 Dec 14 12:05:45 nephos kernel: [71040.150386] [<ffffffff811b7c7b>] ext3_reserve_inode_write+0x7b/0xa0 Dec 14 12:05:45 nephos kernel: [71040.150392] [<ffffffff8155748e>] ? _spin_unlock_irqrestore+0x1e/0x30 Dec 14 12:05:45 nephos kernel: [71040.150396] [<ffffffff811b7ccb>] ext3_mark_inode_dirty+0x2b/0x50 Dec 14 12:05:45 nephos kernel: [71040.150401] [<ffffffff811b7e71>] ext3_dirty_inode+0x61/0xa0 Dec 14 12:05:45 nephos kernel: [71040.150406] [<ffffffff81165c22>] __mark_inode_dirty+0x42/0x1e0 Dec 14 12:05:45 nephos kernel: [71040.150412] [<ffffffff81159f8b>] file_update_time+0xfb/0x180 Dec 14 12:05:45 nephos kernel: [71040.150422] [<ffffffff810f5300>] __generic_file_aio_write+0x210/0x470 Dec 14 12:05:45 nephos kernel: [71040.150430] [<ffffffff8114f49d>] ? __link_path_walk+0xad/0xf80 Dec 14 12:05:45 nephos kernel: [71040.150435] [<ffffffff810f55cf>] generic_file_aio_write+0x6f/0xe0 Dec 14 12:05:45 nephos kernel: [71040.150441] [<ffffffff8114311a>] do_sync_write+0xfa/0x140 Dec 14 12:05:45 nephos kernel: [71040.150446] [<ffffffff81084fa0>] ? autoremove_wake_function+0x0/0x40 Dec 14 12:05:45 nephos kernel: [71040.150453] [<ffffffff8100f392>] ? check_events+0x12/0x20 Dec 14 12:05:45 nephos kernel: [71040.150461] [<ffffffff81250946>] ? security_file_permission+0x16/0x20 Dec 14 12:05:45 nephos kernel: [71040.150466] [<ffffffff81143418>] vfs_write+0xb8/0x1a0 Dec 14 12:05:45 nephos kernel: [71040.150470] [<ffffffff81143db2>] sys_pwrite64+0x82/0xa0 Dec 14 12:05:45 nephos kernel: [71040.150477] [<ffffffff810131b2>] system_call_fastpath+0x16/0x1b 

我已经安装了Ubuntu软件包linux-virtual以确保我已经安装了合适的内核,但是它的依赖性已经被我目前拥有的内核所满足。 我有点失落的地方真的在这里看。 在正常的加载情况下, iotop不会出现任何不良现象,但同样我也没有意识到触发故障的使用率突然增加 – 也就是说,机器已经运行这些应用程序只有1/2testing用户数周,现在只有十几个人整天都在打他们。

我只需要一台具有更好的IOfunction的机器(或者减less我的应用程序的需求),还是我可以通过一些调整来处理?

更新15/12/2010 23:41:如果它是有用的(我怀疑这是一个至关重要的细节)客人正在paravirtualisation下运行。

从红帽bugzilla,进一步的迹象表明,closuresirqbalance可能是解决方法,修复是在2.6.32.22

https://bugzilla.redhat.com/show_bug.cgi?id=550724#c81 (评论81到91)

评论91链接到2.6.32.22的发行说明(search内联xen)