Random fork failures
Mon Jul 11 08:28:00 GMT 2011
On Jul 11 11:07, yoni levi wrote:
> We have a problem with fork for a very long time.
> From time to time, fork just hangs (with 2 process doing busy loop).
> The problem occurs when we do allot of spawns (make system).
> It is very easy to recreate the problem, but unfortunately, there is
> too much code involve to send.
> I did a little investigation - when the process hangs, I took the
> backtrace with process explorer.
> Process explorer does not know anything about cygwin debug symbols,
> so it just give an arbitrary func + offset.
> Then I used gdb to find out the real function: sync_proc_pipe doing
> yield in an endless loop.
> It seems that there is a race condition here, since this error
> depends on timing. when the CPU is very busy (e.g. when
> I do while((1)); do true; done X 4 times), the frequency of the
> problem is reduced.
> I dug a little bit in the mailing list and found many references to
> fork failure. I belive this one is similar to my problem -
> I also saw all the work done around fork lately (http://old.nabble.com/Re%3A-Improvements-to-fork-handling-td31594702.html)
> so I tried to use the latest cygwin from CVS.
> This acctualy was very helpful, and this error disappear. the
> problem is that many other errors/crashes are introduced!
> Many perl scripts stopped working, rxvt crashes from time to time,
> gcc fails with no good reason and more.
I'm using the latest from CVS all the time and I'm not seeing any such
> I will appreciate any advice, how can I solve this problem.
Simple, self-contained testcases, preferredly in plain C, or simple
scripts in case the problem only occurs in a script language, which
allow to reproduce the problem. Those would be most helpful.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin