From owner-freebsd-current@FreeBSD.ORG Sun Sep 12 16:19:12 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA0B3106566B for ; Sun, 12 Sep 2010 16:19:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 516C48FC18 for ; Sun, 12 Sep 2010 16:19:11 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8CGJ1S6095298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Sep 2010 19:19:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8CGJ1Re006256; Sun, 12 Sep 2010 19:19:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8CGJ1Tx006255; Sun, 12 Sep 2010 19:19:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 12 Sep 2010 19:19:01 +0300 From: Kostik Belousov To: Michael Butler Message-ID: <20100912161901.GD2465@deviant.kiev.zoral.com.ua> References: <4C8CE6F1.3030400@protected-networks.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZNveOOYjKturpEFp" Content-Disposition: inline In-Reply-To: <4C8CE6F1.3030400@protected-networks.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: current@freebsd.org Subject: Re: r212281 breaks KDE 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: Sun, 12 Sep 2010 16:19:12 -0000 --ZNveOOYjKturpEFp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 12, 2010 at 10:42:57AM -0400, Michael Butler wrote: > For the last week, on and off, I've been looking for something that > caused KDE to be horridly unstable, i.e. machine freezes with and > without a core-dump. >=20 > Removing r212281 (and r212282) restores that stability. Is there a race > condition that this update exposes by reducing lock strength? >=20 > The most common failure with this code included produces a back-trace > similar to the one attached, >=20 Does the following change make any difference to you ? diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 63dfb67..d13e488 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -597,13 +597,15 @@ munmap(td, uap) =20 #ifdef HWPMC_HOOKS /* downgrade the lock to prevent a LOR with the pmc-sx lock */ - vm_map_lock_downgrade(map); - if (pkm.pm_address !=3D (uintptr_t) NULL) - PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *) &pkm); - vm_map_unlock_read(map); -#else - vm_map_unlock(map); + if (pkm.pm_address !=3D (uintptr_t)NULL) { + vm_map_lock_downgrade(map); + if (pkm.pm_address !=3D (uintptr_t)NULL) + PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *)&pkm); + vm_map_unlock_read(map); + vm_map_lock(map); + } #endif + vm_map_unlock(map); /* vm_map_delete returns nothing but KERN_SUCCESS anyway */ return (0); } --ZNveOOYjKturpEFp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyM/XQACgkQC3+MBN1Mb4g4QACgvXM8hMci7wFPLrvZijoHBGt6 mVEAoMu0QVgJiDk3VxgWgDSU9JuBNq0Q =SORO -----END PGP SIGNATURE----- --ZNveOOYjKturpEFp--