From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Dec 9 21:40:31 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D4D016A4CE for ; Thu, 9 Dec 2004 21:40:31 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E93D243D54 for ; Thu, 9 Dec 2004 21:40:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iB9LeUSR021275 for ; Thu, 9 Dec 2004 21:40:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iB9LeUWX021271; Thu, 9 Dec 2004 21:40:30 GMT (envelope-from gnats) Resent-Date: Thu, 9 Dec 2004 21:40:30 GMT Resent-Message-Id: <200412092140.iB9LeUWX021271@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Simon Barner Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3BEB16A4CE for ; Thu, 9 Dec 2004 21:30:28 +0000 (GMT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id BE2E943D31 for ; Thu, 9 Dec 2004 21:30:27 +0000 (GMT) (envelope-from barner@gmx.de) Received: (qmail 12135 invoked by uid 65534); 9 Dec 2004 21:30:24 -0000 Received: from unknown (EHLO zi025.glhnet.mhn.de) (129.187.19.157) by mail.gmx.net (mp008) with SMTP; 09 Dec 2004 22:30:24 +0100 Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id DD254C0ED; Thu, 9 Dec 2004 22:30:09 +0100 (CET) Message-Id: <20041209213009.DD254C0ED@zi025.glhnet.mhn.de> Date: Thu, 9 Dec 2004 22:30:09 +0100 (CET) From: Simon Barner To: FreeBSD-gnats-submit@FreeBSD.org cc: Pav Lucistnik cc: Doug Rabson Subject: ports/74903: devel/valgrind[-snapshot]: Fix lockup in state ``umtx'' on FreeBSD 5.3 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Simon Barner List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 21:40:31 -0000 >Number: 74903 >Category: ports >Synopsis: devel/valgrind[-snapshot]: Fix lockup in state ``umtx'' on FreeBSD 5.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Dec 09 21:40:30 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Simon Barner >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: FreeBSD zi025.glhnet.mhn.de 5.3-STABLE FreeBSD 5.3-STABLE #0: Fri Nov 5 02:17:53 CET 2004 root@zi025.glhnet.mhn.de:/usr/obj/usr/src/sys/KISTE i386 >Description: Starting from some point after FreeBSD 5.2.1, valgrind did not terminate correctly, but got stuck in state ``umtx''. This was mentioned on the lists and in kern/68992 [closed], but I was never able to fix the problem. Today, I gave it another try, and it turned out to be quite simple (from the current perspective ;-): Since coregrind/vg_proxylwp.c did not include "vg_unsafe.h" (which in turn includes ), the __FreeBSD_version macro was undefined. Thus the conditioned definition of the UMTX_CONTESTED constant has always taken place in the <= 5.2.1 way. Therefore, on FreeBSD >= 502120, the kernel's and valgrind's defintion of that flag were out of sync, which is why valgrind did not terminate on these systems. Btw: Pav, please regard this as a first step of closing ports/71832. I had some questions to the originator of that PR, and I thought it would be the best to provide him with a working version of valgrind ;-) >How-To-Repeat: Run valgrind{-snapshot} on FreeBSD >= 502120, e.g. % valgrind --tool=memcheck true >Fix: --- valgrind.patch begins here --- diff -ruN valgrind.orig/Makefile valgrind/Makefile --- valgrind.orig/Makefile Thu Dec 9 22:07:55 2004 +++ valgrind/Makefile Thu Dec 9 22:08:12 2004 @@ -7,7 +7,7 @@ PORTNAME= valgrind PORTVERSION= 352 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= http://www.rabson.org/ DISTNAME= ${PORTNAME}-stable-${PORTVERSION} diff -ruN valgrind.orig/files/patch-coregrind-vg_proxylwp.c valgrind/files/patch-coregrind-vg_proxylwp.c --- valgrind.orig/files/patch-coregrind-vg_proxylwp.c Thu Jan 1 01:00:00 1970 +++ valgrind/files/patch-coregrind-vg_proxylwp.c Thu Dec 9 22:05:11 2004 @@ -0,0 +1,10 @@ +--- coregrind/vg_proxylwp.c.orig Thu Dec 9 20:02:58 2004 ++++ coregrind/vg_proxylwp.c Thu Dec 9 20:03:16 2004 +@@ -30,6 +30,7 @@ + + + #include "vg_include.h" ++#include "vg_unsafe.h" + + #ifndef UMTX_CONTESTED + # if __FreeBSD_version < 502120 --- valgrind.patch ends here --- --- valgrind-snapshot.patch begins here --- diff -ruN valgrind-snapshot.orig/Makefile valgrind-snapshot/Makefile --- valgrind-snapshot.orig/Makefile Thu Dec 9 22:07:39 2004 +++ valgrind-snapshot/Makefile Thu Dec 9 22:08:24 2004 @@ -7,7 +7,7 @@ PORTNAME= valgrind PORTVERSION= 352 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= http://www.rabson.org/ PKGNAMESUFFIX= -snapshot diff -ruN valgrind-snapshot.orig/files/patch-coregrind-vg_proxylwp.c valgrind-snapshot/files/patch-coregrind-vg_proxylwp.c --- valgrind-snapshot.orig/files/patch-coregrind-vg_proxylwp.c Thu Jan 1 01:00:00 1970 +++ valgrind-snapshot/files/patch-coregrind-vg_proxylwp.c Thu Dec 9 22:06:43 2004 @@ -0,0 +1,10 @@ +--- coregrind/vg_proxylwp.c.orig Thu Dec 9 20:02:58 2004 ++++ coregrind/vg_proxylwp.c Thu Dec 9 20:03:16 2004 +@@ -30,6 +30,7 @@ + + + #include "vg_include.h" ++#include "vg_unsafe.h" + + #ifndef UMTX_CONTESTED + # if __FreeBSD_version < 502120 --- valgrind-snapshot.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: X-send-pr-version: 3.113 X-GNATS-Notify: