From pho@holm.cc  Sun Jun 13 08:17:36 2004
Return-Path: <pho@holm.cc>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8C72C16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Jun 2004 08:17:36 +0000 (GMT)
Received: from relay.pair.com (relay.pair.com [209.68.1.20])
	by mx1.FreeBSD.org (Postfix) with SMTP id 03A0943D53
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Jun 2004 08:17:36 +0000 (GMT)
	(envelope-from pho@holm.cc)
Received: (qmail 18864 invoked from network); 13 Jun 2004 08:15:31 -0000
Received: from 0x50a43fc7.hknxx1.adsl-dhcp.tele.dk (HELO peter.osted.lan) (80.164.63.199)
  by relay.pair.com with SMTP; 13 Jun 2004 08:15:31 -0000
Received: from peter.osted.lan (localhost [127.0.0.1])
	by peter.osted.lan (8.12.10/8.12.10) with ESMTP id i5D8FVtO083699
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Jun 2004 10:15:31 +0200 (CEST)
	(envelope-from pho@peter.osted.lan)
Received: (from pho@localhost)
	by peter.osted.lan (8.12.10/8.12.10/Submit) id i5D8FVeu083698;
	Sun, 13 Jun 2004 10:15:31 +0200 (CEST)
	(envelope-from pho)
Message-Id: <200406130815.i5D8FVeu083698@peter.osted.lan>
Date: Sun, 13 Jun 2004 10:15:31 +0200 (CEST)
From: Peter Holm <peter@holm.cc>
Reply-To: Peter Holm <peter@holm.cc>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: page fault while in kernel mode
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         67898
>Category:       kern
>Synopsis:       panic: in src/sys/vm/swap_pager.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bms
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 13 08:20:08 GMT 2004
>Closed-Date:    Tue Nov 02 07:08:56 GMT 2004
>Last-Modified:  Tue Nov 02 07:08:56 GMT 2004
>Originator:     Peter Holm
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD current.osted.lan 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sat Jun 12 04:27:34
 CEST 2004 root@peter.osted.lan:/usr/src/sys/i386/compile/PHO i386


	
>Description:
	Got a page fault in vm/swap_pager.c:1134 during stress test.
        http://www.holm.cc/stress/log/cons50.html
>How-To-Repeat:
	Only seen once during stress test.
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->alc 
Responsible-Changed-By: bms 
Responsible-Changed-When: Wed Jun 23 07:00:07 GMT 2004 
Responsible-Changed-Why:  
One for alc@, he was here recently 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67898 
State-Changed-From-To: open->analyzed 
State-Changed-By: bms 
State-Changed-When: Wed Jun 23 09:03:44 GMT 2004 
State-Changed-Why:  
Patch for this case pending review 


Responsible-Changed-From-To: alc->bms 
Responsible-Changed-By: bms 
Responsible-Changed-When: Wed Jun 23 09:03:44 GMT 2004 
Responsible-Changed-Why:  
Patch for this case pending review 

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

From: Bruce M Simpson <bms@spc.org>
To: peter@holm.cc
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/67898: page fault while in kernel mode
Date: Wed, 23 Jun 2004 10:05:07 +0100

 --RASg3xLB4tUQ4RcS
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Wed, Jun 23, 2004 at 09:04:10AM +0000, Bruce M Simpson wrote:
 > Synopsis: page fault while in kernel mode
 > 
 > State-Changed-From-To: open->analyzed
 > State-Changed-By: bms
 > State-Changed-When: Wed Jun 23 09:03:44 GMT 2004
 > State-Changed-Why: 
 > Patch for this case pending review
 
 Try this
 
 --RASg3xLB4tUQ4RcS
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="swdevname.patch"
 
 Index: src/sys/vm/swap_pager.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/vm/swap_pager.c,v
 retrieving revision 1.252
 diff -u -r1.252 swap_pager.c
 --- src/sys/vm/swap_pager.c	17 Jun 2004 17:16:53 -0000	1.252
 +++ src/sys/vm/swap_pager.c	23 Jun 2004 08:53:28 -0000
 @@ -1125,6 +1125,8 @@
  	 * cleared on completion.  If an I/O error occurs, SWAPBLK_NONE
  	 * is set in the meta-data.
  	 */
 +#define GETSWDEVNAME(_bp) \
 +	((_bp)->b_dev == NODEV ? "[NFS swap]" : devtoname(bp->b_dev))
  	s = splvm();
  	vm_page_lock_queues();
  	while ((mreq->flags & PG_SWAPINPROG) != 0) {
 @@ -1134,11 +1136,12 @@
  			printf(
  			    "swap_pager: indefinite wait buffer: device:"
  				" %s, blkno: %ld, size: %ld\n",
 -			    devtoname(bp->b_dev), (long)bp->b_blkno,
 +			    GETSWDEVNAME(bp), (long)bp->b_blkno,
  			    bp->b_bcount
  			);
  		}
  	}
 +#undef GETSWDEVNAME
  	vm_page_unlock_queues();
  	splx(s);
  
 
 --RASg3xLB4tUQ4RcS--

From: Bruce M Simpson <bms@spc.org>
To: peter@holm.cc
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/67898: page fault while in kernel mode
Date: Wed, 23 Jun 2004 10:21:04 +0100

 Typo.
 
 On Wed, Jun 23, 2004 at 10:05:07AM +0100, Bruce M Simpson wrote:
 > Try this
 ...
 > +#define GETSWDEVNAME(_bp) \
 > +	((_bp)->b_dev == NODEV ? "[NFS swap]" : devtoname(bp->b_dev))
                          ^^^^^
 This should be NULL.
State-Changed-From-To: analyzed->patched 
State-Changed-By: bms 
State-Changed-When: Wed Jun 23 15:15:36 GMT 2004 
State-Changed-Why:  
An appropriate fix has been committed to -CURRENT 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67898 
State-Changed-From-To: patched->closed 
State-Changed-By: bms 
State-Changed-When: Tue Nov 2 07:08:09 GMT 2004 
State-Changed-Why:  
This particular bug only affected 5.x releases. 
RELENG_5 has now been branched as -STABLE. 

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