public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Charlie C <phceac@yahoo.com>
To: gentoo-dev@gentoo.org
Subject: [gentoo-dev] Re: Racing in init scripts
Date: Thu, 16 Oct 2003 00:11:19 +0200	[thread overview]
Message-ID: <bmkgmb$utu$1@sea.gmane.org> (raw)
In-Reply-To: <3F8CA48A.40808@ineoconcepts.com>

It is indeed a "very evil, very nasty thing" - as bugs like this tend to 
end up "WORKSFORME". Like #22421

In almost all cases, I suspect, the solution is a "--retry -TERM/60", or 
similar, in the "start-stop-daemon --stop" line....
This should probably be standard practice for all runscripts which use 
start-stop-daemon. My own preference is to explicitly specify the signal 
and timeout, but it can be simplified (... do the man thing!).

There are many, many, runscripts which (theoretically) will suffer from 
a race like this. One potential "show stopper" is sshd...I wonder if 
anyone has been locked out of a machine because of that one?
I tried, but was unable, to get "/etc/init.d/sshd restart" to fail - 
perhaps the problem only bites when the daemon or process in question 
has a trap for SIGTERM?

Anyway, for an example, please see 
http://bugs.gentoo.org/show_bug.cgi?id=31125 (from my own fair hand, 
this very morning), or indeed #29932 or 28345.

Having a rather slow (and overloaded) machine, I've probably seen these 
race conditions more than most.

Best wishes to all devs, and everyone else,

Charlie

-----------------
Eric Sammer wrote:
> While not exactly a "show stopper," I find that a number of the init 
> scripts (namely apache, bind, and maybe cyrus, IIRC) race too quickly 
> during a 'restart.'
> 



--
gentoo-dev@gentoo.org mailing list


      parent reply	other threads:[~2003-10-15 23:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15  1:36 [gentoo-dev] Racing in init scripts Eric Sammer
2003-10-15  8:21 ` Paul de Vrieze
2003-10-15  8:42   ` Eric Sammer
2003-10-15 13:11     ` Corvus Corax
2003-10-15 13:35       ` Paul de Vrieze
2003-10-15 13:01 ` Stroller
2003-10-15 22:11 ` Charlie C [this message]

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='bmkgmb$utu$1@sea.gmane.org' \
    --to=phceac@yahoo.com \
    --cc=gentoo-dev@gentoo.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