Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 May 2005 15:41:38 +0200
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        freebsd-stable@freebsd.org
Subject:   Fw: 5.4-STABLE panic: kernel trap 12 with interrupts diabled
Message-ID:  <20050508154138.702061ad@localhost>

next in thread | raw e-mail | index | archive | help
Hi list,

forwarding to freebsd-stable (probably the right place anyway),
since I got no further responses on freebsd-questions.

Subhro <subhro.kar@gmail.com> wrote:

> On 5/5/2005 19:43, Fabian Keil wrote:

> >the day before yesterday I experienced my first
> >panic on 5.4-STABLE. Build and cvsup'ed last
> >Friday. My system is a ThinkPad R51
> >
> >I did nothing spectacular, after boot I:
> >
> >logged in as user
> >cdrecord -scanbus (which didn't work as I hadn't yet set it suid)
> >su
> >chmod +x for cdrecord and readcd (meant was +g ;-)
> >exit
> >cdrecord -scanbus (didn't yet work ;-)
> >su
> >cdrecord -scanbus (did work)
> >readcd dev=2,0,0 -factor meshpoints=100 f=./file
> >exit
> >
> >Then I moved the laptop and plugged in the AC/DC adapter.
> >
> >whoami brought me:
> >
> >Kernel trap 12 with interrupts disabled
> >Fatal trap 12: page fault while in kernel mode
> >fault virtual address	= 0xa94d06c
> >fault code                  = supervisor read, page not present
> >instruction pointer     = 0x8:0xc053cbe5
> >stack pointer             = 0x10:0xe669f98c
> >frame pointer            = 0x10:0xe669f990
> >code segment           = base 0x0, limit 0xfffff, type 0x1b
> >                                 = DPL 0, pres 1, def32 1, gran 1
> >processor eflags        = resume, IOPL = 0
> >current process         = 601 (whoami)
> >trap number             = 12
> >panic: page fault
> >
> >I saved the dump manually with savecore and then tried
> >to follow:
> ><http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/advanced.html#KERNEL-PANIC-TROUBLESHOOTING>;
> >
> >fk@r51 ~ $nm -n /boot/kernel/kernel | grep c053cb
> >c053cb4c T init_turnstiles
> >c053cbc9 t init_turnstile0
> >c053cbd8 t turnstile_setowner
> >
> >My kernel contains "makeoptions     DEBUG=-g",  however
> >I don't have the file /sys/compile/KERNELCONFIG/kernel.debug
> >and thus wasn't able to do
> >% gdb -k /sys/compile/KERNELCONFIG/kernel.debug /var/crash/vmcore.0

It turned out that I just was looking at the wrong places, kernel.debug
was found at /usr/obj/usr/src/sys/THINKPAD/kernel.debug.

<http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html>;
fits better and contains a pointer to kgdb.

> >fk@r51 ~ $cat info.0 
> >Dump header from device /dev/ad0s3b
> >  Architecture: i386
> >  Architecture Version: 16777216
> >  Dump Length: 536215552B (511 MB)
> >  Blocksize: 512
> >  Dumptime: Tue May  3 20:18:11 2005
> >  Hostname: r51.local
> >  Magic: FreeBSD Kernel Dump
> >  Version String: FreeBSD 5.4-STABLE #6: Sat Apr 30 14:57:04 CEST 2005
> >    fk@r51.local:/usr/obj/usr/src/sys/THINKPAD
> >  Panic String: page fault
> >  Dump Parity: 1084811848
> >  Bounds: 0
> >  Dump Status: good
> >
> >The kernel was build "the new way".
> >I was not able to reproduce the panic.
> >
> >Is there anything else I can do?

> It would be great to have a look at the core. Can you put it up 
> somewhere on the WEB? Also if you are not running a GENERIC kernel then 
> let us have a look at the config file.

fk@r51 ~ $ls -lh|grep core
-rw-------   1 fk  wheel   511M May  3 20:38 vmcore.0
-rw-------   1 fk  wheel   354M May  5 19:11 vmcore.0.gz

I don't have that much web space available.
However the following seems to be interesting:

fk@r51 ~ $kgdb kernel.debug vmcore.0
[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".
#0  doadump () at pcpu.h:160
160     pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) where
#0  doadump () at pcpu.h:160
#1  0xc0519e76 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:410
#2  0xc051a1a7 in panic (fmt=0xc06bafe5 "%s") at /usr/src/sys/kern/kern_shutdown.c:566
#3  0xc0693758 in trap_fatal (frame=0xe669f94c, eva=0) at /usr/src/sys/i386/i386/trap.c:809
#4  0xc0692dca in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -429261692, tf_esi = -1043159552, tf_ebp = -429262448, tf_isp = -429262472, tf_ebx = -1043640192, tf_edx = -1043640192, tf_ecx = 177524736, tf_eax = 177524736, tf_trapno = 12, tf_err = 0, tf_eip = -1068250139, tf_cs = 8, tf_eflags = 65539, tf_esp = -1043159552, tf_ss = -429262416})
    at /usr/src/sys/i386/i386/trap.c:247
#5  0xc0681baa in calltrap () at /usr/src/sys/i386/i386/exception.s:140
#6  0x00000018 in ?? ()
#7  0x00000010 in ?? ()
#8  0x00000010 in ?? ()
#9  0xe669fc84 in ?? ()
#10 0xc1d2a600 in ?? ()
#11 0xe669f990 in ?? ()
#12 0xe669f978 in ?? ()
#13 0xc1cb5080 in ?? ()
#14 0xc1cb5080 in ?? ()
#15 0x0a94d000 in ?? ()
#16 0x0a94d000 in ?? ()
#17 0x0000000c in ?? ()
#18 0x00000000 in ?? ()
#19 0xc053cbe5 in turnstile_setowner (ts=0xc1cb5080, owner=0x0) at /usr/src/sys/kern/subr_turnstile.c:367
#20 0xc053cecd in turnstile_wait (ts=0xc1cb5080, lock=0xc1cbb000, owner=0x0) at /usr/src/sys/kern/subr_turnstile.c:504
#21 0xc050fc57 in _mtx_lock_sleep (m=0xc1cbb000, td=0xc1d2a600, opts=0, file=0x0, line=0)
    at /usr/src/sys/kern/kern_mutex.c:552
#22 0xc062fae6 in ufsdirhash_lookup (ip=0xc1d10460, name=0xc1ce7809 "nss_compat.so.1", namelen=15, offp=0x0, bpp=0x0, 
    prevoffp=0x0) at /usr/src/sys/ufs/ufs/ufs_dirhash.c:349
