Automoc hanging for some FreeBSD users

Andriy Gapon avg at icyb.net.ua
Mon Jan 10 10:18:48 CET 2011


Thiago Macieira <thiago <at> kde.org> writes:
> One thread is in waitForFinished: that means it's in a select call waiting for 
> read on two file descriptors. One is the pipe from the sub-process, the other 
> is a pipe to QProcessManager.
> 
> The other thread, the QProcessManager, is waiting for a wakeup from the 
> SIGCHLD signal handler.
> 
> Now, it's stuck. It can be because:
> 1) the subprocess hasn't exited
> 2) the subprocess has exited but SIGCHLD wasn't handled
> 3) the subprocess has exited and SIGCHLD was handled, but not by 
> QProcessManager signal handler 
> 4) QProcessManager's signal handler got SIGCHLD and wrote to QProcessManager's 
> thread, but the thread did not wake up
> 5) the QProcessManager thread woke up but did not find the target QProcess to 
> notify
> 6) QProcessManager found the target QProcess and notified it, but QProcess 
> didn't wake up.

Perhaps an unaccounted possibility: child process has exited before the
QProcessManager thread has done sufficient setup to handle the exit.
My FreeBSD system has suddenly developed this problem too and my debugging with
ktrace indicates this possibility.  I see that SIGCHLD is delivered to the
QProcessManager thread even before it calls pipe(2).

> 1, 2 and 3 are bugs outside of Qt -- either in the subprocess or in FreeBSD's 
> signal delivery. 4 and 6 would be the same problem, but there's no reason why 
> select(2) would not wake up, unless it's a FreeBSD bug. 5 would be a QProcess 
> bug.






More information about the Kde-buildsystem mailing list