From nobody@FreeBSD.org  Mon May 28 06:14:30 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id B3A5A37B424
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 May 2001 06:14:30 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f4SDEU278363;
	Mon, 28 May 2001 06:14:30 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200105281314.f4SDEU278363@freefall.freebsd.org>
Date: Mon, 28 May 2001 06:14:30 -0700 (PDT)
From: kar_alerts@mglorysb.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: sysctl -a freezes my server
X-Send-Pr-Version: www-1.0

>Number:         27706
>Category:       misc
>Synopsis:       sysctl -a freezes my server
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    jkh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 28 06:20:00 PDT 2001
>Closed-Date:    Thu May 31 09:49:00 PDT 2001
>Last-Modified:  Thu May 31 09:50:18 PDT 2001
>Originator:     K Karthik
>Release:        FreeBSD 4.3-STABLE
>Organization:
Multimedia Glory Sdn Bhd
>Environment:
FreeBSD svr.mgsb.domain 4.3-STABLE FreeBSD 4.3-STABLE #0: Mon May 28 13:26:03 GMT 2001     root@svr.mgsb.domain:/usr/src/sys/compile/SVRFW  i386
>Description:
command "sysctl -a" freezes my server.
>How-To-Repeat:
type "sysctl -a"
>Fix:
don't know
>Release-Note:
>Audit-Trail:

From: Sren Schmidt <sos@freebsd.dk>
To: kar_alerts@mglorysb.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/27706: sysctl -a freezes my server
Date: Mon, 28 May 2001 15:22:41 +0200 (CEST)

 It seems kar_alerts@mglorysb.com wrote:
 > >Environment:
 > FreeBSD svr.mgsb.domain 4.3-STABLE FreeBSD 4.3-STABLE #0: Mon May 28 13:26:03 GMT 2001     root@svr.mgsb.domain:/usr/src/sys/compile/SVRFW  i386
 > >Description:
 > command "sysctl -a" freezes my server.
 > >How-To-Repeat:
 > type "sysctl -a"
 
 Yeps I see this too, 4.3-stable is broken here....
 
 -Sren

From: Ruslan Ermilov <ru@FreeBSD.org>
To: =?koi8-r?Q?S=F8ren_Schmidt?= <sos@freebsd.dk>
Cc: bug-followup@FreeBSD.org, Jordan Hubbard <jkh@FreeBSD.org>
Subject: Re: misc/27706: sysctl -a freezes my server
Date: Mon, 28 May 2001 21:21:13 +0300

 On Mon, May 28, 2001 at 06:30:03AM -0700, Sren Schmidt wrote:
 > The following reply was made to PR misc/27706; it has been noted by GNATS.
 > 
 > From: Sren Schmidt <sos@freebsd.dk>
 > To: kar_alerts@mglorysb.com
 > Cc: freebsd-gnats-submit@FreeBSD.ORG
 > Subject: Re: misc/27706: sysctl -a freezes my server
 > Date: Mon, 28 May 2001 15:22:41 +0200 (CEST)
 > 
 >  It seems kar_alerts@mglorysb.com wrote:
 >  > >Environment:
 >  > FreeBSD svr.mgsb.domain 4.3-STABLE FreeBSD 4.3-STABLE #0: Mon May 28 13:26:03 GMT 2001     root@svr.mgsb.domain:/usr/src/sys/compile/SVRFW  i386
 >  > >Description:
 >  > command "sysctl -a" freezes my server.
 >  > >How-To-Repeat:
 >  > type "sysctl -a"
 >  
 >  Yeps I see this too, 4.3-stable is broken here....
 >  
 This is caused by ata-disk.c calling disk_create() twice with the
 same "struct disk" pointer, once as "ad" and second time as "wd".
 This creates the forever loop in sysctl_disks().  -CURRENT is not
 vulnerable.
 
 The following patch is enough to fix this:
 
 Index: ata-disk.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
 retrieving revision 1.60.2.12
 diff -u -p -r1.60.2.12 ata-disk.c
 --- ata-disk.c	2001/04/05 17:21:54	1.60.2.12
 +++ ata-disk.c	2001/05/28 18:17:27
 @@ -208,8 +208,10 @@ ad_attach(struct ata_softc *scp, int dev
      dev->si_iosize_max = 256 * DEV_BSIZE;
      adp->dev1 = dev;
  
 +#if 0
      dev = disk_create(adp->lun, &adp->disk, 0, &fakewd_cdevsw,
  		      &fakewddisk_cdevsw);
 +#endif
      dev->si_drv1 = adp;
      dev->si_iosize_max = 256 * DEV_BSIZE;
      adp->dev2 = dev;
 
 -- 
 Ruslan Ermilov		Oracle Developer/DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
Responsible-Changed-From-To: freebsd-bugs->jkh 
Responsible-Changed-By: phk 
Responsible-Changed-When: Mon May 28 13:13:10 PDT 2001 
Responsible-Changed-Why:  
This is jordans MFC of the kern.disks sysctl. 
He has backed it out now, but I belive with the patch in the PR 
that it will work and apologize for forgetting that detail when 
I advised Jordan on this MFC. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27706 

From: K Karthik <kar_alerts@mglorysb.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: misc/27706: sysctl -a freezes my server
Date: Tue, 29 May 2001 12:36:06 +0000

 The patch solved the problem.
 
 However "sysctl -a" works fine with the latest cvsup-ped source (with 
 subr_disk.c -1.20.2.3).Here is my server info:
 
 *--
 FreeBSD svr.mgsb.domain 4.3-STABLE FreeBSD 4.3-STABLE #0: Tue May 29 11:53:02
 GMT 2001     root@svr.mgsb.domain:/usr/src/sys/compile/SVRFW  i386
 *--
 
 Thanks a lot for the patch + the quick solution.
 
 This PR may be closed.
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Thu May 31 09:49:00 PDT 2001 
State-Changed-Why:  
The origin of this problem has been fixed in ata_disk.c,v 1.60.2.13. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27706 
>Unformatted:
