paulfloyd / freebsd_valgrind

Git repo used to Upstream the FreeBSD Port of Valgrind
GNU General Public License v2.0
15 stars 4 forks source link

pth_cancel_locked hangs #118

Closed nbriggs closed 4 years ago

nbriggs commented 4 years ago

This pth_cancel_locked regression test has been running for 50 minutes.

14:05      0:00.64 /usr/home/briggs/freebsd_valgrind/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --tool=drd --read-var-info=yes --check-stack-var=yes ./pth_cancel_locked (drd-x86-freebsd)
14:55      0:00.00 grep pth

I haven't seen this happen before. Version is valgrind-3.17.0.GIT-087a42b28d-20200623X It does exit given a kill -15 signal.

nbriggs commented 4 years ago

Seems to happen about 1 test out of 4 when run with perl tests/vg_regtest drd/tests/pth_cancel_locked

paulfloyd commented 4 years ago

I'll take a look in the morning. I did make a few signal/frame changes yesterday, but I thought they would only affect amd64.

nbriggs commented 4 years ago

No rush.

nbriggs commented 4 years ago

It never fails (for me) when run with "-v" option, but still exhibits the 1 in 4 failure rate when run with "-d" option. The output (when run with "-d") is identical for the correct and failing cases except that in the failing case the 2nd thread doesn't exit... so it's missing

--pid:1:syswrap- thread_wrapper(tid=2): exit, schedreturncode VgSrc_ExitThread

(where I changed the actual pids to "pid" to compare the output. So, no joy there.

paulfloyd commented 4 years ago

I've reproduced the hang

$ pstack 70545 70545: /usr/home/paulf/freebsd_valgrind/drd/drd-x86-freebsd ----------------- thread -1 (running) ----------------- 0x38107ba9 ???????? (1c6, 40121a0, 4eace58, 4eace78, 10, 1c6) 0x38106de6 vgPlain_client_syscall (1, 4d, 0, 4012190, 4012190, 2) + 7a6 0x38105066 handle_syscall (1, 0, 0, 0, 0, 0) + b6

paulfloyd commented 4 years ago

Seems to be fixed with push To https://github.com/paulfloyd/freebsd_valgrind.git 2e1d49bd5..715d36dea freebsd -> freebsd