supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
To: supervision@list.skarnet.org
Subject: Re: runsv spinning 100% CPU (was Re: runsv and EAGAIN)
Date: Tue, 10 Feb 2009 12:41:06 +0000 (UTC)	[thread overview]
Message-ID: <loom.20090210T123504-804@post.gmane.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0901201804020.6370@e-smith.charlieb.ott.istop.com>

Charlie Brady <charlieb-supervision <at> budge.apana.org.au> writes:
> I've finally found time to look at this issue again, and have found a way 
> to replicate the issue at will.
> 
> To replicate, create a service directory containing an empty file 
> supervise/control in place of the fifo. Create a symlink so that runsvdir 
> spawns a new runsv process. runsv will then behave as shown in the strace 
> plus commentary shown below.
> 
> The unexpected behaviour comes from a combination of two factors - 
> supervise/control is a file and not a fifo, and linux poll() sets POLLIN 
> for a regular file at EOF:
> 
> http://www.greenend.org.uk/rjk/2001/06/poll.html

Yes, I see.

> IMO this is an error condition which runsv should handle more gracefully. 
> The question is - how should the error be handled or corrected? One way 
> would be for runsv to replace any existing supervise/control at startup 
> unless it is a fifo.

Another option would be to have runsv print out an error message like
'supervise/control exists but is not a fifo.' and exit with 111.  This
may be better than forcefully removing a file.

Regards, Gerrit.




  reply	other threads:[~2009-02-10 12:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11 20:46 runsv and EAGAIN Charlie Brady
2008-07-12  1:27 ` Charlie Brady
2008-07-12 16:07   ` Dražen Kačar
2008-07-13  2:46     ` Charlie Brady
2009-01-20 23:21       ` runsv spinning 100% CPU (was Re: runsv and EAGAIN) Charlie Brady
2009-02-10 12:41         ` Gerrit Pape [this message]
2009-02-18  0:09           ` Laurent Bercot

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=loom.20090210T123504-804@post.gmane.org \
    --to=pape@smarden.org \
    --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).