<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14324</bug_id>
          
          <creation_ts>2021-03-24 20:20:56 +0000</creation_ts>
          <short_desc>valgrind 3.17.0 ptest: swapcontext.vgtest fails</short_desc>
          <delta_ts>2021-04-19 19:11:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Package Testing (ptest)</product>
          <component>ptest</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.4 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Fan Yu">yf3yu</reporter>
          <assigned_to name="Yi Fan Yu">yf3yu</assigned_to>
          <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89728</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-03-24 20:20:56 +0000</bug_when>
    <thetext>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&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89830</commentid>
    <comment_count>1</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-03-30 19:37:56 +0000</bug_when>
    <thetext>reported upstream:

https://bugs.kde.org/show_bug.cgi?id=435160</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90005</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-04-19 19:11:13 +0000</bug_when>
    <thetext>patch is backported to master

https://git.openembedded.org/openembedded-core/commit/?id=a9baae5994354ba6410793f8a54e224e9dc21b5a</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>