NetBSD Problem Report #49610
From Manuel.Bouyer@lip6.fr Tue Jan 27 15:20:17 2015
Return-Path: <Manuel.Bouyer@lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 1BA6EA567D
for <gnats-bugs@gnats.NetBSD.org>; Tue, 27 Jan 2015 15:20:17 +0000 (UTC)
Message-Id: <20150127152012.D182E34D43@armandeche.soc.lip6.fr>
Date: Tue, 27 Jan 2015 16:20:12 +0100 (MET)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@gnats.NetBSD.org
Subject: reboot -d doesn't create a crash dump
X-Send-Pr-Version: 3.95
>Number: 49610
>Category: kern
>Synopsis: reboot -d doesn't create a crash dump
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 27 15:25:00 +0000 2015
>Closed-Date: Wed Jul 05 19:23:03 +0000 2017
>Last-Modified: Wed Jul 05 20:25:01 +0000 2017
>Originator: Manuel Bouyer
>Release: NetBSD 7.0_BETA
>Organization:
>Environment:
System: NetBSD yquem.soc.lip6.fr 7.0_BETA NetBSD 7.0_BETA (DRMKMS) amd64
Architecture: amd64
Machine: amd64
>Description:
doing a 'reboot -d' doens't cause a kernel core dump any more:
[...]
forcefully unmounting / (/dev/wd0a)...
forcefully unmounted /dev/wd0a on / type ffs
wd0: detached
atabus0: detached
dumping to dev 0,1 (offset=3416, size=2081841):
dump area unavailable
detaching the disk before doing the dump is probably
not a good idea ...
>How-To-Repeat:
reboot -d
>Fix:
This patch makes reboot -d works again. A small patch
to pmap.c is also needed. Maybe something better can be done ...
Index: sys/arch/amd64/amd64/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.211
diff -u -p -u -r1.211 machdep.c
--- sys/arch/amd64/amd64/machdep.c 12 May 2014 22:50:03 -0000 1.211
+++ sys/arch/amd64/amd64/machdep.c 27 Jan 2015 15:19:14 -0000
@@ -655,7 +655,7 @@ cpu_reboot(int howto, char *bootstr)
}
while (vfs_unmountall1(curlwp, false, false) ||
- config_detach_all(boothowto) ||
+ ((howto & RB_DUMP) == 0 && config_detach_all(boothowto)) ||
vfs_unmount_forceone(curlwp))
; /* do nothing */
} else
Index: sys/arch/x86/x86/pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/pmap.c,v
retrieving revision 1.183.2.1
diff -u -p -u -r1.183.2.1 pmap.c
--- sys/arch/x86/x86/pmap.c 14 Oct 2014 07:37:37 -0000 1.183.2.1
+++ sys/arch/x86/x86/pmap.c 27 Jan 2015 15:19:14 -0000
@@ -1160,7 +1160,6 @@ void
pmap_kremove_local(vaddr_t sva, vsize_t len)
{
- KASSERT(panicstr != NULL);
pmap_kremove1(sva, len, true);
}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Fri, 16 Jun 2017 20:59:46 +0000
State-Changed-Why:
reboot -d works for me on amd64 and i386 fine. Is this still problem?
From: Manuel Bouyer <manuel.bouyer@lip6.fr>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
jdolecek@NetBSD.org
Subject: Re: kern/49610 (reboot -d doesn't create a crash dump)
Date: Fri, 23 Jun 2017 12:36:13 +0200
On Fri, Jun 16, 2017 at 08:59:46PM +0000, jdolecek@NetBSD.org wrote:
> Synopsis: reboot -d doesn't create a crash dump
>
> State-Changed-From-To: open->feedback
> State-Changed-By: jdolecek@NetBSD.org
> State-Changed-When: Fri, 16 Jun 2017 20:59:46 +0000
> State-Changed-Why:
> reboot -d works for me on amd64 and i386 fine. Is this still problem?
on 8.0_BETA amd64 reboot -d still doesn't work,
fails with probably a call to panic(), but I don't know which one
(all I get is "panicstr != NULL"). As this box has a USB keyboard
I can't get more details.
But the initial issue (where the dump device was detached before the dump)
seems fixed.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--
Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Fri, 23 Jun 2017 18:53:54 +0000
Responsible-Changed-Why:
I'll take care of this.
State-Changed-From-To: feedback->open
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Fri, 23 Jun 2017 18:53:54 +0000
State-Changed-Why:
Feedback provided. Overlooked the patch. I have same problem when attempting
to dump to siisata(4) attached disk, fixing this would clear one item off
TODO.ncq, so I'll see how well the patch works.
From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/49610 CVS commit: src/sys/arch/x86/x86
Date: Fri, 23 Jun 2017 23:40:00 +0000
Module Name: src
Committed By: jdolecek
Date: Fri Jun 23 23:40:00 UTC 2017
Modified Files:
src/sys/arch/x86/x86: pmap.c
Log Message:
remove panicstr KASSERT() in pmap_kremove_local() - kernel dump can legitimely
invoked also without panic - via reboot -d
fixes PR kern/49610 by Manuel Bouyer
To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/arch/x86/x86/pmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Fri, 23 Jun 2017 23:50:54 +0000
State-Changed-Why:
Fix commited on HEAD (-current). Can you please confirm it fixes the problem?
I'll then request pullup to netbsd-8. Thank yo.
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/49610 (reboot -d doesn't create a crash dump)
Date: Sat, 24 Jun 2017 09:52:28 -0000 (UTC)
manuel.bouyer@lip6.fr (Manuel Bouyer) writes:
> on 8.0_BETA amd64 reboot -d still doesn't work,
> fails with probably a call to panic(), but I don't know which one
> (all I get is "panicstr != NULL"). As this box has a USB keyboard
> I can't get more details.
I get the same in -current.
sys_reboot
-> dumpsys
-> dodumpsys
-> dump_set_iter
-> dumpsys_seg
-> pmap_kremove_local
sys/arch/x86/x86/pmap.c line 1158: "panicstr != NULL"
Unfortunately panicstr is already overwritten by the assertion message.
--
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."
From: =?UTF-8?B?SmFyb23DrXIgRG9sZcSNZWs=?= <jaromir.dolecek@gmail.com>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org
Subject: Re: kern/49610 (reboot -d doesn't create a crash dump)
Date: Wed, 5 Jul 2017 09:49:38 +0200
--001a1141ef62fd78bb05538d3d1f
Content-Type: text/plain; charset="UTF-8"
Can you please confirm if this still happens with src/sys/arch/x86/x86:
pmap.c 1.252? That "panicstr != NULL" should no longer happen with that
change.
Jaromir
2017-06-24 11:55 GMT+02:00 Michael van Elst <mlelstv@serpens.de>:
> The following reply was made to PR kern/49610; it has been noted by GNATS.
>
> From: mlelstv@serpens.de (Michael van Elst)
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: kern/49610 (reboot -d doesn't create a crash dump)
> Date: Sat, 24 Jun 2017 09:52:28 -0000 (UTC)
>
> manuel.bouyer@lip6.fr (Manuel Bouyer) writes:
>
> > on 8.0_BETA amd64 reboot -d still doesn't work,
> > fails with probably a call to panic(), but I don't know which one
> > (all I get is "panicstr != NULL"). As this box has a USB keyboard
> > I can't get more details.
>
> I get the same in -current.
>
> sys_reboot
> -> dumpsys
> -> dodumpsys
> -> dump_set_iter
> -> dumpsys_seg
> -> pmap_kremove_local
> sys/arch/x86/x86/pmap.c line 1158: "panicstr != NULL"
>
> Unfortunately panicstr is already overwritten by the assertion message.
>
> --
> --
> Michael van Elst
> Internet: mlelstv@serpens.de
> "A potential Snark may lurk in every
> tree."
>
>
--001a1141ef62fd78bb05538d3d1f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Can you please confirm if this still happens with=C2=A0<sp=
an style=3D"color:rgb(0,0,0)">src/sys/arch/x86/x86: pmap.c 1.252? That &quo=
t;panicstr !=3D NULL" should no longer happen with that change.</span>=
<div><span style=3D"color:rgb(0,0,0)"><br></span></div><div><span style=3D"=
color:rgb(0,0,0)">Jaromir</span></div></div><div class=3D"gmail_extra"><br>=
<div class=3D"gmail_quote">2017-06-24 11:55 GMT+02:00 Michael van Elst <spa=
n dir=3D"ltr"><<a href=3D"mailto:mlelstv@serpens.de" target=3D"_blank">m=
lelstv@serpens.de</a>></span>:<br><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span c=
lass=3D"">The following reply was made to PR kern/49610; it has been noted =
by GNATS.<br>
<br>
</span>From: <a href=3D"mailto:mlelstv@serpens.de">mlelstv@serpens.de</a> (=
Michael van Elst)<br>
To: <a href=3D"mailto:gnats-bugs@netbsd.org">gnats-bugs@netbsd.org</a><br>
Cc:<br>
Subject: Re: kern/49610 (reboot -d doesn't create a crash dump)<br>
Date: Sat, 24 Jun 2017 09:52:28 -0000 (UTC)<br>
<span class=3D""><br>
=C2=A0<a href=3D"mailto:manuel.bouyer@lip6.fr">manuel.bouyer@lip6.fr</a> (M=
anuel Bouyer) writes:<br>
<br>
=C2=A0> on 8.0_BETA amd64 reboot -d still doesn't work,<br>
=C2=A0> fails with probably a call to panic(), but I don't know whic=
h one<br>
=C2=A0> (all I get is "panicstr !=3D NULL"). As this box has a=
USB keyboard<br>
=C2=A0> I can't get more details.<br>
<br>
</span>=C2=A0I get the same in -current.<br>
<br>
=C2=A0sys_reboot<br>
=C2=A0-> dumpsys<br>
=C2=A0-> dodumpsys<br>
=C2=A0-> dump_set_iter<br>
=C2=A0-> dumpsys_seg<br>
=C2=A0-> pmap_kremove_local<br>
=C2=A0sys/arch/x86/x86/pmap.c line 1158:=C2=A0 "panicstr !=3D NULL&quo=
t;<br>
<br>
=C2=A0Unfortunately panicstr is already overwritten by the assertion messag=
e.<br>
<br>
=C2=A0--<br>
=C2=A0--<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Michael van Elst<br>
=C2=A0Internet: <a href=3D"mailto:mlelstv@serpens.de">mlelstv@serpens.de</a=
><br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"A potential Snark may lu=
rk in every tree."<br>
<br>
</blockquote></div><br></div>
--001a1141ef62fd78bb05538d3d1f--
From: Manuel Bouyer <manuel.bouyer@lip6.fr>
To: gnats-bugs@NetBSD.org
Cc: jdolecek@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/49610 (reboot -d doesn't create a crash dump)
Date: Wed, 5 Jul 2017 12:17:50 +0200
On Wed, Jul 05, 2017 at 07:50:01AM +0000, Jaromír Dole?ek wrote:
> Can you please confirm if this still happens with src/sys/arch/x86/x86:
> pmap.c 1.252? That "panicstr != NULL" should no longer happen with that
> change.
It does indeed fix the problem
Sorry for the delay
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--
State-Changed-From-To: feedback->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Wed, 05 Jul 2017 19:23:03 +0000
State-Changed-Why:
Confirmed fixed. Pullup for netbsd-8 already requested, ticket #98.
From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/49610 CVS commit: [netbsd-8] src/sys/arch/x86/x86
Date: Wed, 5 Jul 2017 20:23:09 +0000
Module Name: src
Committed By: snj
Date: Wed Jul 5 20:23:09 UTC 2017
Modified Files:
src/sys/arch/x86/x86 [netbsd-8]: pmap.c
Log Message:
Pull up following revision(s) (requested by jdolecek in ticket #98):
sys/arch/x86/x86/pmap.c: revision 1.252
remove panicstr KASSERT() in pmap_kremove_local() - kernel dump can
legitimely invoked also without panic - via reboot -d
fixes PR kern/49610 by Manuel Bouyer
To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.245.6.1 src/sys/arch/x86/x86/pmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.