This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Random fork failures


Hi,

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 - http://cygwin.com/ml/cygwin/2011-04/msg00066.html

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 will appreciate any advice, how can I solve this problem.
Thanks,
Yoni.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]