[Bug 264441] Hang with Valgrind on single CPU systems

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 03 Jun 2022 20:05:11 UTC

            Bug ID: 264441
           Summary: Hang with Valgrind on single CPU systems
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: pjfloyd@wanadoo.fr

There are a lot more details here:


and discussion here


It may be somewhat difficult to reproduce the error as it may be quite timing

Steps to reproduce:

Most importantly, you need a single CPU i386 or amd64 system. That's possible
with VirtualBox.

Clone and build the Valgrind source and regressions tests.

clone git://sourceware.org/git/valgrind.git

Backout a workaround for one of the issues

$ git revert a4151207a28b506cdd1e7c095e4aebaaf289a384

Make sure that you have the ports for autoconf, automake, libtool and gmake

Run the folllowing comamnds

If you have GCC installed you need to set the environment variables CC=clang

$ sh autogen.sh
$ ./configure
$ gmake
$ gmake check

Now you can try the two testcases that were causing problems

$ perl tests/vg_regtest none/tests/tls


$ perl tests/vg_regtest none/tests/pth_2sig

If you want to run Valgrind without any wrapper scripts then do the following

export VALGRIND_LAUNCHER=YOUR_PATH/valgrind/coregrind/valgrind
export VALGRIND_LIB=YOUR_PATH/valgrind/.in_place
export VALGRIND_LIB_INNER=YOUR_PATH/valgrind/.in_place

(where YOUR_PATH/valgrind is the path to the git repo cloned above)

cd to none/tests


../../.in_place/none-amd64-freebsd --tool=none ./tls


../../.in_place/none-amd64-freebsd --tool=none ./pth_2sig

You are receiving this mail because:
You are the assignee for the bug.