Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2002 16:25:33 -0800
From:      Chuck Tuffli <chuck_tuffli@agilent.com>
To:        freebsd-scsi@freebsd.org
Subject:   decoding a double fault
Message-ID:  <20021204002532.GB23841@thegrail.rose.agilent.com>

next in thread | raw e-mail | index | archive | help
I'm developing a CAM driver that works with 4.7-RELEASE and am running
into a double fault. The driver is a KLD which loads and then detects a
device on the loop. After detecting the device, I ran

llama# camcontrol rescan 0:0:0

at which point the system double faults and prints the following on
the console

Fatal double fault:
eip = 0xc0354952
esp = 0xc8b8a000
ebp = 0xc8b8a078
panic: double fault
Debugger("panic")

0xc0354952 is the 3rd instruction into the function alltraps
(i386/i386/exception.s:222)

	.globl	_alltraps
	.type	_alltraps,@function
_alltraps:
	pushal
	pushl	%ds
	pushl	%es
	pushl	%fs
alltraps_with_regs_pushed:

The backtrace looks like

(kgdb) bt
#0  Debugger (msg=0xc03aec3b "panic") at ../../i386/i386/db_interface.c:319
#1  0xc0211ea0 in panic (fmt=0xc03d9cc3 "double fault")
    at ../../kern/kern_shutdown.c:593
#2  0xc03637c7 in dblfault_handler () at ../../i386/i386/trap.c:1004

and the contents of common_tss in frame #2 are

(kgdb) p/x common_tss
$1 = {tss_link = 0x0, tss_esp0 = 0xc8b8dff0, tss_ss0 = 0x10, tss_esp1 = 0x0, 
  tss_ss1 = 0x0, tss_esp2 = 0x0, tss_ss2 = 0x0, tss_cr3 = 0x0, 
  tss_eip = 0xc0354952, tss_eflags = 0x10803, tss_eax = 0x0, tss_ecx = 0x0, 
  tss_edx = 0xc8b8a080, tss_ebx = 0xc7e1bee0, tss_esp = 0xc8b8a000, 
  tss_ebp = 0xc8b8a078, tss_esi = 0xc, tss_edi = 0x0, tss_es = 0x10, 
  tss_cs = 0x8, tss_ss = 0x10, tss_ds = 0x10, tss_fs = 0x10, tss_gs = 0x2f, 
  tss_ldt = 0x0, tss_ioopt = 0x680000}

Is there enough information from the above to figure out what code was
being executed, what address caused the fault, what exception
was the OS handling when the fault occured, etc.? Any suggestions,
including RTFM, are welcomed as long as you also include which manual
I should be reading ;)

-- 
Chuck Tuffli    <chuck_tuffli AT NO_SPAM agilent DOT com>
Agilent Technologies, Storage and Networking

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




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