NetBSD Problem Report #723

From gnats  Tue Jan 10 18:06:02 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id SAA00685 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 10 Jan 1995 18:06:01 -0800
Message-Id: <199501110135.UAA07279@kolvir.blrc.ma.us>
Date: Tue, 10 Jan 1995 20:35:59 -0500
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@NetBSD.ORG
Subject: kernel post-mortems on i386 don't work
X-Send-Pr-Version: 3.2

>Number:         723
>Category:       port-i386
>Synopsis:       kernel post-mortems on i386 don't work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 10 18:20:06 +0000 1995
>Closed-Date:    Sat Aug 23 01:49:31 +0000 1997
>Last-Modified:  Sat Aug 23 01:50:07 +0000 1997
>Originator:     John Kohl
>Release:        1.0A
>Organization:
NetBSD Kernel Hackers `R` Us
>Environment:

System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #39: Wed Dec 21 22:18:44 EST 1994 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386


>Description:
'gdb -k' doesn't work properly for debugging i386 crash dumps.

It looks like libkvm is missing support in kvm_i386.c:_kvm_kvatop().

I also noticed that the call to kvm_open() from gdb's
kcorelow.c:kcore_open() doesn't pass in the symbol file name--making it
default to /netbsd.

>How-To-Repeat:
	Try to debug a crash dump, you'll get something like:

# gdb -k netbsd.1 vmcore.1 
(no debugging symbols found)...
/usr/vice/cache/crash/vmcore.1: No such file or directory.
(kgdb) 

>Fix:

I guess it requires some gross hacks in the kvm_i386 support to go page
table walking?

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mrg 
State-Changed-When: Sun Jul 6 03:30:11 PDT 1997 
State-Changed-Why:  
i'm told this is now working... 
State-Changed-From-To: closed->open 
State-Changed-By: jtk 
State-Changed-When: Tue Jul 8 19:57:41 PDT 1997 
State-Changed-Why:  
reopening (see further details via email) since stack traces for curproc 
are still broken 

