From nobody@FreeBSD.org  Fri Jan 20 04:56:43 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 705C916A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Jan 2006 04:56:43 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C78CF43D49
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Jan 2006 04:56:42 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0K4ugYq025598
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Jan 2006 04:56:42 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0K4ugwu025597;
	Fri, 20 Jan 2006 04:56:42 GMT
	(envelope-from nobody)
Message-Id: <200601200456.k0K4ugwu025597@www.freebsd.org>
Date: Fri, 20 Jan 2006 04:56:42 GMT
From: KOIE Hidetaka <hide@koie.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: sysctl -a causes panic
X-Send-Pr-Version: www-2.3

>Number:         92039
>Category:       kern
>Synopsis:       sysctl -a causes panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 20 05:00:20 GMT 2006
>Closed-Date:    Sun Mar 25 12:14:09 GMT 2007
>Last-Modified:  Sun Mar 25 12:14:09 GMT 2007
>Originator:     KOIE Hidetaka
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
surigiken
>Environment:
System: FreeBSD sakura.suri.co.jp 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Fri Jan 13
 16:12:30 JST 2006 koie@sakura.suri.co.jp:/usr/obj/usr/src/sys/SAKURA i386

        INVARIANTS and WITNESS are disabled.

>Description:
"sysctl -a | less" causes panic very often (not always).


Script started on Fri Jan 20 13:24:59 2006
sakura#	uname -a
FreeBSD sakura.suri.co.jp 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Fri Jan 13 16:12:30 JST 2006     koie@sakura.suri.co.jp:/usr/obj/usr/src/sys/SAKURA  i386
sakura#	kgdb /usr/obj/usr/src/sys/SAKURA/kernel vmcore.30
[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:


Fatal trap 12: page fault while in kernel mode
fault virtual address	= 0xbf
fault code		= supervisor read, page not present
instruction pointer	= 0x20:0xc04cf7e5
stack pointer	        = 0x28:0xcd3f0ac8
frame pointer	        = 0x28:0xcd3f0ac8
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 50396 (sysctl)
trap number		= 12
panic: page fault
Uptime: 3d19h14m8s
Dumping 255 MB (2 chunks)
  chunk 0: 1MB (159 pages) ... ok
  chunk 1: 255MB (65264 pages) 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15

#0  doadump () at pcpu.h:166
166	pcpu.h: No such file or directory.
	in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:166
#1  0xc051b2f8 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:399
#2  0xc051b590 in panic (fmt=0xc06bd342 "%s")
    at /usr/src/sys/kern/kern_shutdown.c:555
#3  0xc069672c in trap_fatal (frame=0xcd3f0a88, eva=191)
    at /usr/src/sys/i386/i386/trap.c:862
#4  0xc0696493 in trap_pfault (frame=0xcd3f0a88, usermode=0, eva=191)
    at /usr/src/sys/i386/i386/trap.c:770
#5  0xc06960cd in trap (frame=
      {tf_fs = -851509240, tf_es = 40, tf_ds = -851509208, tf_edi = -851506388, tf_esi = -1036914688, tf_ebp = -851506488, tf_isp = -851506508, tf_ebx = -1036914688, tf_edx = -1037927936, tf_ecx = 0, tf_eax = -1, tf_trapno = 12, tf_err = 0, tf_eip = -1068697627, tf_cs = 32, tf_eflags = 66182, tf_esp = -851506320, tf_ss = -1068178089}) at /usr/src/sys/i386/i386/trap.c:455
#6  0xc068826a in calltrap () at /usr/src/sys/i386/i386/exception.s:137
#7  0xc04cf7e5 in dev2udev (x=0xc2227a00)
    at /usr/src/sys/fs/devfs/devfs_vnops.c:1169
#8  0xc054e557 in sysctl_kern_ttys (oidp=0xc0708de0, arg1=0x0, arg2=0, 
    req=0xcd3f0bb4) at /usr/src/sys/kern/tty.c:3011
#9  0xc0523b43 in sysctl_root (oidp=0x0, arg1=0x0, arg2=0, req=0xcd3f0bb4)
    at /usr/src/sys/kern/kern_sysctl.c:1248
#10 0xc0523d40 in userland_sysctl (td=0xffffffff, name=0xcd3f0c24, namelen=2, 
    old=0xcd3f0bb4, oldlenp=0xbfbfd76c, inkernel=0, new=0x0, 
    newlen=4294967295, retval=0xcd3f0c20, flags=-1)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/sys/kern/kern_sysctl.c:1347
#11 0xc0523be3 in __sysctl (td=0xc269b780, uap=0xcd3f0d04)
    at /usr/src/sys/kern/kern_sysctl.c:1282
#12 0xc0696a7a in syscall (frame=
      {tf_fs = 672399419, tf_es = 672399419, tf_ds = -1078001605, tf_edi = 2, tf_esi = -1077946516, tf_ebp = -1077946600, tf_isp = -851505820, tf_ebx = 672408520, tf_edx = 0, tf_ecx = -1077944304, tf_eax = 202, tf_trapno = 0, tf_err = 2, tf_eip = 672255951, tf_cs = 51, tf_eflags = 658, tf_esp = -1077946660, tf_ss = 59}) at /usr/src/sys/i386/i386/trap.c:1008
#13 0xc06882bf in Xint0x80_syscall ()
    at /usr/src/sys/i386/i386/exception.s:190
#14 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb) quit
sakura#	exit
exit

Script done on Fri Jan 20 13:25:41 2006

>How-To-Repeat:
sysctl -a | less
              
>Fix:
I dont know.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Feb 21 22:49:40 UTC 2006 
Responsible-Changed-Why:  
This does not sound i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92039 
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Mon Dec 25 14:59:55 UTC 2006 
State-Changed-Why:  
Hello, a lot had changed in 7-Current the last (almost) year, can you 
check whether the behaviour you are seeing is still there? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92039 
Responsible-Changed-From-To: freebsd-bugs->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Dec 25 15:00:19 UTC 2006 
Responsible-Changed-Why:  
trace the feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92039 
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Sun Mar 25 12:14:06 UTC 2007 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92039 
>Unformatted:
