supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Charlie Brady <charlieb-supervision@budge.apana.org.au>
To: supervision@list.skarnet.org
Subject: Re: runsv failing when starting up logger - missing pipe - failure of logpipe init?
Date: Mon, 16 Aug 2010 19:30:02 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.1008161922530.25187@e-smith.charlieb.ott.istop.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1008161622390.20374@e-smith.charlieb.ott.istop.com>


On Mon, 16 Aug 2010, Charlie Brady wrote:

> Here's the code in runsv where the child is dying:
> 
> ...
>   if (p == 0) {
>     /* child */
>     if (haslog) {
>       if (s->islog) {
>         if (fd_copy(0, logpipe[0]) == -1)
>           fatal("unable to setup filedescriptor for ./log/run");
> ...
> 
> and here is where logpipe[0] should have been initialised:
> 
> ...
>       if (pipe(logpipe) == -1)
>         fatal("unable to create log pipe");
> ...
> 
> Has anyone else seen this error condition or can posit a situation where 
> it might be seen?

The next question to ponder is where the bug lies. The runsv process here 
has no fd 5 and fd 6 - IOW, logpipe[0] is 5, but isn't a valid fd. Are 
there circumstances where a pipe can just cease to be? Should runsv have 
detected this issue (where pipe() did not return -1, but the fds returned 
were not valid)?

Is this a linux kernel bug?


  reply	other threads:[~2010-08-16 23:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 20:32 Charlie Brady
2010-08-16 23:30 ` Charlie Brady [this message]
2010-08-17  7:57   ` Laurent Bercot
2010-08-17 11:56     ` Charlie Brady
2010-08-17 20:51     ` Charlie Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1008161922530.25187@e-smith.charlieb.ott.istop.com \
    --to=charlieb-supervision@budge.apana.org.au \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).