Enabled hyperthreading - causes qthread creation error on Ubuntu Precise 64 bit

We recently set up an HP ProLiant DL360p server for some heavy grunt-work. For one reason or another we disabled hyperthreading in the system BIOS when setting it up. Being a dual-CPU 8-core system, that gave us 16 hardware threads. 32 GB RAM. We are running Ubuntu 12.04 64-bit.

The bulk of the work done is by a VHDL "synthesizer", or compiler. It is a QT application, but typically run in command-line mode (no GUI). This compiler has been running well for the last few weeks, kicked off by a continuous integration system (Jenkins).

Today we re-enabled hyperthreading to get access to all 32 hardware threads. However now this compiler hangs with the following error in every case I can contrive:

QThread::start: Thread creation error: Resource temporarily unavailable

The process appears to be stalled, not busy on any CPU, and ctrl-c interrupts it.

I did some searching online and it would appear that this may be related to OS maximum thread limits, but I'm not sure how to go about changing this. The default is supposedly around 800 threads anyway, which should be more than enough for this compiler that runs only a small number (maybe 2?).

In the meantime I will have to disable hyperthreading, but I was wondering if this is a known issue with high-end servers running 64-bit Linux? Is there a known workaround? Or is it more likely a problem with that specific application?


Could you describe how this process is started, and provide us with the output of ulimit -a from a context as close from that as possible?

As pthread_create(3) explains, you are running into:

ERRORS
       EAGAIN Insufficient  resources  to create another thread, or a system-
              imposed limit on the number of threads  was  encountered.   The
              latter  case  may  occur  in  two  ways:  the RLIMIT_NPROC soft
              resource limit (set via setrlimit(2)), which limits the  number
              of  process  for  a  real user ID, was reached; or the kernel's
              system-wide limit on  the  number  of  threads,  /proc/sys/ker‐
              nel/threads-max, was reached.