From nobody Sun Aug 6 21:31:27 2023 X-Original-To: dev-commits-src-all@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 4RJt1Z6Y49z4mSD8; Sun, 6 Aug 2023 21:31:30 +0000 (UTC) (envelope-from marius@btk.zeist.de) Received: from btk.zeist.de (btk.zeist.de [IPv6:2a01:4f8:221:2f4f::2]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "btk.zeist.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJt1Z3y2pz3CKW; Sun, 6 Aug 2023 21:31:30 +0000 (UTC) (envelope-from marius@btk.zeist.de) Authentication-Results: mx1.freebsd.org; none Received: from btk.zeist.de (localhost [127.0.0.1]) by btk.zeist.de (8.17.1/8.17.1/BTK.ZEIST.DE) with ESMTPS id 376LVROF031477 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 6 Aug 2023 23:31:27 +0200 (CEST) (envelope-from marius@btk.zeist.de) Received: (from marius@localhost) by btk.zeist.de (8.17.1/8.17.1/Submit) id 376LVRMv031476; Sun, 6 Aug 2023 23:31:27 +0200 (CEST) (envelope-from marius) Date: Sun, 6 Aug 2023 23:31:27 +0200 From: Marius Strobl To: Konstantin Belousov 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4RJt1Z3y2pz3CKW 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:24940, ipnet:2a01:4f8::/32, country:DE] On Mon, Aug 07, 2023 at 12:14:06AM +0300, Konstantin Belousov wrote: > 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. Well, I used to reboot NFS-boot machines _a lot_ during development and never saw the problem in that context (even with the workaround in place, I would have seen init(8) die), only when rebooting hosts booted from a gmirror(4)-backed file-system. However, feel free to put the code back with an appropriate comment if you think it's generally the right thing to to. Marius