From owner-freebsd-i386@FreeBSD.ORG Wed Feb 18 07:10:12 2004 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C435516A4CE for ; Wed, 18 Feb 2004 07:10:12 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDEAB43D2D for ; Wed, 18 Feb 2004 07:10:12 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1IFACbv061805 for ; Wed, 18 Feb 2004 07:10:12 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1IFACjY061804; Wed, 18 Feb 2004 07:10:12 -0800 (PST) (envelope-from gnats) Date: Wed, 18 Feb 2004 07:10:12 -0800 (PST) Message-Id: <200402181510.i1IFACjY061804@freefall.freebsd.org> To: freebsd-i386@FreeBSD.org From: roberto@redix.it Subject: Re: i386/62374: kernel panic: free: multiple frees X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: roberto@redix.it List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2004 15:10:13 -0000 The following reply was made to PR i386/62374; it has been noted by GNATS. From: roberto@redix.it To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: i386/62374: kernel panic: free: multiple frees Date: Wed, 18 Feb 2004 16:04:08 +0100 (CET) Here is a second gdb kernel dump session: ---------------------------------- Script started on Mon Feb 9 21:14:59 2004 # gdb -k kernel.0 vmcore.0 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 phsyical address 0x00566000 initial pcb at physical address 0x0048b160 panicstr: page fault panic messages: --- panic: free: multiple frees syncing disks... Fatal trap 12: page fault while in kernel mode fault virtual address = 0x30 fault code = supervisor read, page not present instruction pointer = 0x8:0xc032fdbc stack pointer = 0x10:0xc042a1fc frame pointer = 0x10:0xc042a204 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 = Idle interrupt mask = net tty bio cam trap number = 12 panic: page fault Uptime: 8m44s dumping to dev #ad/0x20011, offset 245888 dump ata1: resetting devices .. done 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 426 425 424 423 422 421 420 419 418 417 416 415 414 413 412 411 410 409 408 407 406 405 404 403 402 401 400 399 398 397 396 395 394 393 392 391 390 389 388 387 386 385 384 383 382 381 380 379 378 377 376 375 374 373 372 371 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307 306 305 304 303 302 301 300 299 298 297 296 295 294 293 292 291 290 289 288 287 286 285 284 283 282 281 280 279 278 277 276 275 274 273 272 271 270 269 268 267 266 265 264 263 262 261 260 259 258 257 256 255 254 253 252 251 250 249 248 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 487 if (dumping++) { (kgdb) bt #0 dumpsys () at ../../kern/kern_shutdown.c:487 #1 0xc02294d3 in boot (howto=260) at ../../kern/kern_shutdown.c:316 #2 0xc02298f8 in poweroff_wait (junk=0xc0420d6c, howto=-1069414289) at ../../kern/kern_shutdown.c:595 #3 0xc039e05a in trap_fatal (frame=0xc042a1bc, eva=48) at ../../i386/i386/trap.c:974 #4 0xc039dd2d in trap_pfault (frame=0xc042a1bc, usermode=0, eva=48) at ../../i386/i386/trap.c:867 #5 0xc039d8eb in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = -1068875008, tf_esi = 0, tf_ebp = -1069374972, tf_isp = -1069375000, tf_ebx = -1069148324, tf_edx = 6865472, tf_ecx = 2, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1070400068, tf_cs = 8, tf_eflags = 66182, tf_esp = 0, tf_ss = 0}) at ../../i386/i386/trap.c:466 #6 0xc032fdbc in acquire_lock (lk=0xc046175c) at ../../ufs/ffs/ffs_softdep.c:266 #7 0xc03343de in softdep_fsync_mountdev (vp=0xd9c69d80) at ../../ufs/ffs/ffs_softdep.c:4024 #8 0xc0338616 in ffs_fsync (ap=0xc042a278) at ../../ufs/ffs/ffs_vnops.c:134 #9 0xc033729f in ffs_sync (mp=0xc1ef0400, waitfor=2, cred=0xc1110800, p=0xc04a4300) at vnode_if.h:558 #10 0xc0259f83 in sync (p=0xc04a4300, uap=0x0) at ../../kern/vfs_syscalls.c:577 #11 0xc022926e in boot (howto=256) at ../../kern/kern_shutdown.c:235 #12 0xc02298f8 in poweroff_wait (junk=0xc03ef7ff, howto=-1040232448) at ../../kern/kern_shutdown.c:595 #13 0xc0224fbb in free (addr=0xc1ff5000, type=0xc044d0a0) at ../../kern/kern_malloc.c:385 #14 0xc1f98c66 in ?? () #15 0xc1f970b0 in ?? () #16 0xc1f98d36 in ?? () #17 0xc1f96eb5 in ?? () #18 0xc022f5a9 in softclock () at ../../kern/kern_timeout.c:131 #19 0xc03907a3 in doreti_swi () (kgdb) output *(*linker_files->tqh_first) {refs = 3, userrefs = 1, flags = 1, link = {tqe_next = 0xc1110980, tqe_prev = 0xc04896a8}, filename = 0xc1110ac4 "kernel", id = 1, address = 0xc0100000 "\177ELF\001\001\001\t", size = 4445032, ndeps = 0, deps = 0x0, common = {stqh_first = 0x0, stqh_last = 0xc1110aac}, modules = {tqh_first = 0xc110f9c0, tqh_last = 0xc1df18c8}, priv = 0xc1110b00, ops = 0xc044c1f8}(kgdb) output (*linker_files->tqh_first).link {tqe_next = 0xc1110980, tqe_prev = 0xc04896a8} (kgdb) output (*linker_files->tqh_first).link.tqe_next (struct linker_file *) 0xc1110980 (kgdb) output (*linker_files->tqh_first).link.tqe_next) {refs = 1, userrefs = 1, flags = 1, link = {tqe_next = 0xc1f6b200, tqe_prev = 0xc1110a8c}, filename = 0xc11109c4 "bridge.ko", id = 2, address = 0xc053e000 "\177ELF\001\001\001\t", size = 30948, ndeps = 1, deps = 0xc110e4f0, common = {stqh_first = 0x0, stqh_last = 0xc11109ac}, modules = {tqh_first = 0xc110fa80, tqh_last = 0xc110fa88}, priv = 0xc1110a00, ops = 0xc044c208} (kgdb) output *(*((*linker_files->tqh_first).link.tqe_next).link.tqe_next) {refs = 1, userrefs = 1, flags = 1, link = {tqe_next = 0x0, tqe_prev = 0xc111098c}, filename = 0xc1f6b244 "ipl.ko", id = 3, address = 0xc1f8d000 "\177ELF\001\001\001\t", size = 98304, ndeps = 1, deps = 0xc1dee990, common = {stqh_first = 0x0, stqh_last = 0xc1f6b22c}, modules = {tqh_first = 0xc1f69340, tqh_last = 0xc1f69348}, priv = 0xc1f6b280, ops = 0xc044c1f8} (kgdb) indirizzo caircamento ipl.ko= address = 0xc1f8d000 Undefined command: "indirizzo". Try "help". # objdump -h /usr/src/sys/compile/GENERIC-DEBUG/modules/usr/src/sys/modules/ipfilter/ipl.ko 8 .text 0000cdd0 00005e20 00005e20 00005e20 2**2 (kgdb) add-symbol-table file /usr/src/sys/compile/GENERIC-DEBUG/modules/usr/src/sys/modules/ipfilter/ipl.ko 0xc1f92e20 add symbol table from file "/usr/src/sys/compile/GENERIC-DEBUG/modules/usr/src/sys/modules/ipfilter/ipl.ko" at text_addr = 0xc1f92e20? (y or n) y Reading symbols from /usr/src/sys/compile/GENERIC-DEBUG/modules/usr/src/sys/modules/ipfilter/ipl.ko...done. (kgdb) bt #0 dumpsys () at ../../kern/kern_shutdown.c:487 #1 0xc02294d3 in boot (howto=260) at ../../kern/kern_shutdown.c:316 #2 0xc02298f8 in poweroff_wait (junk=0xc0420d6c, howto=-1069414289) at ../../kern/kern_shutdown.c:595 #3 0xc039e05a in trap_fatal (frame=0xc042a1bc, eva=48) at ../../i386/i386/trap.c:974 #4 0xc039dd2d in trap_pfault (frame=0xc042a1bc, usermode=0, eva=48) at ../../i386/i386/trap.c:867 #5 0xc039d8eb in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = -1068875008, tf_esi = 0, tf_ebp = -1069374972, tf_isp = -1069375000, tf_ebx = -1069148324, tf_edx = 6865472, tf_ecx = 2, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1070400068, tf_cs = 8, tf_eflags = 66182, tf_esp = 0, tf_ss = 0}) at ../../i386/i386/trap.c:466 #6 0xc032fdbc in acquire_lock (lk=0xc046175c) at ../../ufs/ffs/ffs_softdep.c:266 #7 0xc03343de in softdep_fsync_mountdev (vp=0xd9c69d80) at ../../ufs/ffs/ffs_softdep.c:4024 #8 0xc0338616 in ffs_fsync (ap=0xc042a278) at ../../ufs/ffs/ffs_vnops.c:134 #9 0xc033729f in ffs_sync (mp=0xc1ef0400, waitfor=2, cred=0xc1110800, p=0xc04a4300) at vnode_if.h:558 #10 0xc0259f83 in sync (p=0xc04a4300, uap=0x0) at ../../kern/vfs_syscalls.c:577 #11 0xc022926e in boot (howto=256) at ../../kern/kern_shutdown.c:235 #12 0xc02298f8 in poweroff_wait (junk=0xc03ef7ff, howto=-1040232448) at ../../kern/kern_shutdown.c:595 #13 0xc0224fbb in free (addr=0xc1ff5000, type=0xc044d0a0) at ../../kern/kern_malloc.c:385 #14 0xc1f98c66 in fr_delstate (is=0xc1ff5000) at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_state.c:1722 #15 0xc1f970b0 in fr_state_flush (which=2, proto=0) at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_state.c:278 #16 0xc1f98d36 in fr_timeoutstate () at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_state.c:1772 #17 0xc1f96eb5 in ipfr_slowtimer (ptr=0x0) at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_frag.c:593 #18 0xc022f5a9 in softclock () at ../../kern/kern_timeout.c:131 #19 0xc03907a3 in doreti_swi () (kgdb) where #0 dumpsys () at ../../kern/kern_shutdown.c:487 #1 0xc02294d3 in boot (howto=260) at ../../kern/kern_shutdown.c:316 #2 0xc02298f8 in poweroff_wait (junk=0xc0420d6c, howto=-1069414289) at ../../kern/kern_shutdown.c:595 #3 0xc039e05a in trap_fatal (frame=0xc042a1bc, eva=48) at ../../i386/i386/trap.c:974 #4 0xc039dd2d in trap_pfault (frame=0xc042a1bc, usermode=0, eva=48) at ../../i386/i386/trap.c:867 #5 0xc039d8eb in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = -1068875008, tf_esi = 0, tf_ebp = -1069374972, tf_isp = -1069375000, tf_ebx = -1069148324, tf_edx = 6865472, tf_ecx = 2, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1070400068, tf_cs = 8, tf_eflags = 66182, tf_esp = 0, tf_ss = 0}) at ../../i386/i386/trap.c:466 #6 0xc032fdbc in acquire_lock (lk=0xc046175c) at ../../ufs/ffs/ffs_softdep.c:266 #7 0xc03343de in softdep_fsync_mountdev (vp=0xd9c69d80) at ../../ufs/ffs/ffs_softdep.c:4024 #8 0xc0338616 in ffs_fsync (ap=0xc042a278) at ../../ufs/ffs/ffs_vnops.c:134 #9 0xc033729f in ffs_sync (mp=0xc1ef0400, waitfor=2, cred=0xc1110800, p=0xc04a4300) at vnode_if.h:558 #10 0xc0259f83 in sync (p=0xc04a4300, uap=0x0) at ../../kern/vfs_syscalls.c:577 #11 0xc022926e in boot (howto=256) at ../../kern/kern_shutdown.c:235 #12 0xc02298f8 in poweroff_wait (junk=0xc03ef7ff, howto=-1040232448) at ../../kern/kern_shutdown.c:595 #13 0xc0224fbb in free (addr=0xc1ff5000, type=0xc044d0a0) at ../../kern/kern_malloc.c:385 #14 0xc1f98c66 in fr_delstate (is=0xc1ff5000) at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_state.c:1722 #15 0xc1f970b0 in fr_state_flush (which=2, proto=0) at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_state.c:278 #16 0xc1f98d36 in fr_timeoutstate () at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_state.c:1772 #17 0xc1f96eb5 in ipfr_slowtimer (ptr=0x0) at /usr/src/sys/modules/ipfilter/../../contrib/ipfilter/netinet/ip_frag.c:593 #18 0xc022f5a9 in softclock () at ../../kern/kern_timeout.c:131 #19 0xc03907a3 in doreti_swi () (kgdb) frame 13 #13 0xc0224fbb in free (addr=0xc1ff5000, type=0xc044d0a0) at ../../kern/kern_malloc.c:385 385 panic("free: multiple frees"); (kgdb) l 380 freep->type = type; 381 #endif /* INVARIANTS */ 382 kup->ku_freecnt++; 383 if (kup->ku_freecnt >= kbp->kb_elmpercl) { 384 if (kup->ku_freecnt > kbp->kb_elmpercl) 385 panic("free: multiple frees"); 386 else if (kbp->kb_totalfree > kbp->kb_highwat) 387 kbp->kb_couldfree++; 388 } 389 kbp->kb_totalfree++; (kgdb) output kup->ku_freecnt There is no member named ku_freecnt. (kgdb) output kup (struct kmemusage *) 0xc10dfbb8 (kgdb) output *kup {ku_indx = 8, ku_un = {freecnt = 17, pagecnt = 17}} (kgdb) output kbp (struct kmembuckets *) 0xc03ef7ff (kgdb) output *kbp {kb_next = 0x65657266cannot read proc at 0