Gentoo Archives: gentoo-dev

From: Charlie C <phceac@×××××.com>
To: gentoo-dev@g.o
Subject: [gentoo-dev] Re: Racing in init scripts
Date: Wed, 15 Oct 2003 23:00:34
Message-Id: bmkgmb$utu$
In Reply to: [gentoo-dev] Racing in init scripts by Eric Sammer
1 It is indeed a "very evil, very nasty thing" - as bugs like this tend to
2 end up "WORKSFORME". Like #22421
4 In almost all cases, I suspect, the solution is a "--retry -TERM/60", or
5 similar, in the "start-stop-daemon --stop" line....
6 This should probably be standard practice for all runscripts which use
7 start-stop-daemon. My own preference is to explicitly specify the signal
8 and timeout, but it can be simplified (... do the man thing!).
10 There are many, many, runscripts which (theoretically) will suffer from
11 a race like this. One potential "show stopper" is sshd...I wonder if
12 anyone has been locked out of a machine because of that one?
13 I tried, but was unable, to get "/etc/init.d/sshd restart" to fail -
14 perhaps the problem only bites when the daemon or process in question
15 has a trap for SIGTERM?
17 Anyway, for an example, please see
18 (from my own fair hand,
19 this very morning), or indeed #29932 or 28345.
21 Having a rather slow (and overloaded) machine, I've probably seen these
22 race conditions more than most.
24 Best wishes to all devs, and everyone else,
26 Charlie
28 -----------------
29 Eric Sammer wrote:
30 > While not exactly a "show stopper," I find that a number of the init
31 > scripts (namely apache, bind, and maybe cyrus, IIRC) race too quickly
32 > during a 'restart.'
33 >
37 --
38 gentoo-dev@g.o mailing list