This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: ProcessManager on Solaris
Bryce McKinlay wrote:
Eric Botcazou wrote:
As exhibited in
http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg00579.html ,
we have a problem with the ProcessManager on SPARC/Solaris: it
randomly deadlocks.
The proper solution would be to block SIGCHLD in the Boehm GC thread,
but I don't know whether this is easily doable.
What's the best approach to solving this problem? Thanks in advance.
It should be pretty trival to fix boehm-gc to block SIGCHLD. Basically
you should just need to copy the pthread_sigmask() code from
block_sigchld in posix-threads.cc into GC_pthread_create in
solaris_pthreads.c. I think it would be fine to make that change in
order to fix this problem, so please submit a patch.
This problem does expose a underlying flaw in our java.lang.Process
implementation, however - If an application creates non-Java threads
independently of libgcj, then ProcessManager may break as the signals
could be delivered to the wrong thread. Unfortunately nobody has come up
with a better solution for this, yet.
I agree. This is (somewhat) documented in gcj.texi (@subsection Posix
signals) But we should probably add that SIGCHLD must be blocked in all
non-Java threads.
David Daney