Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Oct 2016 15:18:48 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Andy Farkas <chuzzwassa@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Reproducible panic - Going nowhere without my init!
Message-ID:  <20161007121848.GY38409@kib.kiev.ua>
In-Reply-To: <CAAJ1ec1omKtGBXATvyC96N22Ue6s6wp_dfmdkHGWDoqBfehMcw@mail.gmail.com>
References:  <CAAJ1ec1omKtGBXATvyC96N22Ue6s6wp_dfmdkHGWDoqBfehMcw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 07, 2016 at 08:32:24AM +1000, Andy Farkas wrote:
> With your latest patch applied, I ran through my procedure more
> than a dozen times and no panics!
> 
> Any explanation why sleep(STALL_TIMEOUT) as apposed to a
> bunch of sleep(1)'s tickles the panic?
What happened was sleep() got interrupted by a signal.

Normally reboot(8) stops init with SIGTSTP, then kill processes, then
calls reboot(2). reboot(8) does not and cannot get acknowledges for the
receipts of the signals by signalled processes, which indeed may result
in the sleep interruption if other signal is delivered to init before
SIGTSTP.

Patch does not add 'just bunch of sleeps'. The code in the patch ensures
that _exit() is called not earlier than STALL_TIMEOUT from the moment
of detection of the shell exit, by reissuing sleep(). I changed the
argument to 1 second to avoid situation where we e.g. sleep for 15 secs,
get interrupt and then sleep for whole 30 secs.  The overtime with
sleep(1) is limited to 1 second.

> 
> Also, it is definitely not sleeping for 30 seconds. I guess some
> event interrupts the sleep loop?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161007121848.GY38409>