[racket] SIGCHLD handler called in stderr
At Sun, 9 Dec 2012 20:42:25 +0400, Sergey Khorev wrote:
> Hi Matthew,
>
> >> if(-1 == write(2, "SIGCHLD handler called (some thread has SIGCHLD
> >> unblocked)\n", 59)) {
> >
> > That message is meant to indicate that something has gone seriously
> > wrong.
> >
> > Can you say more about your platform? Also, if you can get a stack
> > context where the printout happens, that would likely be useful.
>
> Ah, ok. It was happeninng so often that I thought it's a normal flow.
> The configuration is quite complex and involves other embedded
> interpreters but I think I managed to find a small reproducible case
> that demonstrates some problem with waitpid and I think it's related
> to the SIGCHLD stuff.
>
> Code below fails with "waitpid: No child pocesses" on Ubuntu 12.10 x86
> with Racket 5.3.1. Racket 5.2.1 fails even on a single core system but
> for 5.3.1 I needed a multicore one.
I think this isn't exactly the problem you're looking for. You get
"waitpid: No child pocesses" because Racket (with places enabled)
creates its own thread to reap child processes.
But if you're embedding Racket with other libraries, then the problem
may boil down to the same issue: Racket maybe isn't playing nicely
enough with the other libraries, which might create their own threads
that have SIGCHLD enabled.
If I remember correctly, Racket blocks SIGCHLD in the main thread when
it starts up, so that all new threads that Racket creates inherit this
disposition. In your emebdding application, do other libraries maybe
create threads before Racket is initialized, so that they could be
created with SIGCHLD unblocked?