From owner-freebsd-current@FreeBSD.ORG Wed Jun 20 13:48:43 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67C951065691; Wed, 20 Jun 2012 13:48:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9E68FC14; Wed, 20 Jun 2012 13:48:43 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9B318B96C; Wed, 20 Jun 2012 09:48:42 -0400 (EDT) From: John Baldwin To: Matthias Apitz Date: Wed, 20 Jun 2012 09:48:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120615094837.GA1440@tiny.Sisis.de> <201206191056.20432.jhb@freebsd.org> <20120619173117.GA1377@tiny.Sisis.de> In-Reply-To: <20120619173117.GA1377@tiny.Sisis.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201206200948.42056.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 20 Jun 2012 09:48:42 -0400 (EDT) Cc: Alan Cox , swills@freebsd.org, freebsd-current@freebsd.org Subject: Re: panic's in 10-CURRENT r235646 in VMware X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2012 13:48:43 -0000 On Tuesday, June 19, 2012 1:31:17 pm Matthias Apitz wrote: > El d=EDa Tuesday, June 19, 2012 a las 10:56:20AM -0400, John Baldwin escr= ibi=F3: >=20 > > > #11 0xc0d11340 in vm_page_free_toq (m=3D0xc23daf78) > > > at /usr/src/sys/vm/vm_page.c:2060 > > > #12 0xc0d115b5 in vm_page_free (m=3D0xc23daf78) at=20 > > /usr/src/sys/vm/vm_page.c:741 > > > #13 0xc68b01ba in OS_ReservedPageFree () > > > from /usr/local/lib/vmware-tools/modules/drivers/vmmemctl.ko > >=20 > > Ah, so the bug is in here then. Which version of vmware-tools do you h= ave=20 > > installed? >=20 > all the ports are from CVS of May, 19; the version is open-vm-tools-42587= 3,1 Try this patch for the port. It uses vm_page_lock() instead of=20 vm_page_lock_queues() around vm_page_free() for 9.0 and later. Index: files/patch-vmmemctl-os.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /scratchbsd/FreeBSD/cvs/ports/emulators/open-vm-tools/files/patch- vmmemctl-os.c,v retrieving revision 1.2 diff -u -r1.2 patch-vmmemctl-os.c =2D-- files/patch-vmmemctl-os.c 2 Jan 2010 16:29:44 -0000 1.2 +++ files/patch-vmmemctl-os.c 20 Jun 2012 13:45:11 -0000 @@ -1,6 +1,6 @@ =2D--- modules/freebsd/vmmemctl/os.c.orig 2009-04-09 15:18:08.000000000 -04= 00 =2D+++ modules/freebsd/vmmemctl/os.c 2009-04-09 15:34:06.000000000 -04= 00 =2D@@ -413,12 +413,14 @@ +--- modules/freebsd/vmmemctl/os.c.orig 2011-09-21 14:25:15.000000000 -0400 ++++ modules/freebsd/vmmemctl/os.c 2012-06-20 09:44:40.434083000 -0400 +@@ -344,12 +344,22 @@ os_state *state =3D &global_state; os_pmap *pmap =3D &state->pmap; =20 @@ -9,9 +9,17 @@ + VM_OBJECT_LOCK(state->vmobject); + if ( vm_page_lookup(state->vmobject, page->pindex) ) { + os_pmap_putindex(pmap, page->pindex); ++#if __FreeBSD_version >=3D 900000 ++ vm_page_lock(page); ++#else + vm_page_lock_queues(); ++#endif + vm_page_free(page); ++#if __FreeBSD_version >=3D 900000 ++ vm_page_unlock(page); ++#else + vm_page_unlock_queues(); ++#endif } - - os_pmap_putindex(pmap, page->pindex); @@ -19,8 +27,8 @@ + VM_OBJECT_UNLOCK(state->vmobject); } =20 =2D static vm_page_t os_kmem_alloc(int alloc_normal_failed) =2D@@ -430,8 +432,11 @@ +=20 +@@ -361,8 +371,11 @@ os_state *state =3D &global_state; os_pmap *pmap =3D &state->pmap; =20 @@ -32,7 +40,7 @@ return NULL; } =20 =2D@@ -452,6 +457,7 @@ +@@ -383,6 +396,7 @@ if (!page) { os_pmap_putindex(pmap, pindex); } =2D-=20 John Baldwin