|
From: <sv...@va...> - 2011-12-11 10:23:08
|
Author: bart
Date: 2011-12-11 10:18:27 +0000 (Sun, 11 Dec 2011)
New Revision: 12286
Log:
Follow-up for r12281: update regtest expected output
Modified:
trunk/drd/tests/annotate_smart_pointer2.stderr.exp
trunk/drd/tests/annotate_trace_memory.stderr.exp
trunk/drd/tests/annotate_trace_memory_xml.stderr.exp
Modified: trunk/drd/tests/annotate_smart_pointer2.stderr.exp
===================================================================
--- trunk/drd/tests/annotate_smart_pointer2.stderr.exp 2011-12-10 19:48:04 UTC (rev 12285)
+++ trunk/drd/tests/annotate_smart_pointer2.stderr.exp 2011-12-11 10:18:27 UTC (rev 12286)
@@ -1,6 +1,9 @@
Conflicting store by thread x at 0x........ size 4
- at 0x........: main (annotate_smart_pointer.cpp:?)
+ at 0x........: counter::~counter() (annotate_smart_pointer.cpp:?)
+ by 0x........: smart_ptr<counter>::set(counter*, AtomicInt32*) (annotate_smart_pointer.cpp:?)
+ by 0x........: smart_ptr<counter>::operator=(counter*) (annotate_smart_pointer.cpp:?)
+ by 0x........: main (annotate_smart_pointer.cpp:?)
Address 0x........ is at offset ... from 0x......... Allocation context:
at 0x........: ...operator new... (vg_replace_malloc.c:...)
by 0x........: main (annotate_smart_pointer.cpp:?)
Modified: trunk/drd/tests/annotate_trace_memory.stderr.exp
===================================================================
--- trunk/drd/tests/annotate_trace_memory.stderr.exp 2011-12-10 19:48:04 UTC (rev 12285)
+++ trunk/drd/tests/annotate_trace_memory.stderr.exp 2011-12-11 10:18:27 UTC (rev 12286)
@@ -14,7 +14,7 @@
load 0x........ size 4 (thread x / vc ...)
at 0x........: test01::Run() (tsan_unittest.cpp:?)
- by 0x........: main (tsan_unittest.cpp:?)
+ by 0x........: Test::Run() (tsan_unittest.cpp:?)
GLOB=2
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/annotate_trace_memory_xml.stderr.exp
===================================================================
--- trunk/drd/tests/annotate_trace_memory_xml.stderr.exp 2011-12-10 19:48:04 UTC (rev 12285)
+++ trunk/drd/tests/annotate_trace_memory_xml.stderr.exp 2011-12-11 10:18:27 UTC (rev 12286)
@@ -110,7 +110,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>main</fn>
+ <fn>Test::Run()</fn>
<dir>...</dir>
<file>tsan_unittest.cpp</file>
<line>...</line>
|
|
From: Florian K. <br...@ac...> - 2011-12-11 14:28:44
|
Bart, thanks for the updates. You beat me. I just got up :) I noticed two other failures (ignoring the new std_thread testcase). Fedora 16: drd/pth_cleanup_handler @@ -1,6 +1,5 @@ Cleanup handler has been called. Cleanup handler has been called. -Test succeeded. ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Rich Coe's "ultra" build: drd/annotate_smart_pointer @@ -1,4 +1,16 @@ +Conflicting store by thread x at 0x........ size 8 + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) +Allocation context: unknown. + +Conflicting load by thread x at 0x........ size 8 + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) + by 0x........: U_AnnotateHappensBefore (unified_annotations.h:?) + by 0x........: smart_ptr<counter>::set(counter*, AtomicInt32*) (annotate_smart_pointer.cpp:?) + by 0x........: smart_ptr<counter>::operator=(counter*) (annotate_smart_pointer.cpp:?) + by 0x........: main (annotate_smart_pointer.cpp:?) +Allocation context: unknown. + Done. I looked at builds from previous nights and those testcases compared consistently.. Do these failures look legitimate to you? Florian |
|
From: Bart V. A. <bva...@ac...> - 2011-12-14 20:04:36
|
On Sun, Dec 11, 2011 at 3:28 PM, Florian Krohm <br...@ac...> wrote: > Rich Coe's "ultra" build: drd/annotate_smart_pointer > > @@ -1,4 +1,16 @@ > > +Conflicting store by thread x at 0x........ size 8 > + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) > +Allocation context: unknown. > + > +Conflicting load by thread x at 0x........ size 8 > + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) > + by 0x........: U_AnnotateHappensBefore (unified_annotations.h:?) > + by 0x........: smart_ptr<counter>::set(counter*, AtomicInt32*) > (annotate_smart_pointer.cpp:?) > + by 0x........: smart_ptr<counter>::operator=(counter*) > (annotate_smart_pointer.cpp:?) > + by 0x........: main (annotate_smart_pointer.cpp:?) > +Allocation context: unknown. > + > Done. > > I looked at builds from previous nights and those testcases compared > consistently. Do these failures look legitimate to you? > As far as I can see the above report refers to an internal variable in the dynamic linker that is necessary to look up the symbol _ZdlPv (operator delete(void*)), a function that is invoked for the first time when a smart_ptr<> object is deleted. But it's not clear to me why the call stacks printed by Valgrind's stack walking code aren't more helpful. Bart. |
|
From: Bart V. A. <bva...@ac...> - 2011-12-11 17:56:42
|
On Sun, Dec 11, 2011 at 3:28 PM, Florian Krohm <br...@ac...> wrote: > I noticed two other failures (ignoring the new std_thread testcase). > > Fedora 16: drd/pth_cleanup_handler > > @@ -1,6 +1,5 @@ > > Cleanup handler has been called. > Cleanup handler has been called. > -Test succeeded. > > ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Not sure what's going on here, but it's probably unrelated to the demangling changes. That test has already failed before these changes - see e.g. http://permalink.gmane.org/gmane.comp.debugging.valgrind.devel/14941. > Rich Coe's "ultra" build: drd/annotate_smart_pointer > > @@ -1,4 +1,16 @@ > > +Conflicting store by thread x at 0x........ size 8 > + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) > +Allocation context: unknown. > + > +Conflicting load by thread x at 0x........ size 8 > + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) > + by 0x........: U_AnnotateHappensBefore (unified_annotations.h:?) > + by 0x........: smart_ptr<counter>::set(counter*, AtomicInt32*) > (annotate_smart_pointer.cpp:?) > + by 0x........: smart_ptr<counter>::operator=(counter*) > (annotate_smart_pointer.cpp:?) > + by 0x........: main (annotate_smart_pointer.cpp:?) > +Allocation context: unknown. > + > Done. > > I looked at builds from previous nights and those testcases compared > consistently.. > Do these failures look legitimate to you? These failures should be analyzed further. The above failure looks strange to me: a race is reported on AnnotateCondVarSignal() while that function doesn't contain any store instructions. And since that function is not in a shared library, there is no GOT offset to be initialized. Did the compiler perhaps insert a store instruction ? The definition of that function is as follows: void __attribute__((weak,noinline)) AnnotateCondVarSignal(const char *file, int line, const volatile void *cv) { asm(""); } Bart. |
|
From: Bart V. A. <bva...@ac...> - 2011-12-13 19:48:31
|
(resending such that this message reaches the mailing list) On Sun, Dec 11, 2011 at 3:28 PM, Florian Krohm <br...@ac...> wrote: > I noticed two other failures (ignoring the new std_thread testcase). > > Fedora 16: drd/pth_cleanup_handler > > @@ -1,6 +1,5 @@ > > Cleanup handler has been called. > Cleanup handler has been called. > -Test succeeded. > > ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) > Maybe execution of the test program got delayed and maybe alarm(2) made it stop too early. Let's see whether r12301 helps. > Rich Coe's "ultra" build: drd/annotate_smart_pointer > > @@ -1,4 +1,16 @@ > > +Conflicting store by thread x at 0x........ size 8 > + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) > +Allocation context: unknown. > + > +Conflicting load by thread x at 0x........ size 8 > + at 0x........: AnnotateCondVarSignal (unified_annotations.h:?) > + by 0x........: U_AnnotateHappensBefore (unified_annotations.h:?) > + by 0x........: smart_ptr<counter>::set(counter*, AtomicInt32*) > (annotate_smart_pointer.cpp:?) > + by 0x........: smart_ptr<counter>::operator=(counter*) > (annotate_smart_pointer.cpp:?) > + by 0x........: main (annotate_smart_pointer.cpp:?) > +Allocation context: unknown. > + > Done. > > I looked at builds from previous nights and those testcases compared > consistently. Do these failures look legitimate to you? > It took some time but finally I have been able to reproduce this behavior. As you can see the address at which the conflict happens is not in any region allocated via malloc() or mmap(). I've also noticed that the probability that this occurs increases with the number of test iterations (argv[2]), which is suspicious. I've already encountered similar issues in the past caused by the NPTL reusing blocks of memory for different threads without intervening free() or VG_USERREQ__DRD_CLEAN_MEMORY. I'm afraid it's time again to delve in the NPTL implementation and to see how such false positives can be avoided. $ ./vg-in-place --trace-addr=0x7fefff8a0 --fair-sched=yes --tool=drd --read-var-info=yes --check-stack-var=yes --show-confl-seg=no drd/tests/annotate_smart_pointer 50 50 ==18170== drd, a thread error detector ==18170== Copyright (C) 2006-2011, and GNU GPL'd, by Bart Van Assche. ==18170== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info ==18170== Command: ./annotate_smart_pointer 50 50 ==18170== ==18170== start 0x7feffe000 size 12288 (thread 1 / vc [ 1: 1 ]) ==18170== at 0x0: ??? ==18170== end 0x7feffdf80 size 7328 (thread 1 / vc [ 1: 1 ]) ==18170== at 0x0: ??? ==18170== Conflicting store by thread 1 at 0x7fefff8a0 size 8 ==18170== at 0x400FCE: AnnotateCondVarSignal (unified_annotations.h:32) ==18170== Allocation context: unknown. ==18170== ==18170== Conflicting load by thread 1 at 0x7fefff8a0 size 8 ==18170== at 0x400FDD: AnnotateCondVarSignal (unified_annotations.h:34) ==18170== by 0x401071: U_AnnotateHappensBefore (unified_annotations.h:46) ==18170== by 0x4018DD: smart_ptr<counter>::set(counter*, AtomicInt32*) (annotate_smart_pointer.cpp:239) ==18170== by 0x401778: smart_ptr<counter>::operator=(counter*) (annotate_smart_pointer.cpp:208) ==18170== by 0x401377: main (annotate_smart_pointer.cpp:326) ==18170== Allocation context: unknown. ==18170== Done. ==18170== ==18170== For counts of detected and suppressed errors, rerun with: -v ==18170== ERROR SUMMARY: 16 errors from 2 contexts (suppressed: 20 from 20) Bart. |