From owner-freebsd-bugs@FreeBSD.ORG Wed Jul 14 08:40:28 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 483C816A4CE for ; Wed, 14 Jul 2004 08:40:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CF1143D2D for ; Wed, 14 Jul 2004 08:40:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i6E8eScX039928 for ; Wed, 14 Jul 2004 08:40:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i6E8eSsA039927; Wed, 14 Jul 2004 08:40:28 GMT (envelope-from gnats) Date: Wed, 14 Jul 2004 08:40:28 GMT Message-Id: <200407140840.i6E8eSsA039927@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Emil Mikulic Subject: Re: kern/68992: valgrind stuck in umtx state before exit X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Emil Mikulic List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2004 08:40:28 -0000 The following reply was made to PR kern/68992; it has been noted by GNATS. From: Emil Mikulic To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: kern/68992: valgrind stuck in umtx state before exit Date: Wed, 14 Jul 2004 18:32:21 +1000 It turns out that valgrind uses the "contested" flag (which was changed), hard-coding it as a magic number instead of using the (now non-existant) UMTX_CONTESTED macro. Please close this PR. I'm sorry about the noise (and also about doubting the kernel) Meanwhile, the following patch works for me: --- valgrind-current-337-orig/coregrind/vg_proxylwp.c Fri Apr 9 22:23:30 2004 +++ valgrind-current-337/coregrind/vg_proxylwp.c Wed Jul 14 18:27:03 2004 @@ -28,9 +28,13 @@ The GNU General Public License is contained in the file COPYING. */ - #include "vg_include.h" +#ifndef UMTX_CONTESTED +# include +# define UMTX_CONTESTED LONG_MIN /* XXX bad */ +#endif + /* We need our own copy of VG_(do_syscall)() to handle a special race-condition. If we've got signals unblocked, and we take a signal in the gap either just before or after the syscall, we may @@ -588,7 +592,7 @@ #if __FreeBSD__ == 5 VG_(do_syscall)(__NR__umtx_lock, &px->mutex); - px->mutex.u_owner |= 1; /* XXX set contested bit for simplicity */ + px->mutex.u_owner |= UMTX_CONTESTED; /* XXX set contested bit for simplicity */ VG_(do_syscall)(__NR_thr_self, &px->lwp); #endif #if __FreeBSD__ == 4