JetBrains IDEs, Haswell processors, Linux and FUTEX_WAIT

By | March 16, 2016

I thought I would put this here in case anyone else has been experiencing the same thing I have been. Start up a JetBrains product, any of them — PhpStorm, WebStorm, CLion, DataGrip, or any of the others and it will start up, start indexing files, and then freeze. The only way to recover from it is to go to the command line and do a ‘kill -9’ on the process.

The problem all stems from a Linux kernel bug and Haswell based processors.  I’m running on a 6-core/12-thread i7-5820K under Ubuntu 14.04LTS.  This started happening to me a couple months ago, seemingly out of the blue.  Start up a JetBrains product, and it would just hang.  One processor core would spike to 100% usage and I would have to kill the process.  It was maddening.  There is quite a bit about this problem if you know what to search for, and a couple different solutions.

First, you can start one of the IDEs and lock it to a single processor using taskset.  The exact arguments will vary, but this is what worked for me:

Not ideal, and it was painfully slow being locked to a single core/thread.

Next was to install a more recent Kernel from kernel.ubuntu.com.  I chose 4.1.15-040115-generic, which works, but only after a cold boot, i.e. just powered on.  Just rebooting the machine isn’t enough and it will end up freezing again.

After getting caught by this again this morning, I did a bit more looking.  It seems that its finally been fixed in the latest kernel, 4.5.  It can be downloaded from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5-wily/.  I attempted to use this kernel, but ended up removing it as it had problems building the DKMS modules for nvidia and virtualbox for me.

It does appear that the latest Ubuntu 14.04 kernel, 3.19.0-56-generic, does help as well.  Running with that kernel, I don’t encounter the bug after a cold boot.  I do still have problems after a warm boot, though.  I’ve also tried Ubuntu 16.04, but its not stable enough for me just yet.  I’ll report back in a month when its released.

2 thoughts on “JetBrains IDEs, Haswell processors, Linux and FUTEX_WAIT

  1. cician

    Thanks for the info. I got hit by this bug on 14.04LT with 3.19.0-56 since yesterday. Each time starting Eclipse it locked and started locking other processes as well. No messages in kernel log, pretty frustrating.
    Fixed by updating to xenial kernel (4.4.0).

    Reply
    1. marc Post author

      I tried newer kernels as well, but I reverted back because the nvidia and virtualbox DKMS modules failed to build correctly. Nice to know that it should be fixed once and for all when 16.04 is released.

      Reply

Leave a Reply to marc Cancel reply

Your email address will not be published. Required fields are marked *