From owner-freebsd-bugs Sat Jul 21 20:40:19 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8C5EC37B40D for ; Sat, 21 Jul 2001 20:40:14 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6M3eEO08944; Sat, 21 Jul 2001 20:40:14 -0700 (PDT) (envelope-from gnats) Received: from smtp3.port.ru (mx3.port.ru [194.67.23.37]) by hub.freebsd.org (Postfix) with ESMTP id 9757D37B401 for ; Sat, 21 Jul 2001 20:34:30 -0700 (PDT) (envelope-from kabaev@mail.ru) Received: from adsl-141-154-21-78.bostma.adsl.bellatlantic.net ([141.154.21.78] helo=kan.dnsalias.net) by smtp3.port.ru with esmtp (Exim 3.14 #1) id 15OA0i-000L4p-00 for FreeBSD-gnats-submit@freebsd.org; Sun, 22 Jul 2001 07:34:29 +0400 Received: (from kan@localhost) by kan.dnsalias.net (8.11.4/8.11.4) id f6M3YRe01219; Sat, 21 Jul 2001 23:34:27 -0400 (EDT) (envelope-from kan) Message-Id: <200107220334.f6M3YRe01219@kan.dnsalias.net> Date: Sat, 21 Jul 2001 23:34:27 -0400 (EDT) From: "Alexander N. Kabaev" Reply-To: "Alexander N. Kabaev" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/29131: Current hungs in sysctl -a while booting + patch Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29131 >Category: kern >Synopsis: Current hungs in sysctl -a while booting + patch >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 21 20:40:09 PDT 2001 >Closed-Date: >Last-Modified: >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) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message