On 05/10/2016 18:43, Konstantin Belousov wrote:> Apply the following patch. I am interested if anything additional appear > on the console. Screenshot is good enough.Patch applied. Panic (easlily!) reproduced. No additional output. Screenshot: http://imgur.com/KOOBysH I guess init is dying before it gets there. -andyf
Konstantin Belousov
2016-Oct-05 13:36 UTC
Reproducible panic - Going nowhere without my init!
On Wed, Oct 05, 2016 at 07:32:33PM +1000, Andy Farkas wrote:> On 05/10/2016 18:43, Konstantin Belousov wrote: > > > Apply the following patch. I am interested if anything additional appear > > on the console. Screenshot is good enough. > > Patch applied. Panic (easlily!) reproduced. No additional output. > > Screenshot: http://imgur.com/KOOBysH > > I guess init is dying before it gets there.No, init does not die in your case, since error code is zero, and the termination signal is absent. It must occur because init explicitely called _exit(0). Please try this variation, I want to see if the error code changed. diff --git a/sbin/init/init.c b/sbin/init/init.c index bda86b5..1e88964 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -884,8 +884,13 @@ single_user(void) if (Reboot) { /* Instead of going single user, let's reboot the machine */ sync(); - reboot(howto); - _exit(0); + if (reboot(howto) == -1) { + emergency("reboot(%#x) failed, %s", howto, + strerror(errno)); + _exit(1); /* panic and reboot */ + } + warning("reboot(%#x) returned", howto); + _exit(97); /* panic as well */ } shell = get_shell();