Wietse Venema:
> Viktor Dukhovni:
> > > If I understand correctly, some buggy kernel reports WIFSTOPPED
> > > events to the Postfix master daemon (the smtpd parent process)
> > > instead of gdb (the smtpd tracing process).
> > 
> > This is a plausible guess.  Somehow by the time smtpd(8) really
> > exited, master(8) had already removed it from the child process
> > hash table, and a missing WIFSTOPPED() case is a somewhat plausible
> > explanation.
> > 
> > > What OS version are you using? Perhaps I can reproce that bug with
> > > a small test program.
> > 
> > The first test could be with Postfix, "smtpd -D" and debugger_command
> > exactly as posted, to see whether we can reproduce at least the
> > reported symptoms.  Then onward with small programs, ...
> 
> Apparently, mine is not a buggy kernel. I do test this stuff
> before posting. Nothing is signaled to the master daemon,
> and all is signaled to gdb as expected.

I repeated the experiments with "FreeBSD 10.0-RELEASE #0 r260789"
for amd64 (i.e. the generic kernel from an installation DVD).

With these tests the new code for WIFSTOPPED() never executes.  Not
even when I signal the smtpd process by hand.

        if (!NORMAL_EXIT_STATUS(status)) {
            if (WIFSTOPPED(status)) {
                msg_warn("process %s pid %d stopped by signal %d",
                         serv->path, pid, WSTOPSIG(status));
                continue;
            }
            /* Old code for WIFEXITED() and WIFSIGNALED() here. */

The master daemon does not panic when the smtpd process terminates,
with or without sending a signal 11 to that process.

I did these tests on a unicore VM. I don't have time to investigate
kernel race conditions on multicore systems.

        Wietse

Reply via email to