From owner-freebsd-current@FreeBSD.ORG Wed Mar 3 10:39:40 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C253016A4CE for ; Wed, 3 Mar 2004 10:39:40 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0418243D3F for ; Wed, 3 Mar 2004 10:39:40 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i23IcSDL031937; Wed, 3 Mar 2004 13:38:28 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i23IcRZY031934; Wed, 3 Mar 2004 13:38:27 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 3 Mar 2004 13:38:27 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Cy Schubert In-Reply-To: <200403031721.i23HLUo9023985@cwsys.cwsent.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: sysctl spinning (was: Re: ps Causes Hard Hang) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 18:39:40 -0000 On Wed, 3 Mar 2004, Cy Schubert wrote: > I'm running 5 -CURRENT systems. My firewall system, using IPF, hard > hangs every time ps is entered -- totally unresponsive, requiring either > a power cycle or reset switch to bring it back to life. > > Before I start digging into this seriously I'd like to possibly get info > from anyone who may have experienced this before. Alan Cox and I have both experienced this -- it's actually only a hard hang if you're trying to use the syscons break to debugger, serial break to debugger can get into DDB fine. It looks like the sysctl code is spinning in kernel, possibly due to looping waiting for a response other than EAGAIN. I'm wonder if it was the recent limits on locked memory changes in sysctl, although at first we thought it might be the sleepq changes (seems less likely now). Because sysctl holds Giant, the other CPUs are locked out of Giant-protected bits of the kernel (many of them), including Syscons. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research > > Dmesg: > > Copyright (c) 1992-2004 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD 5.2-CURRENT #2: Wed Mar 3 06:30:44 PST 2004 > root@cwsys:/export/obj/opt/src/cvs-current/src/sys/KOMQUATS > Preloaded elf kernel "/boot/kernel/kernel" at 0xc075b000. > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: Pentium/P54C (150.07-MHz 586-class CPU) > Origin = "GenuineIntel" Id = 0x52c Stepping = 12 > Features=0x1bf > real memory = 50331648 (48 MB) > avail memory = 43896832 (41 MB) > Intel Pentium detected, installing workaround for F00F bug > npx0: [FAST] > npx0: on motherboard > npx0: INT 16 interface > pcibios: BIOS version 2.10 > Found $PIR table, 5 entries at 0xc00f0a80 > pcib0: at pcibus 0 on motherboard > pci0: on pcib0 > $PIR: 0:9 INTA routed to irq 5 > $PIR: 0:10 INTA routed to irq 9 > $PIR: 0:11 INTA routed to irq 12 > $PIR: 0:12 INTA routed to irq 10 > isab0: at device 1.0 on pci0 > isa0: on isab0 > atapci0: port 0xe000-0xe00f at device 1.1 > on pci0 > ata0: at 0x1f0 irq 14 on atapci0 > ata0: [MPSAFE] > ata1: at 0x170 irq 15 on atapci0 > ata1: [MPSAFE] > uhci0: port 0xd800-0xd81f at > device 1.2 on pci0 > $PIR: 0:1 INTD routed to irq 5 > usb0: on uhci0 > usb0: USB revision 1.0 > uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub0: 2 ports with 2 removable, self powered > pci0: at device 1.3 (no driver attached) > ed0: port 0xd400-0xd41f irq 5 at > device 9.0 on pci0 > ed0: address 00:60:67:66:4d:86, type NE2000 (16 bit) > dc0: port 0xd000-0xd0ff mem > 0xe7000000-0xe70003ff irq 9 at device 10.0 on pci0 > dc0: Ethernet address: 00:03:6d:15:e4:d1 > miibus0: on dc0 > ukphy0: on miibus0 > ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > ed1: port 0xb800-0xb81f irq 12 at device > 11.0 on pci0 > ed1: address 00:20:78:12:5c:0c, type NE2000 (16 bit) > pci0: at device 12.0 (no driver attached) > orm0: