Skip site navigation (1)Skip section navigation (2)
Date:      18 Mar 2001 16:41:03 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        current@freebsd.org
Cc:        jhb@freebsd.org, jake@freebsd.org
Subject:   Interesting backtrace...
Message-ID:  <xzpwv9nf5kg.fsf@flood.ping.uio.no>

next in thread | raw e-mail | index | archive | help
I finally caught a backtrace from one of those recurring stack smash
panics. I've been getting a few of these every day for a couple of
weeks now but never caught a dump; I caught this one by typing 'panic'
immediately instead of trying to get a trace at the ddb prompt first.

These panics invariably start like this (always the same eip):

kernel: type 12 trap, code=0
Stopped at      -0xfc81:        kernel: type 12 trap, code=0
db>

Anyway, here's the backtrace:

root@des /var/crash# gdb -k
GNU gdb 4.18
Copyright 1998 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-unknown-freebsd".
(kgdb) source ~des/kgdb
(kgdb) kernel 1
IdlePTD 4063232
initial pcb at 32d7c0
panicstr: from debugger
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xffff037f
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xffff037f
stack pointer           = 0x10:0xd07c7e18
frame pointer           = 0x10:0xd07c7e8c
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         = 1901 (perl)


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xffff037f
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc026b190
stack pointer           = 0x10:0xd07c7c84
frame pointer           = 0x10:0xd07c7c88
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         = 1901 (perl)
panic: from debugger
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xffff037f
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc026b190
stack pointer           = 0x10:0xd07c7c84
frame pointer           = 0x10:0xd07c7c88
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 1901 (perl)
panic: from debugger
Uptime: 1h34m41s

dumping to dev ad0b, offset 131104
dump ata0: resetting devices .. done
191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
---
#0  dumpsys () at ../../kern/kern_shutdown.c:478
478             if (dumping++) {
(kgdb) where
#0  dumpsys () at ../../kern/kern_shutdown.c:478
#1  0xc019723f in boot (howto=260) at ../../kern/kern_shutdown.c:321
#2  0xc0197609 in panic (fmt=0xc0299154 "from debugger")
    at ../../kern/kern_shutdown.c:571
#3  0xc011f885 in db_panic (addr=-64641, have_addr=0, count=1,
    modif=0xd07c7c88 "") at ../../ddb/db_command.c:433
#4  0xc011f825 in db_command (last_cmdp=0xc02d2fc0, cmd_table=0xc02d2e20,
    aux_cmd_tablep=0xc031913c) at ../../ddb/db_command.c:333
#5  0xc011f8ea in db_command_loop () at ../../ddb/db_command.c:455
#6  0xc0121ab3 in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71
#7  0xc026b09e in kdb_trap (type=12, code=0, regs=0xd07c7dd8)
    at ../../i386/i386/db_interface.c:164
#8  0xc027a7b0 in trap_fatal (frame=0xd07c7dd8, eva=4294902655)
    at ../../i386/i386/trap.c:982
#9  0xc027a525 in trap_pfault (frame=0xd07c7dd8, usermode=0, eva=4294902655)
    at ../../i386/i386/trap.c:901
#10 0xc02795b4 in trap (frame={tf_fs = 24, tf_es = 16, tf_ds = 16,
      tf_edi = -797537792, tf_esi = -798500992, tf_ebp = -797147508,
      tf_isp = -797147644, tf_ebx = 0, tf_edx = -1069539336, tf_ecx = 0,
      tf_eax = -1071185861, tf_trapno = 12, tf_err = 0, tf_eip = -64641,
      tf_cs = 8, tf_eflags = 66118, tf_esp = -65536, tf_ss = -1})
    at ../../i386/i386/trap.c:448
#11 0xffff037f in ?? ()
#12 0xc023c8bb in vm_fault (map=0xd0768a00, vaddr=138502144,
    fault_type=2 '\002', fault_flags=8) at ../../vm/vm_page.h:493
#13 0xc027a331 in trap_pfault (frame=0xd07c7fa8, usermode=1, eva=138502144)
    at ../../i386/i386/trap.c:876
