应用程序每隔几分钟挂起futex_wait_queue_me()

时间:2012-03-21 08:50:39

标签: java ubuntu groovy

我在Ubuntu 11.10机器上运行Groovy中的一个简单脚本,它接受键/值对并将它们添加到循环中的JDBM映射。
每隔约3分钟脚本挂起几分钟然后恢复。
当我查看资源监视器时,我发现没有CPU或内存活动,并且该过程在futex_wait_queue_me()
请通过应用程序运行的方式在Windows机器上建议克服此问题的方法 这可能是操作系统问题吗? (在Ubuntu0中发现了许多关于类似futex_wait_queue_me()问题的类似线程 感谢

2 个答案:

答案 0 :(得分:4)

Please check the version of the kernel. I ran into a similar problem (java and other multithreaded applications) on Centos6 and upgrading the kernel to version 2.6.32-504.16.2.el6.x86_64 solved the issue.

See the centos bug report: https://bugs.centos.org/view.php?id=8703 which contains this pointer to an explanation of the problem: https://github.com/torvalds/linux/commit/76835b0ebf8a7fe85beb03c75121419a7dec52f0 [^]

My stacktrace was:

cat /proc/23199/stack
[<ffffffff810b226a>] futex_wait_queue_me+0xba/0xf0
[<ffffffff810b33a0>] futex_wait+0x1c0/0x310
[<ffffffff810b4c91>] do_futex+0x121/0xae0
[<ffffffff810b56cb>] sys_futex+0x7b/0x170
[<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
[<ffffffffffffffff>] 0xffffffffffffffff

答案 1 :(得分:0)

对于任何有兴趣的人,我在运行java时使用了这些参数:

-Xms16384M -Xmx16384M

您可以在http://randomlyrr.blogspot.it/2012/03/java-tuning-in-nutshell-part-1.html

找到其他GC优化提示