Date: Thu, 9 Dec 2004 22:30:09 +0100 (CET) From: Simon Barner <barner@gmx.de> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Doug Rabson <dfr@nlsystems.com> Subject: ports/74903: devel/valgrind[-snapshot]: Fix lockup in state ``umtx'' on FreeBSD 5.3 Message-ID: <20041209213009.DD254C0ED@zi025.glhnet.mhn.de> Resent-Message-ID: <200412092140.iB9LeUWX021271@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <sys/param.h>), 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041209213009.DD254C0ED>