#23 0xc0632060 in ufs_lookup (ap=0xe669fb34) at /usr/src/sys/ufs/ufs/ufs_lookup.c:214
#24 0xc0639ead in ufs_vnoperate (ap=0x0) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2828
#25 0xc056da78 in vfs_cache_lookup (ap=0x0) at vnode_if.h:82
#26 0xc0639ead in ufs_vnoperate (ap=0x0) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2828
#27 0xc05739f3 in lookup (ndp=0xe669fc5c) at vnode_if.h:52
#28 0xc05733fb in namei (ndp=0xe669fc5c) at /usr/src/sys/kern/vfs_lookup.c:182
#29 0xc0582316 in kern_access (td=0xc1d2a600, path=0x0, pathseg=UIO_USERSPACE, flags=0)
    at /usr/src/sys/kern/vfs_syscalls.c:1819
#30 0xc05822b2 in access (td=0x0, uap=0x0) at /usr/src/sys/kern/vfs_syscalls.c:1797
#31 0xc0693ac4 in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077942816, tf_esi = 671563776, tf_ebp = -1077942888, tf_isp = -429261468, tf_ebx = 671529272, tf_edx = -1077942576, tf_ecx = 671563801, tf_eax = 33, tf_trapno = 12, tf_err = 2, tf_eip = 671436903, tf_cs = 31, tf_eflags = 582, tf_esp = -1077942916, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1001
#32 0xc0681bff in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:201
#33 0x0000002f in ?? ()
#34 0x0000002f in ?? ()
#35 0x0000002f in ?? ()
#36 0xbfbfe5e0 in ?? ()
#37 0x28074000 in ?? ()
#38 0xbfbfe598 in ?? ()
#39 0xe669fd64 in ?? ()
#40 0x2806b938 in ?? ()
#41 0xbfbfe6d0 in ?? ()
---Type <return> to continue, or q <return> to quit---
#42 0x28074019 in ?? ()
#43 0x00000021 in ?? ()
#44 0x0000000c in ?? ()
#45 0x00000002 in ?? ()
#46 0x28055067 in ?? ()
#47 0x0000001f in ?? ()
#48 0x00000246 in ?? ()
#49 0xbfbfe57c in ?? ()
#50 0x0000002f in ?? ()
#51 0x00000000 in ?? ()
#52 0x00000000 in ?? ()
#53 0x00000000 in ?? ()
#54 0x00000000 in ?? ()
#55 0x1f3f1000 in ?? ()
#56 0xc1f06000 in ?? ()
#57 0xc1d2a600 in ?? ()
#58 0xe669f84c in ?? ()
#59 0xe669f834 in ?? ()
#60 0xc1984c00 in ?? ()
#61 0xc052c3c2 in sched_switch (td=0x28074000, newtd=0x2806b938, flags=Cannot access memory at address 0xbfbfe5a8
) at /usr/src/sys/kern/sched_4bsd.c:881
Previous frame inner to this frame (corrupt stack?)
(kgdb) quit

