user971956
user971956

Reputation: 3208

App hangs on futex_wait_queue_me() every a couple of minutes

I am running a simple script in Groovy on an Ubuntu 11.10 machine, which takes key/value pairs and adds them to a JDBM map in a loop.
Every ~3 minutes the script hangs for a couple of minutes and then resumes.
When I look at the resource monitor I see that there is no CPU or Memory activity and the process is in futex_wait_queue_me().
Please suggest means to overcome this, on a Windows machine by the way the application runs without the hangs.
Could this be an OS issue? (found many similar threads about similar futex_wait_queue_me() problems in Ubuntu0
Thanks

Upvotes: 5

Views: 15388

Answers (2)

John Damm Soerensen
John Damm Soerensen

Reputation: 61

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

Upvotes: 6

user971956
user971956

Reputation: 3208

For anyone interested I used those parameters when running java:

-Xms16384M -Xmx16384M

You can find additional GC optimization tips at http://randomlyrr.blogspot.it/2012/03/java-tuning-in-nutshell-part-1.html

Upvotes: -1

Related Questions