From owner-freebsd-stable@freebsd.org Wed Oct 5 08:43:38 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A99FAF4743 for ; Wed, 5 Oct 2016 08:43:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A57BCF2A for ; Wed, 5 Oct 2016 08:43:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u958hNle063640 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 5 Oct 2016 11:43:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u958hNle063640 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u958hM6G063639; Wed, 5 Oct 2016 11:43:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 5 Oct 2016 11:43:22 +0300 From: Konstantin Belousov To: Andy Farkas Cc: Andy Farkas , freebsd-stable@freebsd.org Subject: Re: Reproducible panic - Going nowhere without my init! Message-ID: <20161005084322.GE38409@kib.kiev.ua> References: <20161004112443.GX38409@kib.kiev.ua> <57F3AA75.7020106@andyit.com.au> <57F403C2.6020304@andyit.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57F403C2.6020304@andyit.com.au> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 08:43:38 -0000 On Wed, Oct 05, 2016 at 05:32:18AM +1000, Andy Farkas wrote: > On 04/10/2016 23:11, Andy Farkas wrote: > > On 04/10/2016 21:24, Konstantin Belousov wrote: > >> On Tue, Oct 04, 2016 at 11:14:38AM +1000, Andy Farkas wrote: > >>> Is it just me or.... > >>> > >>> Step 1: boot > >>> Step 2: login as root > >>> Step 3: type "w" * > >>> Step 4: type "shutdown now; logout" > >>> Step 5: press at the 'Enter full pathname of shell or RETURN > >>> for > >>> /bin/sh:' prompt > >>> Step 6: type "reboot" > >>> Step 7: get a Panic: "Going nowhere without my init!" > >> This means that init process (pid 1) exited for some reason. Show > >> exact console log of the events. > > I can also offer a (badly taken) photo of the console screen: > > http://imgur.com/1xixODY > > -andyf > > ps. Thank you for taking an interest. I only really wanted to know > if anyone else could reproduce the panic because it has happened > on several of my (home network) boxes since 10.0.... Apply the following patch. I am interested if anything additional appear on the console. Screenshot is good enough. 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(0); /* panic as well */ } shell = get_shell();