My kernel configuration is:

machine		i386
cpu		I686_CPU
ident		THINKPAD
makeoptions     DEBUG=-g                #Build kernel with gdb(1) debug symbols
# To statically compile in device wiring instead of /boot/device.hints
#hints		"GENERIC.hints"		# Default places to look for devices.

options 	SCHED_4BSD		# 4BSD scheduler
options 	INET			# InterNETworking
options 	INET6			# IPv6 communications protocols
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	MD_ROOT			# MD is a potential root device
options 	NFSCLIENT		# Network Filesystem Client
#options 	NFSSERVER		# Network Filesystem Server
#options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
options 	PROCFS			# Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_GPT		# GUID Partition Tables.
options 	COMPAT_43		# Compatible with BSD 4.3 [KEEP THIS!]
options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	SCSI_DELAY=1000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	AHC_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~128k to driver.
options 	AHD_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~215k to driver.
options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.

options         KDB                     # Enable kernel debugger support.
#options         DDB                     # Support DDB.
#options         GDB                     # Support remote GDB.
options         WITNESS_SKIPSPIN        # Don't run witness on spinlocks



# To make an SMP kernel, the next two are needed
#options 	SMP		# Symmetric MultiProcessor Kernel
device		apic		# I/O APIC

# Bus support.  Do not remove isa, even if you have no isa slots
device		isa
device		eisa
device		pci


# Floppy drives
device		fdc

# ATA and ATAPI devices
device		ata
device		atadisk		# ATA disk drives
device		ataraid		# ATA RAID drives
device		atapicd		# ATAPI CDROM drives
device		atapifd		# ATAPI floppy drives
device		atapist		# ATAPI tape drives
options 	ATA_STATIC_ID	# Static device numbering


# SCSI peripherals
device		scbus		# SCSI bus (required for SCSI)
device		ch		# SCSI media changers
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct SCSI access)
device		ses		# SCSI Environmental Services (and SAF-TE)
device		atapicam	# Needed for cdrtools

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse

device		vga		# VGA video card driver

device		splash		# Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device		sc

device		agp		# support several AGP chipsets

# Floating point support - do not disable.
device		npx

# Power management support (see NOTES for more options)
device		apm
# Add suspend/resume support for the i8254.
device		pmtimer

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
#device		cbb		# cardbus (yenta) bridge
device		pccard		# PC Card (16-bit) bus
device		cardbus		# CardBus (32-bit) bus

# Serial (COM) ports
device		sio		# 8250, 16[45]50 based serial ports

# Parallel port
device		ppc
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer
#device		plip		# TCP/IP over parallel
#device		ppi		# Parallel port interface device
#device		vpo		# Requires scbus and da

# If you've got a "dumb" serial or parallel PCI card that is
# supported by the puc(4) glue driver, uncomment the following
# line to enable it (connects to the sio and/or ppc drivers):
#device         puc

# PCI Ethernet NICs.
device		em		# Intel PRO/1000 adapter Gigabit Ethernet Card

# Pseudo devices.
device		loop		# Network loopback
device		mem		# Memory and kernel memory devices
device		io		# I/O device
device		random		# Entropy device
device		ether		# Ethernet support
#device		sl		# Kernel SLIP
#device		ppp		# Kernel PPP
device		tun		# Packet tunnel.
device		pty		# Pseudo-ttys (telnet etc)
device		md		# Memory "disks"
device		gif		# IPv6 and IPv4 tunneling
device		faith		# IPv6-to-IPv4 relaying (translation)

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
device		bpf		# Berkeley packet filter

# USB support
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		usb		# USB Bus (required)
device          ehci            # usb2 'hi=speed' support
#device		udbp		# USB Double Bulk Pipe devices
device		ugen		# Generic
#device		uhid		# "Human Interface Devices"
#device		ukbd		# Keyboard
#device		ulpt		# Printer
device		umass		# Disks/Mass storage - Requires scbus and da
device		ums		# Mouse
#device		urio		# Diamond Rio 500 MP3 player
#device		uscanner	# Scanners
# USB Ethernet, requires mii
#device		aue		# ADMtek USB Ethernet
#device		axe		# ASIX Electronics USB Ethernet
#device		cue		# CATC USB Ethernet
#device		kue		# Kawasaki LSI USB Ethernet
#device		rue		# RealTek RTL8150 USB Ethernet

# FireWire support
device		firewire	# FireWire bus code
device		sbp		# SCSI over FireWire (Requires scbus and da)
device		fwe		# Ethernet over FireWire (non-standard!)

Regards
Fabian
-- 
http://www.fabiankeil.de/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050508154138.702061ad>