Bug 74903 - devel/valgrind[-snapshot]: Fix lockup in state ``umtx'' on FreeBSD 5.3
Summary: devel/valgrind[-snapshot]: Fix lockup in state ``umtx'' on FreeBSD 5.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-09 21:40 UTC by Simon Barner
Modified: 2004-12-09 23:09 UTC (History)
1 user (show)

See Also:


Attachments
valgrind.patch (867 bytes, patch)
2004-12-09 21:40 UTC, Simon Barner
no flags Details | Diff
file.diff (962 bytes, patch)
2004-12-09 21:40 UTC, Simon Barner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Barner 2004-12-09 21:40:30 UTC
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
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-12-09 23:08:59 UTC
State Changed
From-To: open->closed

Committed, thanks!