Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 1996 00:20:55 +0200 (MET DST)
From:      nox@jelal.hb.north.de
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/1195: vm_page_unhold: hold count < 0!!!
Message-ID:  <199605122220.AAA02946@saturn.hb.north.de>
Resent-Message-ID: <199605130010.RAA24764@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1195
>Category:       kern
>Synopsis:       stable with DIAGNOSTIC panics `vm_page_unhold: hold count < 0'
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 12 17:10:02 PDT 1996
>Last-Modified:
>Originator:     Juergen Lock
>Organization:
orga-what?
>Release:        FreeBSD 2.1-STABLE i386
>Environment:

	-stable as of ~a week old, but problem seen since, uh, 2.0?

>Description:

	Every time i make a DIAGNOSTIC kernel and then dump more than
a few MB to tape using afio, i get this.  Then i disable the panic
and everything is well again.  So this itself is not critical but...

>How-To-Repeat:

	(boot DIAGNOSTIC kernel, install afio, mount scratch monk.. errm, tape)

	find /usr/src | afio -G 2 -o -v -f -b 5120 -c 1000 -s 100000x -Z /dev/nrst0

>Fix:
	
	As all the problematic calls seem to come out of vunmapbuf,

Index: i386/i386/vm_machdep.c
@@ -783,8 +783,20 @@
 	/*
 	 * release the data page
 	 */
+#ifdef DIAGNOSTIC
+		vm_page_t foo;
+		pa = pmap_kextract((vm_offset_t) addr);
+		foo = PHYS_TO_VM_PAGE(pa);
+		if (foo->hold_count <= 0) {
+			/* panic in vm_page_unhold -> printf */
+			printf("vunmapbuf: vm_page_unhold: hold count %d <= 0!!!\n", foo->hold_count);
+			foo->hold_count = 1;
+		}
+		vm_page_unhold(foo);
+#else
 		pa = pmap_kextract((vm_offset_t) addr);
 		vm_page_unhold(PHYS_TO_VM_PAGE(pa));
+#endif
 	}
 }
 
now try the write again and you get a console full of these printfs.

 hope it helps...
	Juergen
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605122220.AAA02946>