Date: Tue, 24 Aug 2004 21:29:50 +0200 From: Simon Barner <barner@in.tum.de> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-hackers@freebsd.org Subject: Re: valgrind on 5.3BETA1 Message-ID: <20040824192950.GA78484@zi025.glhnet.mhn.de> In-Reply-To: <20040823213133.GC36920@dan.emsphone.com> References: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> <20040823200339.GA5717@zi025.glhnet.mhn.de> <20040823212138.GB36920@dan.emsphone.com> <20040823213133.GC36920@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > --- coregrind/vg_proxylwp.c~ Mon Aug 23 15:47:33 2004 > +++ coregrind/vg_proxylwp.c Mon Aug 23 15:48:42 2004 > @@ -596,6 +596,8 @@ > static const vki_kstack_t ss =3D { .ss_flags =3D VKI_SS_DISABLE }; > =20 > #if __FreeBSD__ =3D=3D 5 > + VG_(message)(Vg_UserMsg, "Locking#1 mutex %p/%p", &px->mutex, px->mut= ex.u_owner); > VG_(do_syscall)(__NR__umtx_lock, &px->mutex); > + VG_(message)(Vg_UserMsg, "Done %p/%p", &px->mutex, px->mutex.u_owner); > px->mutex.u_owner |=3D UMTX_CONTESTED; > VG_(do_syscall)(__NR_thr_self, &px->lwp); > @@ -943,6 +944,8 @@ > px->exitcode =3D ret; > =20 > #if __FreeBSD__ =3D=3D 5 > + VG_(message)(Vg_UserMsg, "Unlocking mutex %p/%p", &px->mutex, px->mut= ex.u_owner); > ret =3D VG_(do_syscall)(__NR__umtx_unlock, &px->mutex); > + VG_(message)(Vg_UserMsg, "Done %p/%p", &px->mutex, px->mutex.u_owner); > if (use_rfork) > VG_(do_syscall)(__NR_exit, 0); > @@ -1171,7 +1173,11 @@ > #if __FreeBSD__ =3D=3D 5 > if (block) { > if(proxy->lwp !=3D 0) > + { > + VG_(message)(Vg_UserMsg, "Locking#2 mutex %p/%p", &proxy->mutex, pro= xy->mutex.u_owner); > VG_(do_syscall)(__NR__umtx_lock, &proxy->mutex); ^^^^^^^^^^^^^^^^ Commenting out this lock operation works for me. Did you notice that there are two places where the lock is acquired, and only one, where it is released? Perhaps the right solution would be to add another unlock operation...? =20 Of course, I have no idea of valgrind internals, threading implementation on FreeBSD, umtx, etc. ;-D > + VG_(message)(Vg_UserMsg, "Done %p/%p", &proxy->mutex, proxy->mutex.u= _owner); > + } > =20 > if (status) > *status =3D proxy->exitcode; --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBK5cuCkn+/eutqCoRAjEeAKDfB4Fo/cfZFKCJlGCCmxq4NKn/UgCdEOhe FIEqRbpiDmuWZ6tzQ8wJves= =2hJm -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040824192950.GA78484>