From owner-freebsd-current Sat Aug 19 16:23:35 2000 Delivered-To: freebsd-current@freebsd.org Received: from falla.videotron.net (falla.videotron.net [205.151.222.106]) by hub.freebsd.org (Postfix) with ESMTP id 12ECF37B422; Sat, 19 Aug 2000 16:23:22 -0700 (PDT) Received: from jehovah ([24.201.203.113]) by falla.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with SMTP id <0FZK00KKNBMVRT@falla.videotron.net>; Sat, 19 Aug 2000 19:23:19 -0400 (EDT) Date: Sat, 19 Aug 2000 19:26:17 -0400 From: Bosko Milekic Subject: Re: (URGENT) Instant panic in _MEXT_ALLOC_CNT To: John Polstra , dwmalone@freebsd.org Cc: current@freebsd.org Message-id: <000501c00a34$dfd43f20$71cbc918@jehovah> MIME-version: 1.0 X-Mailer: Microsoft Outlook Express 5.00.2919.6700 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 References: X-Priority: 3 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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" To: 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 ,MMX,FXSR> > real memory = 134205440 (131060K bytes) > avail memory = 127336448 (124352K bytes) > Preloaded elf kernel "kernel" at 0xc034b000. > Pentium Pro MTRR support enabled > npx0: on motherboard > npx0: INT 16 interface > pcib0: on motherboard > pci0: on pcib0 > pci0: at 0.0 > pcib1: at device 1.0 on pci0 > pci1: on pcib1 > pci1: at 0.0 irq 11 > isab0: at device 4.0 on pci0 > isa0: on isab0 > pci0: at 4.1 > pci0: at 4.2 > intpm0: port 0xe800-0xe80f irq 9 at > device 4.3 on pci0 > intpm0: I/O mapped e800 > intpm0: intr IRQ 9 enabled revision 0 > smbus0: on intsmb0 > smb0: on smbus0 > intpm0: PM I/O mapped e400 > ahc0: 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: 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