NetBSD Problem Report #41310

From hf@spg.tu-darmstadt.de  Thu Apr 30 15:37:07 2009
Return-Path: <hf@spg.tu-darmstadt.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D819D63B8A5
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 30 Apr 2009 15:37:07 +0000 (UTC)
Message-Id: <200904301532.n3UFWD25003628@Gstoder.nt.e-technik.tu-darmstadt.de>
Date: Thu, 30 Apr 2009 17:32:13 +0200 (CEST)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@gnats.NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: NetBSD 5 savecore does not
X-Send-Pr-Version: 3.95

>Number:         41310
>Notify-List:    gson@gson.org
>Category:       kern
>Synopsis:       NetBSD 5 savecore fails to recognize and save a core dump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 30 15:40:00 +0000 2009
>Closed-Date:    Fri Jun 16 18:21:59 +0000 2017
>Last-Modified:  Fri Jun 16 18:21:59 +0000 2017
>Originator:     Hauke Fath
>Release:        NetBSD 5.0
>Organization:
-- 
     The ASCII Ribbon Campaign                    Hauke Fath
()     No HTML/RTF in email	        Institut für Nachrichtentechnik
/\     No Word docs in email                     TU Darmstadt
     Respect for open standards              Ruf +49-6151-16-3281
>Environment:


System: NetBSD Vertatscha 5.0 NetBSD 5.0 (FIFI_PF) #0: Wed Apr 29 14:13:50 CEST 2009  hf@Hochstuhl:/var/obj/netbsd-builds/5/i386/sys/arch/i386/compile/FIFI_PF i386
Architecture: i386
Machine: i386
>Description:

	After a kernel panic and subsequent core dump (either
	automatically or by a 'reboot 0x104' from ddb), savecore finds
	a dump but claims it is unreadable:

[...]
Checking for core dump...
savecore: reboot after panic: panic: LOCKDEBUG
Apr 30 17:15:55 Vertatscha savecore: reboot after panic: panic: LOCKDEBUG
savecore: system went down at Thu Apr 30 17:02:46 2009
savecore: (null): Bad address
Apr 30 17:15:55 Vertatscha savecore: (null): Bad address
[...]

	I am making this 'kern' because I guess savecore is intimately
	tied to the kernel. Feel free to move the PR elsewhere.

>How-To-Repeat:

	Experience or force a system core dump. Find it's not readable.

>Fix:
	No idea.

>Release-Note:

>Audit-Trail:
From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org
Subject: Re: kern/41310: NetBSD 5 savecore does not
Date: Thu, 30 Apr 2009 18:34:51 +0200

 At 15:40 Uhr +0000 30.04.2009, Hauke Fath wrote:
 >	Experience or force a system core dump. Find it's not readable.

 I just tried on my desktop machine - same problem.

 -- 

From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
        Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Re: kern/41310: NetBSD 5 savecore does not
Date: Thu, 30 Apr 2009 19:19:32 +0200


 Can you try
 savecore -N /netbsd

 From memory I think it's how I got it to work

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
	Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Re: kern/41310: NetBSD 5 savecore does not 
Date: Thu, 30 Apr 2009 19:37:33 +0200

 The "kernel" string in savecore.c can be NULL now. This is fine
 for kvm_openfiles(3), but not for open(2) or as a printf
 argument...
 It was good to drop use of getbootfile(3), but this
 wasn't done correctly.

 best regards
 Matthias




From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: M.Drochner@fz-juelich.de
Cc: Manuel Bouyer <bouyer@antioche.eu.org>, gnats-bugs@NetBSD.org,
	kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org, Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Re: kern/41310: NetBSD 5 savecore does not 
Date: Thu, 30 Apr 2009 19:59:16 +0200

 M.Drochner@fz-juelich.de said:
 > It was good to drop use of getbootfile(3)

 While we are here: The kernel saved by savecore is usually
 useless for me, for multiple reasons:
 -getbootfile(3) doesn't work if the kernel wasn't loaded
  from the root file system (eg by TFTP)
 -even if it works this is not necessarily the kernel
  belonging to the crash dump
 -I have a netbsd.gdb in the kernel build directory which
  is obviously better for debugging.
 So I would like some option to savecore(8) which makes
 that it just saves the crashdump but doesn't care
 about the kernel.

 best regards
 Matthias




From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org
Subject: Re: kern/41310: NetBSD 5 savecore does not
Date: Thu, 30 Apr 2009 22:03:51 +0200

 At 17:20 Uhr +0000 30.04.2009, Manuel Bouyer wrote:
 >  Can you try
 >  savecore -N /netbsd
 >
 >  From memory I think it's how I got it to work

 I've set the trap for PR 41311 by adjusting savecore_flags in 
 rc.conf, and enabling kern.dump_on_panic. If my keyboard theory 
 doesn't hold, I should at least get a nice coredump.

 Thanks!
 	hauke

 -- 

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org
Subject: Re: kern/41310: NetBSD 5 savecore does not
Date: Thu, 30 Apr 2009 22:09:42 +0200

 At 17:40 Uhr +0000 30.04.2009, Matthias Drochner wrote:
 >  The "kernel" string in savecore.c can be NULL now. This is fine
 >  for kvm_openfiles(3), but not for open(2) or as a printf
 >  argument...
 >  It was good to drop use of getbootfile(3), but this
 >  wasn't done correctly.

 Nor documented, if I read savecore(8) correctly:

 -N         Use system as the kernel instead of the default (returned by
             getbootfile(3)).  Note that getbootfile(3) uses secure_path(3)
             to check that kernel file is ``secure'' and will default to
             /netbsd if the check fails.

 [hf@Gstoder] ~ > fgrep getbootfile /misc/netbsd-5/sbin/savecore/*
 /misc/netbsd-5/sbin/savecore/savecore.8:.Xr getbootfile 3 ) .
 /misc/netbsd-5/sbin/savecore/savecore.8:.Xr getbootfile 3
 [hf@Gstoder] ~ >

 -- 

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/41310: NetBSD 5 savecore does not
Date: Fri, 1 May 2009 12:45:58 +0200

 At 20:30 Uhr +0000 30.04.2009, Hauke Fath wrote:
 >  I've set the trap for PR 41311 by adjusting savecore_flags in
 >  rc.conf, and enabling kern.dump_on_panic. If my keyboard theory
 >  doesn't hold, I should at least get a nice coredump.

 Works; I got a usable coredump that way.

 -- 

State-Changed-From-To: open->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Fri, 16 Jun 2017 18:21:59 +0000
State-Changed-Why:
Fixed via savecore -N.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.