Recovering from dead init

David Gibson david at gibson.dropbear.id.au
Sat Jul 13 22:30:40 EST 2002


On Sat, Jul 13, 2002 at 10:06:13PM +1000, Martijn van Oosterhout wrote:
> On Sat, Jul 13, 2002 at 07:04:50PM +1000, David Gibson wrote:
> > On Sat, Jul 13, 2002 at 03:32:39PM +1000, Martijn van Oosterhout wrote:
> > > Hi,
> > > 
> > > Due to an unfortunate accident, init got killed. It seems that now I'm
> > > getting lots of zombies piling up (around 300 now). I was wondering if
> > > anyone knew a way (other than reboot) to recover from this.
> > 
> > I think you'll find that init isn't actually dead, although it might
> > be in a deeply confused state.  If init had actually died you should
> > have got a kernel panic.
> 
> Good, point. It is still there.
> 
> USER       PID %CPU %MEM  SIZE   RSS TTY STAT START   TIME COMMAND
> root         1  0.0  0.1   768   256  ?  S   Jan 31   0:17         
> 
> > If you could convince what's left of init to (re-) exec() the init
> > binary that would probably recover things.  It might be possible to do
> > that with ptrace(), but probably quite hairy.
> 
> Heh. Except that init is the only process you are not allowed to ptrace.
> Hmm, the man page only says that ptrace is not permitted by init, but trying
> to ptrace init just says "Operation not permitted".

Oh, yeah, there is that.

> Not looking good...

Unless you can convince the corpse to do an exec() I think there's
nothing for it but a reboot.  You could try a kill -1, but in its
present state it's unlikely to respond.

-- 
David Gibson			| For every complex problem there is a
david at gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson




More information about the linux mailing list