|
From: Carl E. L. <ce...@us...> - 2015-05-14 18:02:22
|
On Mon, 2015-05-11 at 12:13 -0500, Will Schmidt wrote:
> Add a tc06_two_races_xml exp output for ppc64. This differs from the
> existing .exp in that does not contain the pthread_create_WRK entry frame.
> Note that the filter_stderr helper also removes the pthread_create_WRK
> content, so I believe this to be an extension of that change.
>
> Signed-off-by: Will Schmidt <wil...@vn...>
Will:
When I checked this test on my Power 7 box, the test passes. I looked
at the nightly regression test results for Power 7 and it fails. I also
see it failing on Power 8. I spent a fair bit of time digging into the
test and feel like there is something here we don't understand. My
concern is adding the expect file for this test might be covering up
something more fundamental. In my digging, I found that on the power 8
machine I wasn't able to find the glibc debug info but it was present on
the power 7 box I was using. Not sure if this is the root cause or not.
I was pursuing that on the thought that there might be an issue with
Valgrind/Helgrind in wrapping the pthread_create calls. I have seen
issues in the past with Valgrind not wrapping functions correctly
because the library name on Power 8 changed (due to the API difference
for LE). Still not sure if that might be part of the issue here or
not.
The bottom line is I think we need to investigate this test failure more
to make sure adding an additional expect file is really the right thing
to do.
Carl Love
> --
> ---
> helgrind/tests/Makefile.am | 2
> helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64 | 259 ++++++++++++++++++++
> 2 files changed, 260 insertions(+), 1 deletion(-)
> create mode 100644 helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64
>
> diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
> index 7ed3478..e3dff80 100644
> --- a/helgrind/tests/Makefile.am
> +++ b/helgrind/tests/Makefile.am
> @@ -64,7 +64,7 @@ EXTRA_DIST = \
> tc06_two_races.vgtest tc06_two_races.stdout.exp \
> tc06_two_races.stderr.exp \
> tc06_two_races_xml.vgtest tc06_two_races_xml.stdout.exp \
> - tc06_two_races_xml.stderr.exp \
> + tc06_two_races_xml.stderr.exp tc06_two_races_xml.stderr.exp-ppc64 \
> tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \
> tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \
> tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \
> diff --git a/helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64 b/helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64
> new file mode 100644
> index 0000000..e75829e
> --- /dev/null
> +++ b/helgrind/tests/tc06_two_races_xml.stderr.exp-ppc64
> @@ -0,0 +1,259 @@
> +<?xml version="1.0"?>
> +
> +<valgrindoutput>
> +
> +<protocolversion>4</protocolversion>
> +<protocoltool>helgrind</protocoltool>
> +
> +<preamble>
> + <line>Helgrind, a thread error detector</line>
> + <line>Copyright (C) XXXX-YYYY, and GNU GPL'd, by OpenWorks LLP et al.</line>
> + <line>Using Valgrind-X.Y.X and LibVEX; rerun with -h for copyright info</line>
> + <line>Command: ./tc06_two_races</line>
> +</preamble>
> +
> +<pid>...</pid>
> +<ppid>...</ppid>
> +<tool>helgrind</tool>
> +
> +<args>
> + <vargv>
> + <exe>...</exe>
> + <arg>--command-line-only=yes</arg>
> + <arg>--memcheck:leak-check=no</arg>
> + <arg>--tool=helgrind</arg>
> + <arg>--read-var-info=yes</arg>
> + <arg>--xml=yes</arg>
> + <arg>--xml-fd=2</arg>
> + <arg>--log-file=/dev/null</arg>
> + </vargv>
> + <argv>
> + <exe>...</exe>
> + </argv>
> +</args>
> +
> +<status>
> + <state>RUNNING</state>
> + <time>...</time>
> +</status>
> +
> +<announcethread>
> + <hthreadid>1</hthreadid>
> + <isrootthread></isrootthread>
> +</announcethread>
> +
> +<announcethread>
> + <hthreadid>2</hthreadid>
> + <stack>
> + <frame>...</frame>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>pthread_create@*</fn>
> + <dir>...</dir>
> + <file>hg_intercepts.c</file>
> + <line>...</line>
> + </frame>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>main</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>26</line>
> + </frame>
> + </stack>
> +</announcethread>
> +
> +<error>
> + <unique>...</unique>
> + <tid>...</tid>
> + <kind>Race</kind>
> + <xwhat>
> + <text>Possible data race during read of size 4 at 0x........ by thread #x</text>
> + <hthreadid>1</hthreadid>
> + </xwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>main</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>31</line>
> + </frame>
> + </stack>
> + <xauxwhat>
> + <text>This conflicts with a previous write of size 4 by thread #x</text>
> + <hthreadid>2</hthreadid>
> + </xauxwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>child_fn</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>14</line>
> + </frame>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>mythread_wrapper</fn>
> + <dir>...</dir>
> + <file>hg_intercepts.c</file>
> + <line>...</line>
> + </frame>
> + <frame>...</frame>
> + </stack>
> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat>
> +</error>
> +
> +<error>
> + <unique>...</unique>
> + <tid>...</tid>
> + <kind>Race</kind>
> + <xwhat>
> + <text>Possible data race during write of size 4 at 0x........ by thread #x</text>
> + <hthreadid>1</hthreadid>
> + </xwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>main</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>31</line>
> + </frame>
> + </stack>
> + <xauxwhat>
> + <text>This conflicts with a previous write of size 4 by thread #x</text>
> + <hthreadid>2</hthreadid>
> + </xauxwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>child_fn</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>14</line>
> + </frame>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>mythread_wrapper</fn>
> + <dir>...</dir>
> + <file>hg_intercepts.c</file>
> + <line>...</line>
> + </frame>
> + <frame>...</frame>
> + </stack>
> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat>
> +</error>
> +
> +<error>
> + <unique>...</unique>
> + <tid>...</tid>
> + <kind>Race</kind>
> + <xwhat>
> + <text>Possible data race during read of size 4 at 0x........ by thread #x</text>
> + <hthreadid>1</hthreadid>
> + </xwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>main</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>35</line>
> + </frame>
> + </stack>
> + <xauxwhat>
> + <text>This conflicts with a previous write of size 4 by thread #x</text>
> + <hthreadid>2</hthreadid>
> + </xauxwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>child_fn</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>18</line>
> + </frame>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>mythread_wrapper</fn>
> + <dir>...</dir>
> + <file>hg_intercepts.c</file>
> + <line>...</line>
> + </frame>
> + <frame>...</frame>
> + </stack>
> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat>
> +</error>
> +
> +<error>
> + <unique>...</unique>
> + <tid>...</tid>
> + <kind>Race</kind>
> + <xwhat>
> + <text>Possible data race during write of size 4 at 0x........ by thread #x</text>
> + <hthreadid>1</hthreadid>
> + </xwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>main</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>35</line>
> + </frame>
> + </stack>
> + <xauxwhat>
> + <text>This conflicts with a previous write of size 4 by thread #x</text>
> + <hthreadid>2</hthreadid>
> + </xauxwhat>
> + <stack>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>child_fn</fn>
> + <dir>...</dir>
> + <file>tc06_two_races.c</file>
> + <line>18</line>
> + </frame>
> + <frame>
> + <ip>0x........</ip>
> + <obj>...</obj>
> + <fn>mythread_wrapper</fn>
> + <dir>...</dir>
> + <file>hg_intercepts.c</file>
> + <line>...</line>
> + </frame>
> + <frame>...</frame>
> + </stack>
> + <auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
> + <xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>9</line> </xauxwhat>
> +</error>
> +
> +
> +<status>
> + <state>FINISHED</state>
> + <time>...</time>
> +</status>
> +
> +<errorcounts>...</errorcounts>
> +
> +<suppcounts>...</suppcounts>
> +
> +</valgrindoutput>
> +
>
|