Summary: | drd/tests/swapcontext.c: threads are interrupted in nanosleep | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Yi Fan Yu <yifan.yu> |
Component: | drd | Assignee: | Bart Van Assche <bart.vanassche+kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
proposed patch
proposed patch v2 |
Description
Yi Fan Yu
2021-03-30 18:22:44 UTC
If i remove the nanosleep statement, inside of `f` the original bug report 432381 's error message appears drd: drd_main.c:378 (drd_stop_using_mem): Assertion 'a1 <= a2' failed What is the purpose of nanosleep, can it be safely removed? Is there a filter to allow both scenario (stopped in f and stopped in nanosleep) to be correct? Created attachment 137186 [details]
proposed patch
revert commit 719d23b7a9c3b02411dee7d5d4d3744938bb768c
I do know that the commit I reverted mentioned portability. Do you know which platform has problems with timerfd? Reverting commit 719d23b7a9c3 ("drd/tests/swapcontext: Improve portability") is not an option. Valgrind source code must build and run on all supported operating systems. Not all supported operating systems support poll(). (In reply to Bart Van Assche from comment #5) > Reverting commit 719d23b7a9c3 ("drd/tests/swapcontext: Improve portability") > is not an option. Valgrind source code must build and run on all supported > operating systems. Not all supported operating systems support poll(). seems like Mac doesn't support poll, maybe select would be a better choice? I tested the "proposed patch" and test passes. any advice to solve this issue? maybe the root cause is just the stderr.exp being to sensitive... Please provide a .stderr.exp file that makes the test pass on your test setup. stderr.exp that would pass the test. ``` Process terminating with default action of signal 14 (SIGALRM) at 0x........: clock_nanosleep@@GLIBC_2.17 (clock_nanosleep.c:?) by 0x........: nanosleep (nanosleep.c:?) ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ``` Created attachment 137357 [details]
proposed patch v2
basically to avoid printing the stacktrace with a handled signal.
"Patch v2" has been applied on the master branch. Thanks for the patch! thanks! passes on yocto ptest |