现在的位置: 首页 > 综合 > 正文

Solution: FUTEX_WAIT hangs Java on Linux / Ubuntu in vmware or virtual box

2018年04月14日 ⁄ 综合 ⁄ 共 876字 ⁄ 字号 评论关闭
Posted by:
Pratik Patel
on 01/24/2010

Ok, I'm documenting this for those that hit this same problem. Is it taking a LONG time to run some Java app, making it seemingly hang? This happens  when running Ubuntu or any flavour of Linux in VMware or Virtual Box. I d/l a pre-made image of Ubuntu Server
9.10 from http://www.thoughtpolice.co.uk/vmware/, put JDK 1.6_18 on it, and went on with installing some app servers and other stuff for setting up a Hudson SWARM.

I attempt to start some Java procs, and they took a long time to start. I broke out strace to see what the hell was going on, and it seems that the procs were getting stuck in FUTEX_WAIT. Googling FUTEX_WAIT lead to many false solutions. Further examination
of the strace pointed to some stuff happening in /dev/random just before the FUTUX_WAIT. On a hunch, I reconfigured the /dev/random like so:

rm /dev/random 

mknod -m 644 /dev/random c 1 9 

and VOILA! things started working normally. Hopefully, you get here via a google search and find this solution to save you a couple of hours of agony.

抱歉!评论已关闭.