Bug 14324

Summary: valgrind 3.17.0 ptest: swapcontext.vgtest fails
Product: [QA/Testing] Package Testing (ptest) Reporter: Yi Fan Yu <yf3yu>
Component: ptestAssignee: Yi Fan Yu <yf3yu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: randy.macleod
Version: unspecified   
Target Milestone: 3.4 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Fan Yu 2021-03-24 20:20:56 UTC
passes on a recent archlinux build

fails on oe-core build with valgrind-ptest qemux86-64

passes however if you run qemu without kvm flag... strange indeed.

this is on the same image.

``` runqemu
root@qemux86-64:/usr/lib/valgrind/ptest/drd/tests# valgrind --tool=drd --read-var-info=yes --check-stack-var=yes --show-confl-seg=no --num-callers=2 ./swapcontext
==1661== drd, a thread error detector
==1661== Copyright (C) 2006-2020, and GNU GPL'd, by Bart Van Assche.
==1661== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==1661== Command: ./swapcontext
==1661==
==1661==
==1661== Process terminating with default action of signal 14 (SIGALRM)
==1661==    at 0x36C744B7E1: swapcontext (swapcontext.S:81)
==1661==    by 0x4014B4: f (swapcontext.c:39)
==1661==
==1661== For lists of detected and suppressed errors, rerun with: -s
==1661== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 24 from 2)
```

``` runqemu kvm
valgrind --tool=drd --read-var-info=yes --check-stack-var=yes --show-confl-seg=no --num-callers=2 ./swapcontext
==277== drd, a thread error detector
==277== Copyright (C) 2006-2020, and GNU GPL'd, by Bart Van Assche.
==277== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==277== Command: ./swapcontext
==277==
==277==
==277== Process terminating with default action of signal 14 (SIGALRM)
==277==    at 0x36C74C3943: clock_nanosleep@@GLIBC_2.17 (clock_nanosleep.c:43)
==277==    by 0x36C74C8726: nanosleep (nanosleep.c:25)
==277==
==277== For lists of detected and suppressed errors, rerun with: -s
==277== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 26 from 2)
Alarm clock
```

I know nothing about how the contextswitch works, so the test is currently disabled.
Comment 1 Yi Fan Yu 2021-03-30 19:37:56 UTC
reported upstream:

https://bugs.kde.org/show_bug.cgi?id=435160