Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 975
user971956 Avatar asked Mar 21 '12 08:03

user971956


1 Answers

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
like image 186
John Damm Soerensen Avatar answered Sep 30 '22 15:09

John Damm Soerensen