[3707] in testers

home help back first fref pref prev next nref lref last post

Re: dm failed to start X again

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sun Jul 5 01:05:40 1998

To: Tom Yu <tlyu@MIT.EDU>
Cc: ghudson@MIT.EDU, testers@MIT.EDU
In-Reply-To: Your message of "Sat, 04 Jul 1998 23:41:03 EDT."
             <199807050341.XAA17053@saint-elmos-fire.mit.edu> 
Date: Sun, 05 Jul 1998 01:06:13 EDT
From: Greg Hudson <ghudson@MIT.EDU>

Okay, I see two interesting problems here.  First:

> Jul  4 06:43:29 saint-elmos-fire.mit.edu dm: login_running=0, x_running=1, quitting
> Jul  4 06:43:30 saint-elmos-fire.mit.edu dm: Received SIGCHLD for consolepid (2643), status 256
> Jul  4 06:43:30 saint-elmos-fire.mit.edu dm: Starting X, try #1

dm is supposed to sleep for X_STOP_WAIT seconds before exiting.  But
the sleep() is interrupted by a SIGCHLD, so the sleep is interrupted
and the next dm starts immediately, probably before the existing X
server even exits.

> Jul  4 06:43:30 saint-elmos-fire.mit.edu dm: Starting X, try #1
> Jul  4 06:43:30 saint-elmos-fire.mit.edu dm: Received SIGCHLD for xpid (16871), status 256
> Jul  4 06:43:30 saint-elmos-fire.mit.edu dm: Starting X, try #2

[and so forth; dm gives up all in the course of one second.]

Again, dm is supposed to sleep for X_STOP_WAIT seconds, but the
SIGCHLD from X is coming in before the parent process has a chance to
do much of anything and we lose due to the following line:

            if (x_running == NONEXISTENT) break;

I'll submit patches for both problems.

home help back first fref pref prev next nref lref last post