Date: Sat, 19 Aug 2000 19:26:17 -0400 From: Bosko Milekic <bmilekic@technokratis.com> To: John Polstra <jdp@polstra.com>, dwmalone@freebsd.org Cc: current@freebsd.org Subject: Re: (URGENT) Instant panic in _MEXT_ALLOC_CNT Message-ID: <000501c00a34$dfd43f20$71cbc918@jehovah> References: <XFMail.000819152111.jdp@polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hrmmm, there may be a logic problem here. Try this (apply it manually, as I am not able to produce a diff at this time): change: if ((__mcnt == NULL) && (m_alloc_ref(1) == 0)) panic("mbuf subsystem: out of ref counts!"); to: if (__mcnt == NULL) { if (m_alloc_ref(1) != 0) __mcnt = mext_refcnt_free; else panic("mbuf subsystem: out of ref counts!"); } It could be that the m_alloc_ref(1) doesn't fail, but that __mcnt is still NULL, it's missing that __mcnt = mext_refcnt_free assignment. This is most probably a BUG, so please commit the fix... If this does not solve the problem, we may be looking at a newly uncovered problem in fxp, although I doubt this. -Bosko bmilekic@dsuper.net ----- Original Message ----- From: "John Polstra" <jdp@polstra.com> To: <current@FreeBSD.ORG> Sent: Saturday, August 19, 2000 6:21 PM Subject: Instant panic in _MEXT_ALLOC_CNT > With sources from this morning I am getting an instant kernel-mode > page fault in the new mbuf cluster reference counting code. It is > failing in this statement of _MEXT_ALLOC_CNT (sys/mbuf.h), as far as > I can tell: > > #define _MEXT_ALLOC_CNT(m_cnt) MBUFLOCK( \ > union mext_refcnt *__mcnt; \ > \ > __mcnt = mext_refcnt_free; \ > if ((__mcnt == NULL) && (m_alloc_ref(1) == 0)) \ > panic("mbuf subsystem: out of ref counts!"); \ > mext_refcnt_free = __mcnt->next_ref; \ > [*crash*] > > Here is the console output and a stack trace from DDB: > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD 5.0-CURRENT #0: Sat Aug 19 14:49:39 PDT 2000 > jdp@blake.polstra.com:/local0/obj/local0/src/sys/BLAKE > Timecounter "i8254" frequency 1193163 Hz > Timecounter "TSC" frequency 400902857 Hz > CPU: Pentium II/Pentium II Xeon/Celeron (400.90-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0x653 Stepping = 3 > > Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV, PAT,PSE36 > ,MMX,FXSR> > real memory = 134205440 (131060K bytes) > avail memory = 127336448 (124352K bytes) > Preloaded elf kernel "kernel" at 0xc034b000. > Pentium Pro MTRR support enabled > npx0: <math processor> on motherboard > npx0: INT 16 interface > pcib0: <Intel 82443BX (440 BX) host to PCI bridge> on motherboard > pci0: <PCI bus> on pcib0 > pci0: <Intel 82443BX (440 BX) host to PCI bridge> at 0.0 > pcib1: <Intel 82443BX (440 BX) PCI-PCI (AGP) bridge> at device 1.0 on pci0 > pci1: <PCI bus> on pcib1 > pci1: <Matrox MGA G400 AGP graphics accelerator> at 0.0 irq 11 > isab0: <Intel 82371AB PCI to ISA bridge> at device 4.0 on pci0 > isa0: <ISA bus> on isab0 > pci0: <Intel PIIX4 ATA controller> at 4.1 > pci0: <Intel 82371AB/EB (PIIX4) USB controller> at 4.2 > intpm0: <Intel 82371AB Power management controller> port 0xe800-0xe80f irq 9 at > device 4.3 on pci0 > intpm0: I/O mapped e800 > intpm0: intr IRQ 9 enabled revision 0 > smbus0: <System Management Bus> on intsmb0 > smb0: <SMBus general purpose I/O> on smbus0 > intpm0: PM I/O mapped e400 > ahc0: <Adaptec aic7890/91 Ultra2 SCSI adapter> port 0xd000-0xd0ff mem > 0xe0000000-0xe0000fff irq 5 at device 6.0 on pci0 > ahc0: aic7890/91 Wide Channel A, SCSI Id=7, 32/255 SCBs > fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0xb800-0xb83f mem > 0xdf000000-0xdf0fffff,0xdf800000-0xdf800fff irq 12 at device 10. > 0 on pci0 > > > Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x0 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xc02126ac > stack pointer = 0x10:0xc035fea8 > frame pointer = 0x10:0xc035febc > 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 = 0 (swapper) > interrupt mask = net tty bio cam > kernel: type 12 trap, code=0 > Stopped at fxp_add_rfabuf+0x170: movl 0(%ebx),%eax > db> trace > fxp_add_rfabuf(c0a52c00,0) at fxp_add_rfabuf+0x170 > fxp_attach_common(c0a52c00,c0a52cd8) at fxp_attach_common+0xb8 > fxp_attach(c0a4ad80,c0a4ad80,c0a49600,c0a49580,0) at fxp_attach+0x1ad > device_probe_and_attach(c0a4ad80) at device_probe_and_attach+0x8e > bus_generic_attach(c0a49580,c0a49580,c0a49700,c0a49600,0) at bus_generic_attach+0x16 > device_probe_and_attach(c0a49580) at device_probe_and_attach+0x8e > bus_generic_attach(c0a49600,c0a49600,c071b680,c0a49700,0) at bus_generic_attach+0x16 > device_probe_and_attach(c0a49600) at device_probe_and_attach+0x8e > bus_generic_attach(c0a49700,c0a35080,c035ffc0,c0170c46,c0a49700) at > bus_generic_attach+0x16 > nexus_attach(c0a49700,c0a49700,c02c0e10,364000,0) at nexus_attach+0xd > device_probe_and_attach(c0a49700) at device_probe_and_attach+0x8e > root_bus_configure(c071b680,c029bacc,0) at root_bus_configure+0x16 > configure(0,35dc00,364000,0,c011dc09) at configure+0x33 > mi_startup(0,0,0,0,0) at mi_startup+0x68 > begin() at begin+0x30 > > > John > -- > John Polstra jdp@polstra.com > John D. Polstra & Co., Inc. Seattle, Washington USA > "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > 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?000501c00a34$dfd43f20$71cbc918>