Need help debugging kernel

Asko Tamm asko.tnospam at ultrasoft.ee
Thu Oct 14 01:56:53 PDT 2004


Hi,

Please help me with kernel debugging. The situation is the following:
system panics and reboots about every 24 hours (24 hours since last
reboot), 4.10-STABLE on i386. It shouldn't be a hardware issue, it
happens on several different machines, having similar configuration.

Systems are running named, postfix, apache, samba, dhcpd, lpd, webmin,
mpd, etc. with the similar configuration.
Kernel has following additions to GENERIC - options: DUMMYNET,
NMBCLUSTERS=8192, NETGRAPH, IPFIREWALL, IPFIREWALL_VERBOSE,
IPFIREWALL_FORWARD, IPDIVERT, IPSTEALTH, TCPDEBUG

$ gdb -k kernel.debug /usr/crash/vmcore.1
GNU gdb 4.18 (FreeBSD)
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"...Deprecated bfd_read
called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 933 in fill_symbuf

IdlePTD at physical address 0x00591000
initial pcb at physical address 0x004b1120
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address= 0xad243ff3
fault code= supervisor read, page not present
instruction pointer= 0x8:0xc027c55b
stack pointer        = 0x10:0xd2e8ad98
frame pointer        = 0x10:0xd2e8ae1c
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= 407 (nmbd)
interrupt mask= none
trap number= 12
panic: page fault

syncing disks... 14 3
done
Uptime: 23h53m31s

dumping to dev #ad/0x20011, offset 1589376
dump ata1: resetting devices .. done
247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230
229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212
211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194
193 192 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:487
487if (dumping++) {
(kgdb) list *0xc027c55b
0xc027c55b is in ifconf (../../net/if.c:1330).
1325addrs = 0;
1326ifa = ifp->if_addrhead.tqh_first;
1327TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
1328if (space <= sizeof(ifr))
1329break;
1330sa = ifa->ifa_addr;
1331if (curproc->p_prison && prison_if(curproc, sa))
1332continue;
1333addrs++;
1334#ifdef COMPAT_43
(kgdb) backtrace
#0  dumpsys () at ../../kern/kern_shutdown.c:487
#1  0xc0237c73 in boot (howto=256) at ../../kern/kern_shutdown.c:316
#2  0xc0238098 in poweroff_wait (junk=0xc0447fec, howto=-1069253905)
    at ../../kern/kern_shutdown.c:595
#3  0xc03b9d9a in trap_fatal (frame=0xd2e8ad58, eva=2904834035)
    at ../../i386/i386/trap.c:974
#4  0xc03b9a6d in trap_pfault (frame=0xd2e8ad58, usermode=0, eva=2904834035)
    at ../../i386/i386/trap.c:867
#5  0xc03b962b in trap (frame={tf_fs = -1078001648, tf_es = -756547568,
      tf_ds = 16, tf_edi = 7708, tf_esi = -1077949100, tf_ebp = -756503012,
      tf_isp = -756503164, tf_ebx = -1033036164, tf_edx = -756514816,
      tf_ecx = 0, tf_eax = -1390133261, tf_trapno = 12, tf_err = 0,
      tf_eip = -1071135397, tf_cs = 8, tf_eflags = 66054, tf_esp =
-757485376,
      tf_ss = -1073190620}) at ../../i386/i386/trap.c:466
#6  0xc027c55b in ifconf (cmd=3221776676, data=0xd2e8aea8 "")
    at ../../net/if.c:1330
#7  0xc027bd1d in ifioctl (so=0xd197e9c0, cmd=3221776676,
data=0xd2e8aea8 "",
    p=0xd2d9b0c0) at ../../net/if.c:968
#8  0xc024a63a in soo_ioctl (fp=0xc2a49ec0, cmd=3221776676,
    data=0xd2e8aea8 "", p=0xd2d9b0c0) at ../../kern/sys_socket.c:143
#9  0xc0247536 in ioctl (p=0xd2d9b0c0, uap=0xd2e8af80) at
../../sys/file.h:178
#10 0xc03ba049 in syscall2 (frame={tf_fs = 135069743, tf_es = 47,
      tf_ds = -1078001617, tf_edi = -1077937824, tf_esi = -1077941280,
---Type <return> to continue, or q <return> to quit---
      tf_ebp = -1077941392, tf_isp = -756502572, tf_ebx = 1097604547,
      tf_edx = -1077949584, tf_ecx = 0, tf_eax = 54, tf_trapno = 7,
      tf_err = 2, tf_eip = 673566372, tf_cs = 31, tf_eflags = 659,
      tf_esp = -1077949660, tf_ss = 47}) at ../../i386/i386/trap.c:1175
#11 0xc03ab065 in Xint0x80_syscall ()
#12 0x80a8aac in ?? ()
#13 0x80a7a1f in ?? ()
#14 0x805df08 in ?? ()
#15 0x805e45c in ?? ()
#16 0x805ec01 in ?? ()
#17 0x805d38a in ?? ()

I am suspecting mpd, because on one machine shutting down mpd helped,
but i can't be sure yet. It's takes long time to test, it takes 24 hours
to see the result after every configuration change ;-(

--
asko


More information about the freebsd-hackers mailing list