On Fri, Jan 09, 2009 at 12:27:34PM -0500, Daniel Kahn Gillmor wrote:
> I was trying to look into this further, and i suspect the problem has
> something to do with the file i/o shennanigans we're doing to work
> around screen's inability to log to an existing file descriptor.
> 
> What i find is that when i attach a strace to the lingering run process,
> it immediately terminates with the following output (sorry about the
> line wrap):
> 
> 0 dkg@pip:~$ sudo strace -p 24909
> Process 24909 attached - interrupt to quit
> open("../socket", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
> directory)
> write(2, "./run: 23: "..., 11)          = 11
> write(2, "cannot open ../socket: No such fi"..., 35) = 35
> write(2, "\n"..., 1)                    = 1
> exit_group(2)                           = ?
> Process 24909 detached
> 0 dkg@pip:~$
> 
> The socket has been deleted by the session destruction, of course -- i
> think we're seeing some sort of race condition between runsv bringing
> the service back up and cereal-admin removing the entire directory.
> 
> Sorry this isn't more conclusive yet, but i wanted to document what i'd
> found.

I _think_ that this might be a documentation issue in runsv(8). It now
says:

       x      Exit.   If  the  service  is running, send it a TERM signal, and
              then a CONT signal.  Do not restart the service.  If the service
              is down, and no log service exists, runsv exits.  If the service
              is down and a log service  exists,  runsv  closes  the  standard
              input of the log service, and waits for it to terminate.  If the
              log service is down, runsv exits.  This command is ignored if it
              is given to service/log/supervise/control.

And to me it looks like the shell script that is the log service does
not handle the clsoed stdin. But I am not an expert in shell scripts
that make so intensive use of redirection. #505608 against runit might
givi more insight.

In older versions of runit, this part of the documentation was
significantly different and did not mention that runit waits for the
log service to terminate voluntarily.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600420


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to