Subject: kern/20914: kernel panic in sysctl_procargs()
To: None <>
From: Andrew Brown <>
List: netbsd-bugs
Date: 03/27/2003 23:07:03
>Number:         20914
>Category:       kern
>Synopsis:       kernel panic in sysctl_procargs()
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 27 20:08:00 PST 2003
>Originator:     TheMan
>Release:        1.6Q as of 20030325, kernel and userland

System: NetBSD this 1.6Q NetBSD 1.6Q (THAT) #172: Thu Mar 27 10:39:51 EST 2003
andrew@this:/usr/src/sys/arch/i386/compile/THAT i386


after making space for a crash dump (see bin/20913), i retrieved it
from the dump area, and proceeded to run dmesg and gdb at it.  dmesg
tells me this:

uvm_fault(0xc0453560, 0xcfab3000, 0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 eip c0247c75 cs 8 eflags 10246 cr2 cfab3e50 ilevel 0
panic: trap
Begin traceback...
trap() at trap+0x216
--- trap (number 6) ---
sysctl_procargs(cfa93f18,2,8064080,cfa93f0c,cf88569c) at sysctl_procargs+0x1fd
kern_sysctl(cfa93f14,3,8064080,cfa93f0c,0) at kern_sysctl+0x4b4
sys___sysctl(cf877788,cfa93f80,cfa93f78,c02d5f70,0) at sys___sysctl+0x1f2
syscall_plain(1f,1f,1f,1f,4) at syscall_plain+0xab

and gdb tells me this:

(gdb) bt
#0  0x1 in ?? ()
#1  0xc02cdae2 in cpu_reboot ()
#2  0xc02505ef in panic ()
#3  0xc02d5c92 in trap ()
#4  0xc0102b98 in calltrap ()
#5  0xc0245670 in kern_sysctl ()
#6  0xc0245162 in sys___sysctl ()
#7  0xc02d56eb in syscall_plain ()
#8  0xc0100ab3 in syscall1 ()

however gdb can also tell me this (numbers taken from the dmesg

(gdb) x/3d 0xcfa93f14
0xcfa93f14:     48      686     1
(gdb) x/2d 0xcfa93f18
0xcfa93f18:     686     1

48 is KERN_PROC_ARGS, 686 is the x server (see next pr), and 1 is
KERN_PROC_ARGV.  i've since recompiled the kernel with -g in hopes
(hopes?  for a crash?) that this will happen again and that i can get
more data.


i've done this a few times by chance, and more than once more or less
on purpose.  it seems to be based around "running ps at an inopportune
time while lots of things are running".


no idea.