#14 0xc027915c in trap (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
      tf_edi = 138502144, tf_esi = 1, tf_ebp = -1077939008,
      tf_isp = -797147180, tf_ebx = 4096, tf_edx = 0, tf_ecx = 1024,
      tf_eax = -791621424, tf_trapno = 12, tf_err = 6, tf_eip = 673075395,
      tf_cs = 31, tf_eflags = 66070, tf_esp = -1077939080, tf_ss = 47})
    at ../../i386/i386/trap.c:335
#15 0x281e50c3 in ?? ()
#16 0x281e4435 in ?? ()
#17 0x281e4b7d in ?? ()
#18 0x280d774b in ?? ()
#19 0x280cea99 in ?? ()
#20 0x280cee38 in ?? ()
#21 0x280e544a in ?? ()
#22 0x280f775a in ?? ()
#23 0x280f2594 in ?? ()
#24 0x2810e297 in ?? ()
#25 0x2810d658 in ?? ()
#26 0x80492ae in ?? ()
#27 0x8049189 in ?? ()
(kgdb) kldstat
Id Refs Address    Size     Name
 1    1 0xc0100000 2bf4c8   kernel
(kgdb) up 10
#10 0xc02795b4 in trap (frame={tf_fs = 24, tf_es = 16, tf_ds = 16,
      tf_edi = -797537792, tf_esi = -798500992, tf_ebp = -797147508,
      tf_isp = -797147644, tf_ebx = 0, tf_edx = -1069539336, tf_ecx = 0,
      tf_eax = -1071185861, tf_trapno = 12, tf_err = 0, tf_eip = -64641,
      tf_cs = 8, tf_eflags = 66118, tf_esp = -65536, tf_ss = -1})
    at ../../i386/i386/trap.c:448
448                             (void) trap_pfault(&frame, FALSE, eva);
(kgdb) p/x frame
$1 = {tf_fs = 0x18, tf_es = 0x10, tf_ds = 0x10, tf_edi = 0xd0768a00,
  tf_esi = 0xd067d780, tf_ebp = 0xd07c7e8c, tf_isp = 0xd07c7e04, tf_ebx = 0x0,
  tf_edx = 0xc0401ff8, tf_ecx = 0x0, tf_eax = 0xc027003b, tf_trapno = 0xc,
  tf_err = 0x0, tf_eip = 0xffff037f, tf_cs = 0x8, tf_eflags = 0x10246,
  tf_esp = 0xffff0000, tf_ss = 0xffffffff}
(kgdb) up 4
#14 0xc027915c in trap (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
      tf_edi = 138502144, tf_esi = 1, tf_ebp = -1077939008,
      tf_isp = -797147180, tf_ebx = 4096, tf_edx = 0, tf_ecx = 1024,
      tf_eax = -791621424, tf_trapno = 12, tf_err = 6, tf_eip = 673075395,
      tf_cs = 31, tf_eflags = 66070, tf_esp = -1077939080, tf_ss = 47})
    at ../../i386/i386/trap.c:335
335                             i = trap_pfault(&frame, TRUE, eva);
(kgdb) p/x frame
$2 = {tf_fs = 0x2f, tf_es = 0x2f, tf_ds = 0x2f, tf_edi = 0x8416000,
  tf_esi = 0x1, tf_ebp = 0xbfbff4c0, tf_isp = 0xd07c7fd4, tf_ebx = 0x1000,
  tf_edx = 0x0, tf_ecx = 0x400, tf_eax = 0xd0d0d0d0, tf_trapno = 0xc,
  tf_err = 0x6, tf_eip = 0x281e50c3, tf_cs = 0x1f, tf_eflags = 0x10216,
  tf_esp = 0xbfbff478, tf_ss = 0x2f}
(kgdb) p/x CADDR2
$3 = 0xc0401000
(kgdb) p/x CMAP2
$4 = 0xbff01004

Looks to me like there was a page fault, and the stack got corrupted
while handling that fault (possibly somewhere in pmap_zero_page(),
called from vm_page_zero_fill() which is inlined in vm_fault()).

(BTW, this is a K6-2, which as far as I can tell is a 586-class CPU)

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

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




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