When I run a certain commercial build flow in OpenSuse, I encounter the following error:
fork: retry: No child processes
I encounter this error at various locations in the flow that corresponds with different executables, so I believe that the tool itself is not the problem. However, I run several instances (up to 16) of this build flow at the same time. The build is dispatched to different servers according to load, so sometimes a few builds run on the same machine. I suspect that the server load has somehow to do with this, but I cannot figure out exactly how.
I suspect that the error message corresponds with the EAGAIN error of fork. The fork manual gives several potential causes for this error:
- the
RLIMIT_NPROCsoft resource limit (set viasetrlimit(2)), which limits the number of processes and threads for a real user ID, was reached - the kernel's system-wide limit on the number of processes and threads,
/proc/sys/kernel/threads-max, was reached (seeproc(5)) - the maximum number of PIDs,
/proc/sys/kernel/pid_max, was reached
I believe none of these are satisfied, because
ulimit -areports unlimited as the maximum number of user processes./proc/sys/kernel/threads-maxis set to 1031129. I monitor the number of lines inps auxH, which should be the number of threads (plus the header line that ps outputs I guess), at a 1-second granularity, but it never gets higher than 917./proc/sys/kernel/pid_maxis set to 32768. I monitor the number of processes usingps aux, but it never gets higher than 726.
I believe I read somewhere that there is also a possibility that the kernel ran out of other (memory?) resources. How can I check that? Or is something else wrong in my line of reasoning?
The output form ulimit -a is:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 515564
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 5120
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited