Bug 14051

Summary: [QA 3.2 M3 RC1] failure in ptest : valgrind.drd and valgrind.helgrind
Product: [QA/Testing] Package Testing (ptest) Reporter: Teoh Jay Shen <jay.shen.teoh>
Component: ptestAssignee: Yi Fan Yu <yf3yu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: akuster808, alex.kanavin, mhalstead, randy.macleod, richard.purdie, sangeeta.jain, tim.orling, yf3yu
Version: 3.2.1   
Target Milestone: 3.4 M1   
Hardware: All   
OS: x86_64   
Whiteboard: backport to 3.2
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
ptest regression report none

Description Teoh Jay Shen 2020-09-20 21:37:59 UTC
Created attachment 4728 [details]
ptest regression report

Following ptest(s) are failing in current release(3.2_M3.rc1) while passing in previous release(3.2_M2_rc1): 

-ptestresult.valgrind.drd/tests/annotate_hb_err
-ptestresult.valgrind.drd/tests/annotate_sem
-ptestresult.valgrind.drd/tests/annotate_smart_pointer
-ptestresult.valgrind.drd/tests/bar_bad
-ptestresult.valgrind.drd/tests/bar_bad_xml
-ptestresult.valgrind.drd/tests/concurrent_close
-ptestresult.valgrind.drd/tests/monitor_example
-ptestresult.valgrind.drd/tests/pth_cond_race
-ptestresult.valgrind.drd/tests/pth_inconsistent_cond_wait
-ptestresult.valgrind.drd/tests/pth_spinlock
-ptestresult.valgrind.drd/tests/tc23_bogus_condwait
-ptestresult.valgrind.drd/tests/thread_name
-ptestresult.valgrind.drd/tests/thread_name_xml
-ptestresult.valgrind.drd/tests/tls_threads
-ptestresult.valgrind.helgrind/tests/pth_destroy_cond

Regression is performed on ptest results for qemux86-64. 

ptest Results for current release:
https://autobuilder.yocto.io/pub/releases/yocto-3.2_M3.rc1/testresults/qemux86-64-ptest/

ptest results for previous release:
https://autobuilder.yocto.io/pub/releases/yocto-3.2_M2.rc1/testresults/qemux86-64-ptest/
Comment 1 Teoh Jay Shen 2020-09-27 20:23:39 UTC
This issues is observed in yocto-3.2_M3.rc2 also.

Three additional failures observed in yocto-3.2_M3.rc2 : 
-ptestresult.valgrind.drd/tests/annotate_order_2
-ptestresult.valgrind.drd/tests/annotate_spinlock
-ptestresult.valgrind.drd/tests/std_mutex
Comment 2 Stacy Gaikovaia 2020-10-21 08:36:53 UTC
See https://bugzilla.yoctoproject.org/show_bug.cgi?id=14051
Comment 3 Sangeeta Jain 2020-10-22 21:00:37 UTC
Following two tests passed in yocto-3.2.rc1:

-ptestresult.valgrind.drd/tests/bar_bad
-ptestresult.valgrind.drd/tests/bar_bad_xml

However three new failures are observed in valgrind.drd: 

-ptestresult.valgrind.drd/tests/annotate_ignore_read
-ptestresult.valgrind.drd/tests/annotate_order_3
-ptestresult.valgrind.drd/tests/annotate_rwlock
Comment 4 Teoh Jay Shen 2020-10-29 19:05:17 UTC
Following tests passed in yocto-3.2.rc2 : 

ptestresult.valgrind.drd/tests/annotate_hb_err
ptestresult.valgrind.drd/tests/annotate_ignore_read
ptestresult.valgrind.drd/tests/annotate_order_2
ptestresult.valgrind.drd/tests/annotate_order_3
ptestresult.valgrind.drd/tests/annotate_rwlock
ptestresult.valgrind.drd/tests/annotate_sem
ptestresult.valgrind.drd/tests/annotate_smart_pointer
ptestresult.valgrind.drd/tests/annotate_spinlock
ptestresult.valgrind.drd/tests/concurrent_close
ptestresult.valgrind.drd/tests/monitor_example
ptestresult.valgrind.drd/tests/pth_cond_race
ptestresult.valgrind.drd/tests/pth_inconsistent_cond_wait
ptestresult.valgrind.drd/tests/pth_spinlock
ptestresult.valgrind.drd/tests/tc23_bogus_condwait
ptestresult.valgrind.drd/tests/thread_name
ptestresult.valgrind.drd/tests/thread_name_xml
ptestresult.valgrind.drd/tests/tls_threads
Comment 5 Teoh Jay Shen 2020-10-29 22:09:39 UTC
(In reply to comment #3)
> Following two tests passed in yocto-3.2.rc1:
> 
> -ptestresult.valgrind.drd/tests/bar_bad
> -ptestresult.valgrind.drd/tests/bar_bad_xml

-ptestresult.valgrind.drd/tests/std_mutex also passed in yocto-3.2.rc1

> 
> However three new failures are observed in valgrind.drd: 
> 
> -ptestresult.valgrind.drd/tests/annotate_ignore_read
> -ptestresult.valgrind.drd/tests/annotate_order_3
> -ptestresult.valgrind.drd/tests/annotate_rwlock
Comment 6 Teoh Jay Shen 2020-10-29 22:11:35 UTC
The remaining ptest that is still failing in yocto-3.2.rc2 is : 

-ptestresult.valgrind.helgrind/tests/pth_destroy_cond
Comment 7 Teoh Jay Shen 2020-10-29 22:23:46 UTC
As a summary for this bug, the only ptest that is failing finally is : 

-ptestresult.valgrind.helgrind/tests/pth_destroy_cond
Comment 8 Stacy Gaikovaia 2020-11-26 15:32:36 UTC
Patch for helgrind was accepted.
Comment 10 Teoh Jay Shen 2020-12-10 00:50:07 UTC
The following ptest is passing in yocto-3.2.1_rc2 : 

-ptestresult.valgrind.helgrind/tests/pth_destroy_cond

However, these following ptest(s) are observed failing in yocto-3.2.1_rc2 :  

-ptestresult.valgrind.drd/tests/bar_bad
-ptestresult.valgrind.drd/tests/bar_bad_xml
Comment 11 Randy MacLeod 2020-12-10 16:15:59 UTC
Anuj, Stacy has fix this on master but she's wrapping up her work term so can you find the commits and backport them? If that doesn't work then assign this bug to me and I'll have someone work on it in January.
Comment 13 Teoh Jay Shen 2020-12-14 05:19:58 UTC
The following ptest is passing in yocto-3.3_M1_rc2 : 

-ptestresult.valgrind.helgrind/tests/pth_destroy_cond

But the following ptest(s) are failing in yocto-3.3_M1_rc2 :  

-ptestresult.valgrind.drd/tests/bar_bad
-ptestresult.valgrind.drd/tests/bar_bad_xml
Comment 14 Randy MacLeod 2020-12-14 19:28:20 UTC
Anuj, Stacy has one week left with WR and has some internal work to do but she'll try to take a look at these valgrind ptest regressions.
Comment 15 Yi Fan Yu 2021-02-11 18:21:47 UTC
maybe this commit temporarily resolves this specific issue? 
oe-core: 7f7d2fa18267090891754d976cbc3e628324d3dd

tests removed:

-ptestresult.valgrind.drd/tests/bar_bad
-ptestresult.valgrind.drd/tests/bar_bad_xml


https://bugs.kde.org/show_bug.cgi?id=430321 is perhaps the more recent bug report concerning `bar_bad` and `bar_bad_xml`

Need info from Alexander Kanavin
Comment 16 Yi Fan Yu 2021-02-11 18:46:28 UTC
Alexander Kanavin,

any updates regarding these 2 tests?

-ptestresult.valgrind.drd/tests/bar_bad
-ptestresult.valgrind.drd/tests/bar_bad_xml
Comment 17 Alexander Kanavin 2021-02-11 18:55:14 UTC
They were disabled in oe-core master some time ago:

commit c4c6bb89cfd083a294a5f760f9b8542b1d5e6715
Author: Alexander Kanavin <alex.kanavin@gmail.com>
Date:   Mon Dec 14 10:10:39 2020 +0100

    valgrind: exclude bar_bad/bar_bad_xml from ptests
    
    The tests' output is non-deterministic and sometimes
    doesn't match the sample output. This has been reported at
    https://bugs.kde.org/show_bug.cgi?id=430321
    (see also an earlier related bug https://bugs.kde.org/show_bug.cgi?id=358213)
    
    Until upstream figures out how to fix this, let's not run the tests.
    
    (From OE-Core rev: 7f7d2fa18267090891754d976cbc3e628324d3dd)
    
    Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 18 Yi Fan Yu 2021-02-11 20:57:55 UTC
not sure if related (i was investigating BUG 14223 of another ptest failing)
I saw this when running ptest

```
2021-02-11T20:36
BEGIN: /usr/lib/valgrind/ptest
Hide valgrind tests that are non-deterministic
Reported at https://bugs.kde.org/show_bug.cgi?id=430321
mv: cannot stat 'drd/tests/bar_bad.vgtest': No such file or directory
mv: cannot stat 'drd/tests/bar_bad_xml.vgtest': No such file or directory
```
Comment 19 Yi Fan Yu 2021-02-11 21:17:33 UTC
(In reply to comment #18)
> not sure if related (i was investigating BUG 14223 of another ptest failing)
> I saw this when running ptest
> 
> ```
> 2021-02-11T20:36
> BEGIN: /usr/lib/valgrind/ptest
> Hide valgrind tests that are non-deterministic
> Reported at https://bugs.kde.org/show_bug.cgi?id=430321
> mv: cannot stat 'drd/tests/bar_bad.vgtest': No such file or directory
> mv: cannot stat 'drd/tests/bar_bad_xml.vgtest': No such file or directory
> ```

nvm its because i ran the test twice.

I think we can close this issue, the solution was to disable it until they fix it in valgrind
Comment 20 Anuj Mittal 2021-03-26 08:47:21 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > not sure if related (i was investigating BUG 14223 of another ptest failing)
> > I saw this when running ptest
> > 
> > ```
> > 2021-02-11T20:36
> > BEGIN: /usr/lib/valgrind/ptest
> > Hide valgrind tests that are non-deterministic
> > Reported at https://bugs.kde.org/show_bug.cgi?id=430321
> > mv: cannot stat 'drd/tests/bar_bad.vgtest': No such file or directory
> > mv: cannot stat 'drd/tests/bar_bad_xml.vgtest': No such file or directory
> > ```
> 
> nvm its because i ran the test twice.
> 
> I think we can close this issue, the solution was to disable it until they
> fix it in valgrind

Should we close this bug now? If you are working on it, could you assign this to yourself please?
Comment 21 Yi Fan Yu 2021-04-15 15:04:51 UTC
I'll see what I can find.
Comment 22 Yi Fan Yu 2021-04-20 19:53:26 UTC
Was not able to reproduce on qemux86-64 kvm running 10 times those 2 specific ptest.

It might be fixed by 3.17 uprev...

If I can reproduce with 3.16 (where this workaround/disabling was introduced), then I will send a patch to revert this test.
Comment 23 Yi Fan Yu 2021-04-21 15:30:47 UTC
Patch in the mailing list to reenable these 2 tests. Let's see if they still fail on AB
Comment 24 Yi Fan Yu 2021-04-22 19:41:32 UTC
https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=1e8f2a1dffd03781d74d770867ae505023c29857

its reenabled on master-next,
if this reoccurs, we can reopen a new ticket, and likely mark it AB

passed on last night AB on qemux86-64

https://autobuilder.yocto.io/pub/non-release/20210421-20/testresults/qemux86-64-ptest/


closing this ticket as fixed. since Stacy fixed the helgrind issue.
Comment 25 Yi Fan Yu 2021-04-23 01:36:12 UTC
see comment above