Hi Dave, On May 18 15:14, Dave Korn wrote: > > Hi, > > I'm having trouble with the latest changes to the pty control code. In my > case they manifest when I run parallel "make -j check" on GCC; after a minute > or two all the expect processes end up spinning CPU and everything grinds to a > halt. > [...] > - 32 threads all stuck in WFSO with no useful backtrace, and one that is > frantically looping in cygthread::callfunc() at this point: > > if (issimplestub) > > { > > /* Wait for main thread to assign 'h' */ > > while (!h) > > yield (); > > ... with "h" never getting set. > > The attached testcase demonstrates the underlying problem.
I applied a patch to CVS. It worked for me, but while testing I encountered a handle leak in your testcase and, naturally, I thought it's my code. After some tinkering it turned out that your parent process neglects to wait for the child process. Adding int status; waitpid (child_pid, &status, 0); to the parent code removed the handle leak. Please test the change in Cygwin if it fixes the original problem for you. Thanks for the report and, especially, the testcase, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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