From root@pig.franz.com  Fri Jul 28 16:07:26 2000
Return-Path: <root@pig.franz.com>
Received: from pig.franz.com (fw1.franz.com [216.15.43.105])
	by hub.freebsd.org (Postfix) with ESMTP id CF7C237B9D1
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 28 Jul 2000 16:07:22 -0700 (PDT)
	(envelope-from root@pig.franz.com)
Received: (from root@localhost)
	by pig.franz.com (8.9.3/8.9.3) id QAA03566;
	Fri, 28 Jul 2000 16:07:21 -0700 (PDT)
	(envelope-from root)
Message-Id: <200007282307.QAA03566@pig.franz.com>
Date: Fri, 28 Jul 2000 16:07:21 -0700 (PDT)
From: dancy@franz.com
Sender: root@pig.franz.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Problem with filesystem or swap or both?
X-Send-Pr-Version: 3.2

>Number:         20273
>Category:       kern
>Synopsis:       swap
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    dillon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 28 16:10:01 PDT 2000
>Closed-Date:    Fri Oct 13 00:08:53 PDT 2000
>Last-Modified:  Fri Oct 13 00:14:34 PDT 2000
>Originator:     Ahmon Dancy
>Release:        FreeBSD 4.0-RELEASE i386
>Organization:
Franz Inc.
>Environment:

Just upgraded from 3.0-RELEASE.  This is a non-GENERIC kernel w/ SMP 
turned on.

SCSI disk da0 w/ single slice (s1).
Partitioned using /stand/sysintall into:
620MB filesystem (da0s1e)
400MB swap area (da0s1b)

/etc/fstab:
/dev/da0s1e		/feet		ufs	rw		2	2
/dev/da0s1b		none		swap	sw		0	0


>Description:

System panics during bootup:

swapon... /dev/wd0s1b
panic: blst_radix_free: freeing free block
mp_lock=01000001; cpuid=1; lapic.id=01000000
boot() called on cpu #1

syncing...
etc

If I comment out the fstab entries for those two partitions, the system
boots fine. 
If I erase the two partitions and make one big giant one that's all swap,
the system boots fine.

>How-To-Repeat:

I can delete the partitions and remake them (using /stand/sysinstall) and the 
problem will persist.

>Fix:

Unknown


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dillon 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Wed Aug 2 13:05:12 PDT 2000 
Responsible-Changed-Why:  
Matt's code, he'll know what questions to ask. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20273 

From: Tor.Egge@fast.no
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/20273: Problem with filesystem or swap or both?
Date: Wed, 11 Oct 2000 03:50:44 +0200

 ----Next_Part(Wed_Oct_11_03:50:20_2000)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 
 This problem is caused by incorrect calculation of nswap (by not taking
 the device stripe size into account).
 
 - Tor Egge
 
 
 ----Next_Part(Wed_Oct_11_03:50:20_2000)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Index: sys/vm/vm_swap.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/vm/vm_swap.c,v
 retrieving revision 1.104
 diff -u -r1.104 vm_swap.c
 --- sys/vm/vm_swap.c	2000/05/05 09:59:14	1.104
 +++ sys/vm/vm_swap.c	2000/10/11 00:02:37
 @@ -291,8 +291,8 @@
  	 * DEV_BSIZE'd. 
  	 */
  
 -	if (nblks * nswdev > nswap)
 -		nswap = (nblks+1) * nswdev;
 +	if ((nblks + dmmax) * nswdev > nswap)
 +		nswap = (nblks + dmmax) * nswdev;
  
  	if (swapblist == NULL)
  		swapblist = blist_create(nswap);
 
 ----Next_Part(Wed_Oct_11_03:50:20_2000)----
 
State-Changed-From-To: open->closed 
State-Changed-By: dillon 
State-Changed-When: Fri Oct 13 00:08:53 PDT 2000 
State-Changed-Why:  
Committed a patch substantially similar to Tor's suggestion to 
-STABLE.  Will commit to -current momentarily. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20273 
>Unformatted:
