From nobody Sun Aug 06 21:14:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJsdf25YHz4mRH3; Sun, 6 Aug 2023 21:14:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJsdd4XFwz4tVg; Sun, 6 Aug 2023 21:14:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 376LE6pP099688 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 7 Aug 2023 00:14:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 376LE6pP099688 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 376LE60Z099687; Mon, 7 Aug 2023 00:14:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 7 Aug 2023 00:14:06 +0300 From: Konstantin Belousov To: Marius Strobl Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 96c76d930656 - main - exit1(): Revert sparc64 workaround Message-ID: References: <202308062029.376KTvj6025811@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202308062029.376KTvj6025811@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4RJsdd4XFwz4tVg X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Sun, Aug 06, 2023 at 08:29:57PM +0000, Marius Strobl wrote: > The branch main has been updated by marius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=96c76d930656f13d3c041dc8d8f2fc3dd1e5e05a > > commit 96c76d930656f13d3c041dc8d8f2fc3dd1e5e05a > Author: Marius Strobl > AuthorDate: 2023-08-06 19:54:57 +0000 > Commit: Marius Strobl > CommitDate: 2023-08-06 20:26:01 +0000 > > exit1(): Revert sparc64 workaround > > If this still is a problem on other architectures, it should be fixed > properly. > > This reverts commit 5486ffc898503a846ecaf3f5ef9f9269beb4540e. > --- > sys/kern/kern_exit.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > index cb0939ded6e1..e3345c14df26 100644 > --- a/sys/kern/kern_exit.c > +++ b/sys/kern/kern_exit.c > @@ -238,13 +238,7 @@ exit1(struct thread *td, int rval, int signo) > TSPROCEXIT(td->td_proc->p_pid); > > p = td->td_proc; > - /* > - * XXX in case we're rebooting we just let init die in order to > - * work around an unsolved stack overflow seen very late during > - * shutdown on sparc64 when the gmirror worker process exists. > - * XXX what to do now that sparc64 is gone... remove if? > - */ > - if (p == initproc && rebooting == 0) { > + if (p == initproc) { > printf("init died (signal %d, exit %d)\n", signo, rval); > panic("Going nowhere without my init!"); > } I believe this was a right thing to do, regardless of the sparc64 stack overflow. When rebooting NFS-booted machine, page-in over NFS stops working, perhaps due to interface going down, while userspace is still alive. In this situation, pager returns KERN_FAILURE which translates to SIGSEGV to userspace. If init(8) process gets the signal, we would panic instead of continuing the reboot.