Mailing List NetBSD bugs: bin/20663: deadlock in cron(8)

Cliff Colon cliffcolon at hotmail.com
Fri Oct 22 13:10:46 PDT 2004


Sorry to bother you guys with this old posting. I have been running into a 
problem witn CVS/Cron and after hours of Google searching, this post is the 
closest thing I have found. I hope you understand:

Here is the overview of the post:

"Under certain occasions, especially error or abnormal system conditions, 
cron child processes get into some frozen state. One particular situation 
where the problem happens frequently is when a NIS (or/and NFS) server 
becomes unavailable to a client where the cron daemon runs.

For each cron job, cron daemon forks a child, which forks (with vfork()) a 
grandchild, which runs the command for the job. If the NIS server becomes 
unavailable, one of these processes hangs, and so does the other, since 
there is a pipe between the child and the grandchild.

>From the observation, it seems that the problem is that the grandchild, 
which is created with vfork(), completely fills its pipe output buffer with 
messages intended to go to stderr, before having the opportunity to call 
execve() or _exit(). As the grandchild never reaches those syscalls, its 
"parent" is never unblocked to consume piped data, thus causing a deadlock."

http://citadelle.intrinsec.com/mailing/current/HTML/ml_netbsd-bugs/5721.html

Here is my similar situation:

I have a Unix Shell Script that I run in Cygwin on a Windows 2000 system. 
The Shell Script checks out several CVS Repositories, makes a build, flashes 
the build to a specific product, and then runs a series of tests on the 
product. When the script runs manually in Cygwin it runs fine. When I use 
cron to run the script, the script will hang ("deadlock") in the middle of 
the CVS Checkout and all further processes will stop. If I switch the order 
of repositories to checkout, it will still hang right around the same time 
(just at a different location) (after 100-120 files or so).

My crontab is pretty basic:

0 1 * * * /tmp/NiteBld.sh > /tmp/Results.txt

I know that you guys are probably too busy to help me with this situation 
(actually, I don't know if these email addresses still work), but if you 
could send me a link to a website that would have an answer or a post with a 
similar problem (and possible solution) that would be great. I have been 
trying several different things to make this work but have been unable to 
find a solution. If any of you remember this post and could steer me in the 
right direction to possibly fix it that would also be appreciated.

Thanks for everything and have a good weekend.

Cliff Colon




More information about the freebsd-www mailing list