Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I continue to suspect that your customer/user has some kernel module or driver loaded which is interfering with the <code>clone()</code> system call (perhaps some obscure security enhancement, something like LIDS but more obscure?) or is somehow filling up some of the kernel data structures that are necessary for <code>fork()</code>/<code>clone()</code> to operate (process table, page tables, file descriptor tables, etc).</p> <p>Here's the relevant portion of the <code>fork(2)</code> man page:</p> <pre> ERRORS EAGAIN fork() cannot allocate sufficient memory to copy the parent's page tables and allocate a task structure for the child. EAGAIN It was not possible to create a new process because the caller's RLIMIT_NPROC resource limit was encountered. To exceed this limit, the process must have either the CAP_SYS_ADMIN or the CAP_SYS_RESOURCE capability. ENOMEM fork() failed to allocate the necessary kernel structures because memory is tight. </pre> <p>I suggest having the user try this after booting into a stock, generic kernel and with only a minimal set of modules and drivers loaded (minimum necessary to run your application/script). From there, assuming it works in that configuration, they can perform a binary search between that and the configuration which exhibits the issue. This is standard sysadmin troubleshooting 101.</p> <p>The relevant line in your <code>strace</code> is:</p> <pre><code>clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f12708) = -1 ENOMEM (Cannot allocate memory) </code></pre> <p>... I know others have talked about swap and memory availability (and I would recommend that you set up at least a small swap partition, ironically even if it's on a RAM disk ... the code paths through the Linux kernel when it has even a tiny bit of swap available have been exercised far more extensively than those (exception handling paths) in which there is zero swap available.</p> <p>However I suspect that this is still a red herring.</p> <p>The fact that <code>free</code> is reporting 0 (ZERO) memory in use by the cache and buffers is very disturbing. I suspect that the <code>free</code> output ... and possibly your application issue here, are caused by some proprietary kernel module which is interfering with the memory allocation in some way.</p> <p>According to the man pages for fork()/clone() the fork() system call should return EAGAIN if your call would cause a resource limit violation (RLIMIT_NPROC) ... however, it doesn't say if EAGAIN is to be returned by other RLIMIT* violations. In any event if your target/host has some sort of weird Vormetric or other security settings (or even if your process is running under some weird SELinux policy) then it might be causing this -ENOMEM failure.</p> <p>It's pretty unlikely to be a normal run-of-the-mill Linux/UNIX issue. You've got something non-standard going on there.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload