Client doesn't work on Linux Red Hat 6.4 systems. It fails throwing the exception
This is coming from the file
when it's creating a new thread.
We encountered this problem when we started running our code on a new operating system. It worked fine on Redhat 5.8 and SuSE SLES10, but then it started failing on Redhat 6.4.
I did some digging and found a defect logged against the library at: http://sourceware.org/bugzilla/show_bug.cgi?id=10828.
I did some debugging in the code and found that unix/PlatformThread.cpp's method createNewThread() sets the scheduling priority but doesn't set the scheduling policy. And the default value for the scheduling policy is SCHED_OTHER(0) which only supports a priority value of 0.
I have a proposed patch which:
- validates the return values of all pthread calls and
- only sets the priority iff the policy is sset to SCHED_FIFO or SCHED_RR
Granted, we never set the policy so one could argue that we should just remove setting of the priority. However, I suspect that the true desire is to inherit the current threads scheduling value and set the priority based on that. So I anticipate tha future changes may actually set the policy. I didn't do this though.