From owner-freebsd-arch Sun Jul 22 1: 2:30 2001 Delivered-To: freebsd-arch@freebsd.org Received: from ringworld.nanolink.com (discworld.nanolink.com [195.24.48.189]) by hub.freebsd.org (Postfix) with SMTP id DAC3037B401 for ; Sun, 22 Jul 2001 01:02:25 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 5770 invoked by uid 1000); 22 Jul 2001 08:06:27 -0000 Date: Sun, 22 Jul 2001 11:06:26 +0300 From: Peter Pentchev To: arch@FreeBSD.org Subject: Re: kern/29131: Current hungs in sysctl -a while booting + patch Message-ID: <20010722110626.A819@ringworld.oblivion.bg> Mail-Followup-To: arch@FreeBSD.org References: <200107220334.f6M3YRe01219@kan.dnsalias.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107220334.f6M3YRe01219@kan.dnsalias.net>; from kabaev@mail.ru on Sat, Jul 21, 2001 at 11:34:27PM -0400 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, Can anyone envision any side effects from committing the patch in this PR? Seems like a trivial fix for a typo to me.. G'luck, Peter -- If I were you, who would be reading this sentence? On Sat, Jul 21, 2001 at 11:34:27PM -0400, Alexander N. Kabaev wrote: > > >Number: 29131 > >Category: kern > >Synopsis: Current hungs in sysctl -a while booting + patch > >Originator: Alexander N. Kabaev > >Release: FreeBSD 5.0-CURRENT i386 > >Organization: > Verizon > >Environment: > System: FreeBSD kan.dnsalias.net 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sat Jul 21 23:05:49 EDT 2001 root@kan.dnsalias.net:/usr/src/sys/i386/compile/KAN i386 > > >Description: > -CURRENT appears to hung while booting because sysctl -a never > finishes. ^C can be used to interrupt the sysctl execution and > to continue booting. > > It appears, that a sysctl oid_number collision is happening. Namely, > sysctl_register_oid allocates new numbers for OID_AUTO sysctl nodes > starting from the number 100, while at the same time kernel registers > predefined sysctls with ids as high as 255 (see SYSCTL_NODE for > net.inet.raw). If I raise the starting number for dynamic sysctls > to be 255, the problem disappears. > > >How-To-Repeat: > N/A > >Fix: > > Index: kern_sysctl.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/kern_sysctl.c,v > retrieving revision 1.110 > diff -u -u -r1.110 kern_sysctl.c > --- kern_sysctl.c 2001/06/22 19:54:38 1.110 > +++ kern_sysctl.c 2001/07/22 03:04:45 > @@ -113,7 +113,7 @@ > * 100 to leave space for pre-assigned oid numbers. > */ > if (oidp->oid_number == OID_AUTO) { > - static int newoid = 100; > + static int newoid = 0x100; > > oidp->oid_number = newoid++; > if (newoid == 0x7fffffff) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message