From: John Kohl <jtk@kolvir.arlington-heights.ma.us>
To: mrg@NetBSD.ORG
Cc: gnats-admin@NetBSD.ORG
Subject: Re: port-i386/723
Date: Tue, 8 Jul 1997 22:59:14 -0400 (EDT)

 This is still a bug.

 I can examine kernel stacks of processes which are not curproc, but gdb
 can't find the proper stack traceback for curproc.

 % ps -xa -O paddr -M netbsd.2.core 
   PID  PADDR TT  STAT      TIME COMMAND
     0 220bdc ??  DLs    0:00.01 (swapper)
     1 7ec400 ??  Ss     0:00.22 /sbin/init 
     2 7ec200 ??  DL     0:00.09 (pagedaemon)
    86 807800 ??  IWs    0:00.00 /sbin/dhclient de0 
   106 807a00 ??  Rs     0:00.17 syslogd 
   110 807000 ??  IWs    0:00.04 named 
   113 807400 ??  IWs    0:00.02 portmap 
   123 7fea00 ??  IWs    0:00.02 mountd 
   126 807600 ??  IWs    0:00.02 nfsd: master (nfsd)
   128 7ef800 ??  IW     0:00.00 nfsd: server (nfsd)
   129 847e00 ??  IW     0:00.01 nfsd: server (nfsd)
   130 847c00 ??  IW     0:00.01 nfsd: server (nfsd)
   131 847a00 ??  IW     0:00.01 nfsd: server (nfsd)
   135 84be00 ??  IW     0:00.01 nfsiod -n 4 
   136 84bc00 ??  IW     0:00.00 nfsiod -n 4 
   137 84ba00 ??  IW     0:00.00 nfsiod -n 4 
   138 84b800 ??  IW     0:00.01 nfsiod -n 4 
   173 847000 ??  Is     0:00.36 update 30 
   175 84b600 ??  IWs    0:00.04 cron 
   188 84b400 ??  S<s    0:00.08 xntpd -p /var/run/xntpd.pid 
   193 84b200 ??  Ss     0:00.07 dhcpd 
   199 877e00 ??  IWs    0:00.13 lpd 
   223 87f800 ??  IWs    0:00.03 sendmail: accepting connections on port 25 (sen
   232 877000 ??  IWs    0:00.06 inetd 
   235 87f000 ??  IWs    0:00.04 /usr/local/sbin/faxq 
   238 877600 ??  IWs    0:02.36 /usr/local/sbin/sshd 
   266 807200 ??  IWs    0:00.01 /usr/vice/etc/afsd -nosettime 
   298 877800 ??  IW     0:00.02 /etc/athena/zhm 
   307 87f400 ??  IW     0:00.21 /usr/X11R6/bin/xdm -nodaemon ttyv7 
   309 87fe00 ??  IW     0:00.19 /usr/local/libexec/faxgetty -d tty02 
   312 7ec000 ??  Ss     0:03.94 /usr/X11R6/bin/X -terminate vt8 -auth /usr/X11R
   313 9f3a00 ??  IWs    0:00.14 -:0                                            
   324 877a00 ??  IWs    0:00.51 xterm -e /u1/users/jtk/lib/scripts/xinitrc 
   328 a04400 ??  S      0:00.02 ssh-agent xterm -iconic -xrm *Foreground:cyan -
   380 a04200 ??  IWs    0:00.05 /usr/local/libexec/emacs/19.30/i386-unknown-net
   329 a04600 p1  IWs+   0:00.56 -usr/local/bin/tcsh 
   348 a04800 p1  IW     0:00.02 /bin/csh -f /u1/users/jtk/lib/scripts/xinitrc 
   349 a04e00 p1  S      0:00.35 vtwm 
   353 a04c00 p1  R      0:00.22 xconsole 
   354 a04a00 p1  I      0:03.47 emacs 
   355 a04000 p1  S      0:00.82 xterm 
   357 a0fc00 p1  S      0:00.20 xbiff 
   362 a0f200 p2  Ss     0:00.46 -csh (tcsh)
   403 a0f800 p2  S      0:00.25 -csh (csh)
   414 a0fe00 p2  R+     0:00.23 ./reboot-quick 
   379 a0fa00 p3  IWs+   0:00.06 /usr/local/libexec/emacs/19.30/i386-unknown-net
   308 87fa00 00  IWs+   0:00.07 /usr/libexec/getty std.9600 tty00 
   300 9f3800 v0  IWs+   0:00.06 /usr/libexec/getty console ttyv0 
   301 9f3600 v1  IWs+   0:00.06 /usr/libexec/getty console ttyv1 
   302 9f3400 v2  IWs+   0:00.06 /usr/libexec/getty console ttyv2 
   303 9f3200 v3  IWs+   0:00.06 /usr/libexec/getty console ttyv3 
   304 9f3000 v4  IWs+   0:00.07 /usr/libexec/getty console ttyv4 
   305 9f3c00 v5  IWs+   0:00.07 /usr/libexec/getty console ttyv5 
   306 9f3e00 v6  IWs+   0:00.07 /usr/libexec/getty console ttyv6 
 pattern:/var/crash                                                              % gdb -k netbsd.2*
 GDB is free software and you are welcome to distribute copies of it
  under certain conditions; type "show copying" to see the conditions.
 There is absolutely no warranty for GDB; type "show warranty" for details.
 GDB 4.11 (i386-netbsd), Copyright 1993 Free Software Foundation, Inc...
 (no debugging symbols found)...
 #0  0xfb2e3d60 in end ()
 (kgdb) where
 #0  0xfb2e3d60 in end ()
 #1  0x10 in ?? ()
 (kgdb) proc 0xf8a0f800
 (kgdb) where
 #0  0xf811bda9 in mi_switch ()
 #1  0xf811b7cd in bpendtsleep ()
 #2  0xf81186de in sys_sigsuspend ()
 #3  0xf81af510 in syscall ()
 (kgdb) proc 0xf8a0fe00
 (kgdb) where
 #0  0xfb2e3d60 in end ()
 #1  0x10 in ?? ()
 (kgdb) quit

State-Changed-From-To: open->closed 
State-Changed-By: jtk 
State-Changed-When: Fri Aug 22 18:49:31 PDT 1997 
State-Changed-Why:  
the problem for which this was reopened is distinct from the original report. 
please file a separate PR. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.