Solution: FUTEX_WAIT hangs Java on Linux / Ubuntu in vmware or virtual box - No Fluff Just Stuff

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

Posted by: Pratik Patel on January 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. 


Pratik Patel

About Pratik Patel

Pratik Patel is a Java Champion and developer advocate at Azul Systems and has written 3 books on programming (Java, Cloud and OSS). An all around software and hardware nerd with experience in the healthcare, telecom, financial services, and startup sectors. He's also a co-organizer of the Atlanta Java User Group and North Atlanta JavaScript meetup, frequent speaker at tech events, and master builder of nachos.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »