Bash cannot fork? How odd.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bash cannot fork? How odd.

Kevin O'Gorman
I have run into a very peculiar thing.  I was monitoring processes on a Xeon I recently bought, and overnight the monitoring stopped working.  It was just a Bash script in a loop, running once per minute, and after a while it stopped functioning normally.  Its last full report was after 342 minutes, and instead of counting the worker processes still running, it said:

/home/kevin/bin/watch-probes: fork: retry: No child processes
/home/kevin/bin/watch-probes: fork: retry: No child processes
/home/kevin/bin/watch-probes: fork: retry: No child processes
/home/kevin/bin/watch-probes: fork: retry: No child processes
/home/kevin/bin/watch-probes: fork: Resource temporarily unavailable

and went quiet.

I've attached the script

I've run a script much like this for days at a time before with no problem.  There was nothing else active on the machine at the time, except for the 32 threads running my program "qsearch".  These read a single output file, and put results in "yes"-files or "no"-files as appropriate.  This is the first time I had the "paste" code in there to make the "yes" and "no" columns side-by-side, but otherwise it's much like previous versions.

The monitoring process could not do anything useful, just repeating the above message, so I killed the monitoring process and started a new one.  The worker processes were still alive and had processed several million probes in the meantime.

So the question is this: what exactly does that message about child processes mean?  Had I somehow littered the kernel with zombies?  Is there something I could have done before killing the monitor?

--
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

watch-probes (676 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bash cannot fork? How odd.

Ken D'Ambrosio
When bash can't fork for me, I generally find that it's that I'm out of
RAM.  Perhaps check dmesg and see if you had processes being killed by
OOM.

-Ken


On 2017-03-16 10:29, Kevin O'Gorman wrote:

> I have run into a very peculiar thing.  I was monitoring processes on
> a Xeon I recently bought, and overnight the monitoring stopped
> working.  It was just a Bash script in a loop, running once per
> minute, and after a while it stopped functioning normally.  Its last
> full report was after 342 minutes, and instead of counting the worker
> processes still running, it said:
>
> /home/kevin/bin/watch-probes: fork: retry: No child processes
> /home/kevin/bin/watch-probes: fork: retry: No child processes
> /home/kevin/bin/watch-probes: fork: retry: No child processes
> /home/kevin/bin/watch-probes: fork: retry: No child processes
> /home/kevin/bin/watch-probes: fork: Resource temporarily unavailable
>
> and went quiet.
>
> I've attached the script
>
> I've run a script much like this for days at a time before with no
> problem.  There was nothing else active on the machine at the time,
> except for the 32 threads running my program "qsearch".  These read a
> single output file, and put results in "yes"-files or "no"-files as
> appropriate.  This is the first time I had the "paste" code in there
> to make the "yes" and "no" columns side-by-side, but otherwise it's
> much like previous versions.
>
> The monitoring process could not do anything useful, just repeating
> the above message, so I killed the monitoring process and started a
> new one.  The worker processes were still alive and had processed
> several million probes in the meantime.
>
> So the question is this: what exactly does that message about child
> processes mean?  Had I somehow littered the kernel with zombies?  Is
> there something I could have done before killing the monitor?
>
> --
>
> Kevin O'Gorman
> #define QUESTION ((bb) || (!bb))   /* Shakespeare */
>
>   Please consider the environment before printing this email.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users