From nobody@FreeBSD.org  Tue Aug 27 21:09:28 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id B2130A89
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Aug 2013 21:09:28 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id A002B2284
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Aug 2013 21:09:28 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7RL9SKh030144
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Aug 2013 21:09:28 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7RL9SoA030139;
	Tue, 27 Aug 2013 21:09:28 GMT
	(envelope-from nobody)
Message-Id: <201308272109.r7RL9SoA030139@oldred.freebsd.org>
Date: Tue, 27 Aug 2013 21:09:28 GMT
From: Dominic Fandrey <kamikaze@bsdforen.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: amd related vm_page_unwire panics
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181590
>Category:       kern
>Synopsis:       [vm] [panic] amd(8) related vm_page_unwire panics
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 27 21:10:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Mon Sep  2 07:20:00 UTC 2013
>Originator:     Dominic Fandrey
>Release:        stable/9
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r254957: Tue Aug 27 19:07:40 CEST 2013     root@mobileKamikaze.norad:/usr/obj/HP6510b-9/amd64/usr/src/sys/HP6510b-9  amd64

>Description:
I have textdumps for two vm_page_unwire panics.

The first one occurred while copying data from one msdosfs to another,
both mounted through amd:

http://pastebin.com/bVgmmcv1

The second one happened when SIGTERM was sent to amd, while there was
heavy tmpfs load (building chromium). No file systems were mounted through
amd at the time:

http://pastebin.com/uqgMiGPc

The second case is easy to reproduce, I have a 100% panic quota for this
scenario.

The core trouble is that the issue even occurs /after/ there was heavy
tmpfs load in the past, while amd was running. Again without any actual
mounts happening. So there is a panic for every system shutdown/reboot.
>How-To-Repeat:
Set WRKDIRPREFIX to a tmpfs (I do not know whether the tmpfs is necessary,
but it certainly helps avoiding excessive filesystem damage).

# cd /usr/ports/www/chromium
# make

Wait till the configure phase is over and the port is actually compiling.

# service amd stop
While chromium is still compiling.
>Fix:


>Release-Note:
>Audit-Trail:

From: Peter Holm <peter@holm.cc>
To: bug-followup@FreeBSD.org, kamikaze@bsdforen.de
Cc:  
Subject: Re: kern/181590: [vm] [panic] amd(8) related vm_page_unwire panics
Date: Mon, 2 Sep 2013 08:13:10 +0200

 I have not been able to reproduce this panic.
 Suggested adding "-S" to amd(8) as a workaround.
 -- 
 Peter

From: Dominic Fandrey <kamikaze@bsdforen.de>
To: Peter Holm <peter@holm.cc>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/181590: [vm] [panic] amd(8) related vm_page_unwire panics
Date: Mon, 02 Sep 2013 09:15:59 +0200

 On 02/09/2013 08:13, Peter Holm wrote:
 > I have not been able to reproduce this panic.
 
 Well, thank you for trying any way!
 
 > Suggested adding "-S" to amd(8) as a workaround.
 
 Done already:
 http://svnweb.freebsd.org/ports/head/sysutils/automounter/Makefile?revision=325726&view=markup
 
 Can I somehow provide more useful data? Maybe my use of nullfs also plays
 a part.
 
 > mount -p
 /dev/ufs/5root		/			ufs	rw,noatime 	1 1
 devfs			/dev			devfs	rw,multilabel 	0 0
 /dev/ufs/5stor		/pool/5stor		ufs	rw,noatime 	2 2
 /pool/5stor/usr		/usr			nullfs	rw,noatime 	0 0
 /pool/5stor/var		/var			nullfs	rw,noatime 	0 0
 /usr/home/root		/root			nullfs	rw,noatime 	0 0
 tmpfs			/var/log		tmpfs	rw		0 0
 tmpfs			/var/run		tmpfs	rw		0 0
 tmpfs			/tmp			tmpfs	rw		0 0
 pid62791@mobileKamikaze:/var/run/automounter.amd.mnt /var/run/automounter.amd.mnt nfs	rw		0 0
 
 From my make.conf:
 .if !${.CURDIR:M/tmp/obj/*}
 WRKDIRPREFIX=           /tmp/obj/${HOST}/${ARCH}
 .endif
 
 -- 
 A: Because it fouls the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
 A: Top-posting.
 Q: What is the most annoying thing on usenet and in e-mail? 
>Unformatted:
