You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(17) |
2
(14) |
3
(15) |
4
(30) |
5
(18) |
6
(12) |
7
(10) |
|
8
(11) |
9
(11) |
10
(14) |
11
(12) |
12
(12) |
13
(8) |
14
(5) |
|
15
(11) |
16
(19) |
17
(15) |
18
(15) |
19
(16) |
20
(9) |
21
(9) |
|
22
(12) |
23
(11) |
24
(10) |
25
(5) |
26
(11) |
27
(12) |
28
(20) |
|
29
(11) |
30
(21) |
|
|
|
|
|
|
From: <sv...@va...> - 2008-06-28 16:55:33
|
Author: bart
Date: 2008-06-28 17:55:35 +0100 (Sat, 28 Jun 2008)
New Revision: 8304
Log:
Modified code such that concurrent pthread_cond_wait() and pthread_destroy() calls do no longer trigger an assertion failure in DRD.
Modified:
trunk/exp-drd/drd_cond.c
Modified: trunk/exp-drd/drd_cond.c
===================================================================
--- trunk/exp-drd/drd_cond.c 2008-06-28 16:47:22 UTC (rev 8303)
+++ trunk/exp-drd/drd_cond.c 2008-06-28 16:55:35 UTC (rev 8304)
@@ -252,16 +252,19 @@
}
p = cond_get(cond);
- // To do: print a proper error message if the assert below fails.
- tl_assert(p);
- // To do: print a proper error message if the assert below fails.
- tl_assert(p->waiter_count > 0);
- tl_assert(p->mutex);
- if (--p->waiter_count == 0)
+ if (p)
{
- p->mutex = 0;
+ if (p->waiter_count > 0)
+ {
+ --p->waiter_count;
+ if (p->waiter_count == 0)
+ {
+ p->mutex = 0;
+ }
+ }
+ return p->waiter_count;
}
- return p->waiter_count;
+ return 0;
}
static void cond_signal(Addr const cond)
|
|
From: <sv...@va...> - 2008-06-28 16:47:20
|
Author: bart
Date: 2008-06-28 17:47:22 +0100 (Sat, 28 Jun 2008)
New Revision: 8303
Log:
Continued working on the DRD documentation.
Modified:
trunk/exp-drd/docs/drd-manual.xml
Modified: trunk/exp-drd/docs/drd-manual.xml
===================================================================
--- trunk/exp-drd/docs/drd-manual.xml 2008-06-28 16:42:16 UTC (rev 8302)
+++ trunk/exp-drd/docs/drd-manual.xml 2008-06-28 16:47:22 UTC (rev 8303)
@@ -325,6 +325,29 @@
</varlistentry>
<varlistentry>
<term>
+ <option>
+ <![CDATA[--report-signal-unlocked=<yes|no> [default: yes]]]>
+ </option>
+ </term>
+ <listitem>
+ <para>
+ Whether to report calls to
+ <function>pthread_cond_signal()</function> and
+ <function>pthread_cond_broadcast()</function>where the mutex
+ associated with the signal via
+ <function>pthread_cond_wait()</function> or
+ <function>pthread_cond_timed_wait()</function>is not locked at
+ the time the signal is sent. Sending a signal without holding
+ a lock on the associated mutex is a common programming error
+ which can cause subtle race conditions and unpredictable
+ behavior. There exist some uncommon synchronization patterns
+ however where it is safe to send a signal without holding a
+ lock on the associated mutex.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
<option><![CDATA[--segment-merging=<yes|no> [default: yes]]]></option>
</term>
<listitem>
@@ -482,16 +505,306 @@
<sect2 id="drd-manual.data-races" xreflabel="Data Races">
<title>Data Races</title>
+
+<para>
+DRD prints a message every time it detects a data race. You should be
+aware of the following when interpreting DRD's output:
+<itemizedlist>
+ <listitem>
+ <para>
+ Every thread is assigned two <emphasis>thread ID's</emphasis>:
+ one thread ID is assigned by the Valgrind core and one thread ID
+ is assigned by DRD. Both thread ID's start at one. Valgrind
+ thread ID's are reused when one thread finishes and another
+ thread is created. DRD does not reuse thread ID's. Thread ID's
+ are displayed e.g. as follows: 2/3, where the first number is
+ Valgrind's thread ID and the second number is the thread ID
+ assigned by DRD.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The term <emphasis>segment</emphasis> refers to a consecutive
+ sequence of load, store and synchronization operations, all
+ issued by the same thread. A segment always starts and ends at a
+ synchronization operation. Data race analysis is performed
+ between segments instead of between individual load and store
+ operations because of performance reasons.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ There are always at least two memory accesses involved in a data
+ race. Memory accesses involved in a data race are called
+ <emphasis>conflicting memory accesses</emphasis>. DRD prints a
+ report for each memory access that conflicts with a past memory
+ access.
+ </para>
+ </listitem>
+</itemizedlist>
+</para>
+
+<para>
+Below you can find an example of a message printed by DRD when it
+detects a data race:
+</para>
+<programlisting><![CDATA[
+$ valgrind --tool=exp-drd --var-info=yes exp-drd/tests/rwlock_race
+...
+==9466== Thread 3:
+==9466== Conflicting load by thread 3/3 at 0x006020b8 size 4
+==9466== at 0x400B6C: thread_func (rwlock_race.c:29)
+==9466== by 0x4C291DF: vg_thread_wrapper (drd_pthread_intercepts.c:186)
+==9466== by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so)
+==9466== by 0x53250CC: clone (in /lib64/libc-2.8.so)
+==9466== Location 0x6020b8 is 0 bytes inside local var "s_racy"
+==9466== declared at rwlock_race.c:18, in frame #0 of thread 3
+==9466== Other segment start (thread 2/2)
+==9466== at 0x4C2847D: pthread_rwlock_rdlock* (drd_pthread_intercepts.c:813)
+==9466== by 0x400B6B: thread_func (rwlock_race.c:28)
+==9466== by 0x4C291DF: vg_thread_wrapper (drd_pthread_intercepts.c:186)
+==9466== by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so)
+==9466== by 0x53250CC: clone (in /lib64/libc-2.8.so)
+==9466== Other segment end (thread 2/2)
+==9466== at 0x4C28B54: pthread_rwlock_unlock* (drd_pthread_intercepts.c:912)
+==9466== by 0x400B84: thread_func (rwlock_race.c:30)
+==9466== by 0x4C291DF: vg_thread_wrapper (drd_pthread_intercepts.c:186)
+==9466== by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so)
+==9466== by 0x53250CC: clone (in /lib64/libc-2.8.so)
+...
+]]></programlisting>
+
+<para>
+The above report has the following meaning:
+<itemizedlist>
+ <listitem>
+ <para>
+ The number in the column on the left is the process ID of the
+ process being analyzed by DRD.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The first line ("Thread 3") tells you Valgrind's thread ID for
+ the thread in which context the data race was detected.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The next line tells which kind of operation was performed (load
+ or store) and by which thread. Both Valgrind's and DRD's thread
+ ID's are displayed. On the same line the start address and the
+ number of bytes involved in the conflicting access are also
+ displayed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Next, the call stack of the conflicting access is displayed. If
+ your program has been compiled with debug information (-g), this
+ call stack will include file names and line numbers. The two
+ bottommost frames in this call stack (<function>clone</function>
+ and <function>start_thread</function>) show how the NPTL starts a
+ thread. The third frame (<function>vg_thread_wrapper</function>)
+ is added by DRD. The fourth frame
+ (<function>thread_func</function>) is interesting because it
+ shows the thread entry point, that is the function that has been
+ passed as the third argument to
+ <function>pthread_create()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Next, the allocation context for the conflicting address is
+ displayed. For static and stack variables the allocation context
+ is only shown when the option
+ <computeroutput>--var-info=yes</computeroutput> has been
+ specified. Otherwise DRD will print <computeroutput>Allocation
+ context: unknown</computeroutput> for such variables.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A conflicting access involves at least two memory accesses. For
+ one of these accesses an exact call stack is displayed, and for
+ the other accesses an approximate call stack is displayed,
+ namely the start and the end of the segments of the other
+ accesses. This information can be interpreted as follows:
+ <orderedlist>
+ <listitem>
+ <para>
+ Start at the bottom of both call stacks, and count the
+ number stack frames with identical function name, file
+ name and line number. In the above example the three
+ bottommost frames are identical
+ (<function>clone</function>,
+ <function>start_thread</function> and
+ <function>vg_thread_wrapper</function>).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The next higher stack frame in both call stacks now tells
+ you between in which source code region the other memory
+ access happened. The above output tells that the other
+ memory access involved in the data race happened between
+ source code lines 28 and 30 in file
+ <computeroutput>rwlock_race.c</computeroutput>.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </listitem>
+</itemizedlist>
+</para>
+
</sect2>
<sect2 id="drd-manual.lock-contention" xreflabel="Lock Contention">
<title>Lock Contention</title>
+
+<para>
+Threads should be able to make progress without being blocked by other
+threads. Unfortunately this is not always true. Sometimes a thread
+has to wait until a mutex or reader-writer lock is unlocked by another
+thread. This is called <emphasis>lock contention</emphasis>. The more
+granular the locks are, the less likely lock contention will
+occur. The most unfortunate situation occurs when I/O is performed
+while a lock is held.
+</para>
+
+<para>
+Lock contention causes delays and hence should be avoided. The two
+command line options
+<literal>--exclusive-threshold=<n></literal> and
+<literal>--shared-threshold=<n></literal> make it possible to
+detect lock contention by making DRD report any lock that is held
+longer than the specified threshold. An example:
+</para>
+<programlisting><![CDATA[
+$ valgrind --tool=exp-drd --exclusive-threshold=10 exp-drd/tests/hold_lock -i 500
+...
+==10668== Acquired at:
+==10668== at 0x4C267C8: pthread_mutex_lock (drd_pthread_intercepts.c:395)
+==10668== by 0x400D92: main (hold_lock.c:51)
+==10668== Lock on mutex 0x7fefffd50 was held during 503 ms (threshold: 10 ms).
+==10668== at 0x4C26ADA: pthread_mutex_unlock (drd_pthread_intercepts.c:441)
+==10668== by 0x400DB5: main (hold_lock.c:55)
+...
+]]></programlisting>
+
+<para>
+The <literal>hold_lock</literal> test program holds a lock as long as
+specified by the <literal>-i</literal> (interval) argument. The DRD
+output reports that the lock acquired at line 51 in source file
+<literal>hold_lock.c</literal> and released at line 55 was held during
+503 ms, while a threshold of 10 ms was specified to DRD.
+</para>
+
</sect2>
<sect2 id="drd-manual.api-checks" xreflabel="API Checks">
<title>Misuse of the POSIX threads API</title>
+
+<para>
+ DRD is able to detect and report the following misuses of the POSIX
+ threads API:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Passing the address of one type of synchronization object
+ (e.g. a mutex) to a POSIX API call that expects a pointer to
+ another type of synchronization object (e.g. a condition
+ variable).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Attempt to unlock a mutex that has not been locked.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Attempt to unlock a mutex that was locked by another thread.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Attempt to lock a mutex of type
+ <literal>PTHREAD_MUTEX_NORMAL</literal> or a spinlock
+ recursively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Destruction or deallocation of a locked mutex.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Sending a signal to a condition variable while no lock is held
+ on the mutex associated with the signal.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Calling <function>pthread_cond_wait()</function> with a mutex
+ that is not locked, that is locked by another thread or that
+ has been locked recursively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Associating two different mutexes with a condition variable
+ via <function>pthread_cond_wait()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Destruction or deallocation of a condition variable that is
+ being waited upon.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Destruction or deallocation of a locked reader-writer lock.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Attempt to unlock a reader-writer lock that was not locked by
+ the calling thread.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Attempt to recursively lock a reader-writer lock exclusively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Reinitialization of a mutex, condition variable, reader-writer
+ lock, semaphore or barrier.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Destruction or deallocation of a semaphore or barrier that is
+ being waited upon.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Exiting a thread without first unlocking the spinlocks,
+ mutexes or reader-writer locks that were locked by that
+ thread.
+ </para>
+ </listitem>
+ </itemizedlist>
+</para>
+
</sect2>
@@ -510,11 +823,6 @@
<title>Debugging OpenMP Programs With DRD</title>
<para>
-Just as for other Valgrind tools it is possible to pass information
-from a client program to the DRD tool.
-</para>
-
-<para>
For more information about OpenMP, see also
<ulink url="http://openmp.org/">openmp.org</ulink>.
</para>
|
|
From: <sv...@va...> - 2008-06-28 16:42:09
|
Author: bart
Date: 2008-06-28 17:42:16 +0100 (Sat, 28 Jun 2008)
New Revision: 8302
Log:
Bug fix: only complain about recursive locking before pthread_cond_wait() is called if the calling thread holds the lock.
Modified:
trunk/exp-drd/drd_cond.c
trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
Modified: trunk/exp-drd/drd_cond.c
===================================================================
--- trunk/exp-drd/drd_cond.c 2008-06-28 16:28:49 UTC (rev 8301)
+++ trunk/exp-drd/drd_cond.c 2008-06-28 16:42:16 UTC (rev 8302)
@@ -219,7 +219,7 @@
}
tl_assert(p->mutex);
q = mutex_get(p->mutex);
- if (q && q->recursion_count > 0)
+ if (q && q->owner == thread_get_running_tid() && q->recursion_count > 0)
{
const ThreadId vg_tid = VG_(get_running_tid)();
MutexErrInfo MEI = { q->a1, q->recursion_count, q->owner };
Modified: trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 16:28:49 UTC (rev 8301)
+++ trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 16:42:16 UTC (rev 8302)
@@ -53,10 +53,6 @@
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:78)
-Mutex locked recursively: mutex 0x........, recursion count 1, owner 2.
- at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:78)
-
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
@@ -77,4 +73,4 @@
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
-ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
|
|
From: <sv...@va...> - 2008-06-28 16:28:41
|
Author: bart
Date: 2008-06-28 17:28:49 +0100 (Sat, 28 Jun 2008)
New Revision: 8301
Log:
An error message is now printed if the mutex pointer passed to
pthread_cond_wait() does not point to a mutex object, and also if the
mutex pointer passed to pthread_cond_wait() points to a recursive mutex
that has been locked recursively.
Modified:
trunk/exp-drd/drd_cond.c
trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
Modified: trunk/exp-drd/drd_cond.c
===================================================================
--- trunk/exp-drd/drd_cond.c 2008-06-28 16:22:24 UTC (rev 8300)
+++ trunk/exp-drd/drd_cond.c 2008-06-28 16:28:49 UTC (rev 8301)
@@ -182,10 +182,13 @@
clientobj_remove(p->a1, ClientCondvar);
}
-/** Called before pthread_cond_wait(). */
+/** Called before pthread_cond_wait(). Note: before this function is called,
+ * mutex_unlock() has already been called from drd_clientreq.c.
+ */
int cond_pre_wait(const Addr cond, const Addr mutex)
{
struct cond_info* p;
+ struct mutex_info* q;
if (s_trace_cond)
{
@@ -214,6 +217,23 @@
" and mutex",
&cwei);
}
+ tl_assert(p->mutex);
+ q = mutex_get(p->mutex);
+ if (q && q->recursion_count > 0)
+ {
+ const ThreadId vg_tid = VG_(get_running_tid)();
+ MutexErrInfo MEI = { q->a1, q->recursion_count, q->owner };
+ VG_(maybe_record_error)(vg_tid,
+ MutexErr,
+ VG_(get_IP)(vg_tid),
+ "Mutex locked recursively",
+ &MEI);
+ }
+ else if (q == 0)
+ {
+ not_a_mutex(p->mutex);
+ }
+
return ++p->waiter_count;
}
Modified: trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 16:22:24 UTC (rev 8300)
+++ trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 16:28:49 UTC (rev 8301)
@@ -3,6 +3,10 @@
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
+The object at address 0x........ is not a mutex.
+ at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:69)
+
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
@@ -32,6 +36,10 @@
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:75)
+The object at address 0x........ is not a mutex.
+ at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:75)
+
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
@@ -45,6 +53,10 @@
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:78)
+Mutex locked recursively: mutex 0x........, recursion count 1, owner 2.
+ at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:78)
+
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
@@ -65,4 +77,4 @@
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
-ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 0 from 0)
|
|
From: <sv...@va...> - 2008-06-28 16:22:22
|
Author: bart
Date: 2008-06-28 17:22:24 +0100 (Sat, 28 Jun 2008)
New Revision: 8300
Log:
Changed function not_a_mutex() from static to extern.
Modified:
trunk/exp-drd/drd_mutex.c
trunk/exp-drd/drd_mutex.h
Modified: trunk/exp-drd/drd_mutex.c
===================================================================
--- trunk/exp-drd/drd_mutex.c 2008-06-28 16:06:01 UTC (rev 8299)
+++ trunk/exp-drd/drd_mutex.c 2008-06-28 16:22:24 UTC (rev 8300)
@@ -111,7 +111,7 @@
}
/** Let Valgrind report that there is no mutex object at address 'mutex'. */
-static void not_a_mutex(const Addr mutex)
+void not_a_mutex(const Addr mutex)
{
MutexErrInfo MEI = { mutex, -1, DRD_INVALID_THREADID };
VG_(maybe_record_error)(VG_(get_running_tid)(),
Modified: trunk/exp-drd/drd_mutex.h
===================================================================
--- trunk/exp-drd/drd_mutex.h 2008-06-28 16:06:01 UTC (rev 8299)
+++ trunk/exp-drd/drd_mutex.h 2008-06-28 16:22:24 UTC (rev 8300)
@@ -41,6 +41,7 @@
struct mutex_info* mutex_init(const Addr mutex,
const MutexT mutex_type);
void mutex_post_destroy(const Addr mutex);
+void not_a_mutex(const Addr mutex);
struct mutex_info* mutex_get(const Addr mutex);
void mutex_pre_lock(const Addr mutex, const MutexT mutex_type,
const Bool trylock);
|
|
From: <sv...@va...> - 2008-06-28 16:05:56
|
Author: bart Date: 2008-06-28 17:06:01 +0100 (Sat, 28 Jun 2008) New Revision: 8299 Log: Added comment. Modified: trunk/exp-drd/tests/pth_inconsistent_cond_wait.c Modified: trunk/exp-drd/tests/pth_inconsistent_cond_wait.c =================================================================== --- trunk/exp-drd/tests/pth_inconsistent_cond_wait.c 2008-06-28 16:01:43 UTC (rev 8298) +++ trunk/exp-drd/tests/pth_inconsistent_cond_wait.c 2008-06-28 16:06:01 UTC (rev 8299) @@ -1,3 +1,10 @@ +/** Trigger two kinds of errors: once that condition variable s_cond is + * associated with two different mutexes (s_mutex1 and s_mutex2), and two + * times that pthread_cond_signal() is called without that the mutex + * associated with the condition variable is locked. + */ + + #include <pthread.h> #include <semaphore.h> #include <unistd.h> |
|
From: <sv...@va...> - 2008-06-28 16:01:36
|
Author: bart
Date: 2008-06-28 17:01:43 +0100 (Sat, 28 Jun 2008)
New Revision: 8298
Log:
An error message is now printed if two different threads call
pthread_cond_*wait() on the same condition variable but with a different
mutex argument. Added regression test pth_inconsistent_cond_wait.
Added:
trunk/exp-drd/tests/pth_inconsistent_cond_wait.c
trunk/exp-drd/tests/pth_inconsistent_cond_wait.stderr.exp
trunk/exp-drd/tests/pth_inconsistent_cond_wait.vgtest
Modified:
trunk/exp-drd/drd_cond.c
trunk/exp-drd/drd_error.c
trunk/exp-drd/drd_error.h
trunk/exp-drd/tests/Makefile.am
Modified: trunk/exp-drd/drd_cond.c
===================================================================
--- trunk/exp-drd/drd_cond.c 2008-06-28 15:03:26 UTC (rev 8297)
+++ trunk/exp-drd/drd_cond.c 2008-06-28 16:01:43 UTC (rev 8298)
@@ -203,12 +203,16 @@
{
p->mutex = mutex;
}
- else
+ else if (p->mutex != mutex)
{
- // TO DO: print a proper error message if two different threads call
- // pthread_cond_*wait() on the same condition variable but with a different
- // mutex argument.
- tl_assert(p->mutex == mutex);
+ CondWaitErrInfo cwei
+ = { .cond = cond, .mutex1 = p->mutex, .mutex2 = mutex };
+ VG_(maybe_record_error)(VG_(get_running_tid)(),
+ CondWaitErr,
+ VG_(get_IP)(VG_(get_running_tid)()),
+ "Inconsistent association of condition variable"
+ " and mutex",
+ &cwei);
}
return ++p->waiter_count;
}
Modified: trunk/exp-drd/drd_error.c
===================================================================
--- trunk/exp-drd/drd_error.c 2008-06-28 15:03:26 UTC (rev 8297)
+++ trunk/exp-drd/drd_error.c 2008-06-28 16:01:43 UTC (rev 8298)
@@ -187,6 +187,17 @@
VG_(pp_ExeContext)(VG_(get_error_where)(e));
break;
}
+ case CondDestrErr: {
+ CondDestrErrInfo* cdi = (CondDestrErrInfo*)(VG_(get_error_extra)(e));
+ VG_(message)(Vg_UserMsg,
+ "%s: cond 0x%lx, mutex 0x%lx locked by thread %d/%d",
+ VG_(get_error_string)(e),
+ cdi->cond, cdi->mutex,
+ DrdThreadIdToVgThreadId(cdi->tid), cdi->tid);
+ VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ mutex_first_observed(cdi->mutex);
+ break;
+ }
case CondRaceErr: {
CondRaceErrInfo* cei = (CondRaceErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
@@ -198,15 +209,17 @@
mutex_first_observed(cei->mutex);
break;
}
- case CondDestrErr: {
- CondDestrErrInfo* cdi = (CondDestrErrInfo*)(VG_(get_error_extra)(e));
+ case CondWaitErr: {
+ CondWaitErrInfo* cwei = (CondWaitErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
- "%s: cond 0x%lx, mutex 0x%lx locked by thread %d/%d",
+ "%s: condition variable 0x%lx, mutexes 0x%lx and 0x%lx",
VG_(get_error_string)(e),
- cdi->cond, cdi->mutex,
- DrdThreadIdToVgThreadId(cdi->tid), cdi->tid);
+ cwei->cond,
+ cwei->mutex1,
+ cwei->mutex2);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- mutex_first_observed(cdi->mutex);
+ mutex_first_observed(cwei->mutex1);
+ mutex_first_observed(cwei->mutex2);
break;
}
case SemaphoreErr: {
@@ -279,10 +292,12 @@
return sizeof(MutexErrInfo);
case CondErr:
return sizeof(CondErrInfo);
+ case CondDestrErr:
+ return sizeof(CondDestrErrInfo);
case CondRaceErr:
return sizeof(CondRaceErrInfo);
- case CondDestrErr:
- return sizeof(CondDestrErrInfo);
+ case CondWaitErr:
+ return sizeof(CondWaitErrInfo);
case SemaphoreErr:
return sizeof(SemaphoreErrInfo);
case BarrierErr:
@@ -309,9 +324,11 @@
;
else if (VG_(strcmp)(name, STR_CondErr) == 0)
;
+ else if (VG_(strcmp)(name, STR_CondDestrErr) == 0)
+ ;
else if (VG_(strcmp)(name, STR_CondRaceErr) == 0)
;
- else if (VG_(strcmp)(name, STR_CondDestrErr) == 0)
+ else if (VG_(strcmp)(name, STR_CondWaitErr) == 0)
;
else if (VG_(strcmp)(name, STR_SemaphoreErr) == 0)
;
@@ -350,8 +367,9 @@
case DataRaceErr: return VGAPPEND(STR_, DataRaceErr);
case MutexErr: return VGAPPEND(STR_, MutexErr);
case CondErr: return VGAPPEND(STR_, CondErr);
+ case CondDestrErr: return VGAPPEND(STR_, CondDestrErr);
case CondRaceErr: return VGAPPEND(STR_, CondRaceErr);
- case CondDestrErr: return VGAPPEND(STR_, CondDestrErr);
+ case CondWaitErr: return VGAPPEND(STR_, CondWaitErr);
case SemaphoreErr: return VGAPPEND(STR_, SemaphoreErr);
case BarrierErr: return VGAPPEND(STR_, BarrierErr);
case RwlockErr: return VGAPPEND(STR_, RwlockErr);
Modified: trunk/exp-drd/drd_error.h
===================================================================
--- trunk/exp-drd/drd_error.h 2008-06-28 15:03:26 UTC (rev 8297)
+++ trunk/exp-drd/drd_error.h 2008-06-28 16:01:43 UTC (rev 8298)
@@ -43,20 +43,22 @@
MutexErr = 2,
#define STR_CondErr "CondErr"
CondErr = 3,
+#define STR_CondDestrErr "CondDestrErr"
+ CondDestrErr = 4,
#define STR_CondRaceErr "CondRaceErr"
- CondRaceErr = 4,
-#define STR_CondDestrErr "CondDestrErr"
- CondDestrErr = 5,
+ CondRaceErr = 5,
+#define STR_CondWaitErr "CondWaitErr"
+ CondWaitErr = 6,
#define STR_SemaphoreErr "SemaphoreErr"
- SemaphoreErr = 6,
+ SemaphoreErr = 7,
#define STR_BarrierErr "BarrierErr"
- BarrierErr = 7,
+ BarrierErr = 8,
#define STR_RwlockErr "RwlockErr"
- RwlockErr = 8,
+ RwlockErr = 9,
#define STR_HoldtimeErr "HoldtimeErr"
- HoldtimeErr = 9,
+ HoldtimeErr = 10,
#define STR_GenericErr "GenericErr"
- GenericErr = 10,
+ GenericErr = 11,
} DrdErrorKind;
/* The classification of a faulting address. */
@@ -106,15 +108,21 @@
} CondErrInfo;
typedef struct {
+ Addr cond;
+ Addr mutex;
+ DrdThreadId tid;
+} CondDestrErrInfo;
+
+typedef struct {
Addr cond;
Addr mutex;
} CondRaceErrInfo;
typedef struct {
- Addr cond;
- Addr mutex;
- DrdThreadId tid;
-} CondDestrErrInfo;
+ Addr cond;
+ Addr mutex1;
+ Addr mutex2;
+} CondWaitErrInfo;
typedef struct {
Addr semaphore;
Modified: trunk/exp-drd/tests/Makefile.am
===================================================================
--- trunk/exp-drd/tests/Makefile.am 2008-06-28 15:03:26 UTC (rev 8297)
+++ trunk/exp-drd/tests/Makefile.am 2008-06-28 16:01:43 UTC (rev 8298)
@@ -84,6 +84,8 @@
pth_detached_sem.stderr.exp \
pth_detached_sem.stdout.exp \
pth_detached_sem.vgtest \
+ pth_inconsistent_cond_wait.stderr.exp \
+ pth_inconsistent_cond_wait.vgtest \
recursive_mutex.stderr.exp \
recursive_mutex.stdout.exp \
recursive_mutex.vgtest \
@@ -184,6 +186,7 @@
pth_create_chain \
pth_detached \
pth_detached_sem \
+ pth_inconsistent_cond_wait \
recursive_mutex \
rwlock_race \
rwlock_test \
@@ -285,6 +288,9 @@
pth_detached_sem_SOURCES = pth_detached_sem.c
pth_detached_sem_LDADD = -lpthread
+pth_inconsistent_cond_wait_SOURCES = pth_inconsistent_cond_wait.c
+pth_inconsistent_cond_wait_LDADD = -lpthread
+
recursive_mutex_SOURCES = recursive_mutex.c
recursive_mutex_LDADD = -lpthread
Added: trunk/exp-drd/tests/pth_inconsistent_cond_wait.c
===================================================================
--- trunk/exp-drd/tests/pth_inconsistent_cond_wait.c (rev 0)
+++ trunk/exp-drd/tests/pth_inconsistent_cond_wait.c 2008-06-28 16:01:43 UTC (rev 8298)
@@ -0,0 +1,45 @@
+#include <pthread.h>
+#include <semaphore.h>
+#include <unistd.h>
+
+pthread_cond_t s_cond;
+pthread_mutex_t s_mutex1;
+pthread_mutex_t s_mutex2;
+sem_t s_sem;
+
+void* thread1(void* arg)
+{
+ pthread_mutex_lock(&s_mutex1);
+ sem_post(&s_sem);
+ pthread_cond_wait(&s_cond, &s_mutex1);
+ pthread_mutex_unlock(&s_mutex1);
+ return 0;
+}
+
+void* thread2(void* arg)
+{
+ pthread_mutex_lock(&s_mutex2);
+ sem_post(&s_sem);
+ pthread_cond_wait(&s_cond, &s_mutex2);
+ pthread_mutex_unlock(&s_mutex2);
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ pthread_t tid1;
+ pthread_t tid2;
+
+ sem_init(&s_sem, 0, 2);
+ pthread_cond_init(&s_cond, 0);
+ pthread_mutex_init(&s_mutex1, 0);
+ pthread_mutex_init(&s_mutex2, 0);
+ pthread_create(&tid1, 0, &thread1, 0);
+ pthread_create(&tid2, 0, &thread2, 0);
+ sem_wait(&s_sem);
+ pthread_cond_signal(&s_cond);
+ pthread_cond_signal(&s_cond);
+ pthread_join(tid1, 0);
+ pthread_join(tid2, 0);
+ return 0;
+}
Added: trunk/exp-drd/tests/pth_inconsistent_cond_wait.stderr.exp
===================================================================
--- trunk/exp-drd/tests/pth_inconsistent_cond_wait.stderr.exp (rev 0)
+++ trunk/exp-drd/tests/pth_inconsistent_cond_wait.stderr.exp 2008-06-28 16:01:43 UTC (rev 8298)
@@ -0,0 +1,31 @@
+
+Thread 3:
+Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........
+ at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
+ by 0x........: thread2 (pth_inconsistent_cond_wait.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+Mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+Mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+Thread 1:
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+Mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+Mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_inconsistent_cond_wait.c:?)
+
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Added: trunk/exp-drd/tests/pth_inconsistent_cond_wait.vgtest
===================================================================
--- trunk/exp-drd/tests/pth_inconsistent_cond_wait.vgtest (rev 0)
+++ trunk/exp-drd/tests/pth_inconsistent_cond_wait.vgtest 2008-06-28 16:01:43 UTC (rev 8298)
@@ -0,0 +1,2 @@
+prereq: ./supported_libpthread
+prog: pth_inconsistent_cond_wait
|
|
From: <sv...@va...> - 2008-06-28 15:03:22
|
Author: bart
Date: 2008-06-28 16:03:26 +0100 (Sat, 28 Jun 2008)
New Revision: 8297
Log:
Semaphore and barrier reinitialization are now reported.
Added:
trunk/exp-drd/tests/pth_barrier_reinit.c
Modified:
trunk/exp-drd/drd_barrier.c
trunk/exp-drd/drd_semaphore.c
trunk/exp-drd/tests/Makefile.am
trunk/exp-drd/tests/tc18_semabuse.stderr.exp
trunk/exp-drd/tests/tc20_verifywrap.stderr.exp
trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp
Modified: trunk/exp-drd/drd_barrier.c
===================================================================
--- trunk/exp-drd/drd_barrier.c 2008-06-28 13:40:41 UTC (rev 8296)
+++ trunk/exp-drd/drd_barrier.c 2008-06-28 15:03:26 UTC (rev 8297)
@@ -184,6 +184,19 @@
tl_assert(barrier_type == pthread_barrier || barrier_type == gomp_barrier);
+ if (! reinitialization && barrier_type == pthread_barrier)
+ {
+ p = barrier_get(barrier);
+ if (p)
+ {
+ BarrierErrInfo bei = { barrier };
+ VG_(maybe_record_error)(VG_(get_running_tid)(),
+ BarrierErr,
+ VG_(get_IP)(VG_(get_running_tid)()),
+ "Barrier reinitializatoin",
+ &bei);
+ }
+ }
p = barrier_get_or_allocate(barrier, barrier_type, count);
if (s_trace_barrier)
Modified: trunk/exp-drd/drd_semaphore.c
===================================================================
--- trunk/exp-drd/drd_semaphore.c 2008-06-28 13:40:41 UTC (rev 8296)
+++ trunk/exp-drd/drd_semaphore.c 2008-06-28 15:03:26 UTC (rev 8297)
@@ -123,11 +123,22 @@
thread_get_running_tid(),
semaphore);
}
- if (semaphore_get(semaphore))
+ p = semaphore_get(semaphore);
+ if (p)
{
- // To do: print an error message that a semaphore is being reinitialized.
+ const ThreadId vg_tid = VG_(get_running_tid)();
+ SemaphoreErrInfo SEI = { semaphore };
+ VG_(maybe_record_error)(vg_tid,
+ SemaphoreErr,
+ VG_(get_IP)(vg_tid),
+ "Semaphore reinitialization",
+ &SEI);
}
- p = semaphore_get_or_allocate(semaphore);
+ else
+ {
+ p = semaphore_get_or_allocate(semaphore);
+ }
+ tl_assert(p);
p->value = value;
return p;
}
Modified: trunk/exp-drd/tests/Makefile.am
===================================================================
--- trunk/exp-drd/tests/Makefile.am 2008-06-28 13:40:41 UTC (rev 8296)
+++ trunk/exp-drd/tests/Makefile.am 2008-06-28 15:03:26 UTC (rev 8297)
@@ -63,6 +63,8 @@
pth_barrier2.vgtest \
pth_barrier3.stderr.exp \
pth_barrier3.vgtest \
+ pth_barrier_reinit.stderr.exp \
+ pth_barrier_reinit.vgtest \
pth_broadcast.stderr.exp \
pth_broadcast.vgtest \
pth_cond_race.stderr.exp \
@@ -176,6 +178,7 @@
memory_allocation \
new_delete \
pth_barrier \
+ pth_barrier_reinit \
pth_broadcast \
pth_cond_race \
pth_create_chain \
@@ -264,6 +267,9 @@
pth_barrier_SOURCES = pth_barrier.c
pth_barrier_LDADD = -lpthread
+pth_barrier_reinit_SOURCES = pth_barrier_reinit.c
+pth_barrier_reinit_LDADD = -lpthread
+
pth_broadcast_SOURCES = pth_broadcast.c
pth_broadcast_LDADD = -lpthread
Added: trunk/exp-drd/tests/pth_barrier_reinit.c
===================================================================
--- trunk/exp-drd/tests/pth_barrier_reinit.c (rev 0)
+++ trunk/exp-drd/tests/pth_barrier_reinit.c 2008-06-28 15:03:26 UTC (rev 8297)
@@ -0,0 +1,9 @@
+#include <pthread.h>
+
+int main(int argc, char** argv)
+{
+ pthread_barrier_t b;
+ pthread_barrier_init(&b, 0, 1);
+ pthread_barrier_init(&b, 0, 1);
+ return 0;
+}
Modified: trunk/exp-drd/tests/tc18_semabuse.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc18_semabuse.stderr.exp 2008-06-28 13:40:41 UTC (rev 8296)
+++ trunk/exp-drd/tests/tc18_semabuse.stderr.exp 2008-06-28 15:03:26 UTC (rev 8297)
@@ -1,6 +1,10 @@
+Semaphore reinitialization: semaphore 0x........
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc18_semabuse.c:26)
+
Invalid semaphore: semaphore 0x........
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc18_semabuse.c:34)
-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Modified: trunk/exp-drd/tests/tc20_verifywrap.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc20_verifywrap.stderr.exp 2008-06-28 13:40:41 UTC (rev 8296)
+++ trunk/exp-drd/tests/tc20_verifywrap.stderr.exp 2008-06-28 15:03:26 UTC (rev 8297)
@@ -84,6 +84,10 @@
---------------- sem_* ----------------
+Semaphore reinitialization: semaphore 0x........
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:231)
+
FIXME: can't figure out how to verify wrap of sem_destroy
@@ -103,4 +107,4 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: main (tc20_verifywrap.c:262)
-ERROR SUMMARY: 15 errors from 15 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
Modified: trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp 2008-06-28 13:40:41 UTC (rev 8296)
+++ trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp 2008-06-28 15:03:26 UTC (rev 8297)
@@ -110,6 +110,10 @@
[1/1] semaphore_init 0x........
[1/1] semaphore_init 0x........
+Semaphore reinitialization: semaphore 0x........
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:231)
+
FIXME: can't figure out how to verify wrap of sem_destroy
[1/1] semaphore_pre_wait 0x........
@@ -183,4 +187,4 @@
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 1
[1/1] mutex_unlock recursive mutex 0x........ rc 1
-ERROR SUMMARY: 15 errors from 15 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
|
|
From: <sv...@va...> - 2008-06-28 13:40:33
|
Author: bart
Date: 2008-06-28 14:40:41 +0100 (Sat, 28 Jun 2008)
New Revision: 8296
Log:
DRD now prints where a mutex appeared for the first time in addition to
the mutex address when an error message is printed for condition
variables.
Modified:
trunk/exp-drd/drd_clientobj.h
trunk/exp-drd/drd_error.c
trunk/exp-drd/drd_mutex.c
trunk/exp-drd/drd_mutex.h
trunk/exp-drd/tests/pth_cond_race.stderr.exp
trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
Modified: trunk/exp-drd/drd_clientobj.h
===================================================================
--- trunk/exp-drd/drd_clientobj.h 2008-06-28 13:01:30 UTC (rev 8295)
+++ trunk/exp-drd/drd_clientobj.h 2008-06-28 13:40:41 UTC (rev 8296)
@@ -66,6 +66,7 @@
DrdThreadId owner; // owner if locked, last owner if free.
Segment* last_locked_segment;
ULong acquiry_time_ms;
+ ExeContext* first_observed_at;
ExeContext* acquired_at;
};
Modified: trunk/exp-drd/drd_error.c
===================================================================
--- trunk/exp-drd/drd_error.c 2008-06-28 13:01:30 UTC (rev 8295)
+++ trunk/exp-drd/drd_error.c 2008-06-28 13:40:41 UTC (rev 8296)
@@ -23,21 +23,22 @@
*/
+#include "drd_clientobj.h" /* struct mutex_info */
#include "drd_error.h"
#include "drd_malloc_wrappers.h"
-#include "drd_mutex.h" // struct mutex_info
-#include "drd_suppression.h" // drd_start_suppression()
-#include "pub_drd_bitmap.h" // LHS_W, ...
+#include "drd_mutex.h"
+#include "drd_suppression.h" /* drd_start_suppression() */
+#include "pub_drd_bitmap.h" /* LHS_W, ... */
#include "pub_tool_vki.h"
#include "pub_tool_basics.h"
-#include "pub_tool_libcassert.h" // tl_assert()
-#include "pub_tool_libcbase.h" // strlen()
-#include "pub_tool_libcfile.h" // VG_(get_startup_wd)()
-#include "pub_tool_libcprint.h" // VG_(printf)()
+#include "pub_tool_libcassert.h" /* tl_assert() */
+#include "pub_tool_libcbase.h" /* strlen() */
+#include "pub_tool_libcfile.h" /* VG_(get_startup_wd)() */
+#include "pub_tool_libcprint.h" /* VG_(printf)() */
#include "pub_tool_machine.h"
-#include "pub_tool_mallocfree.h" // VG_(malloc), VG_(free)
-#include "pub_tool_threadstate.h" // VG_(get_pthread_id)()
-#include "pub_tool_tooliface.h" // VG_(needs_tool_errors)()
+#include "pub_tool_mallocfree.h" /* VG_(malloc), VG_(free) */
+#include "pub_tool_threadstate.h" /* VG_(get_pthread_id)() */
+#include "pub_tool_tooliface.h" /* VG_(needs_tool_errors)() */
/* Local variables. */
@@ -50,8 +51,9 @@
s_drd_show_conflicting_segments = scs;
}
-/* Describe a data address range [a,a+len[ as good as possible, for error */
-/* messages, putting the result in ai. */
+/** Describe a data address range [a,a+len[ as good as possible, for error
+ * messages, putting the result in ai.
+ */
static
void describe_malloced_addr(Addr const a, SizeT const len, AddrInfo* const ai)
{
@@ -68,6 +70,24 @@
}
}
+/** Report where a mutex has been observed for the first time. The printed
+ * call stack will either refer to a pthread_mutex_init() or a
+ * pthread_mutex_lock() call.
+ */
+static void mutex_first_observed(const Addr mutex)
+{
+ struct mutex_info* mi;
+
+ mi = mutex_get(mutex);
+ if (mi)
+ {
+ tl_assert(mi->first_observed_at);
+ VG_(message)(Vg_UserMsg,
+ "Mutex 0x%lx was first observed at:", mutex);
+ VG_(pp_ExeContext)(mi->first_observed_at);
+ }
+}
+
static
void drd_report_data_race2(Error* const err, const DataRaceErrInfo* const dri)
{
@@ -171,10 +191,11 @@
CondRaceErrInfo* cei = (CondRaceErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
"Probably a race condition: condition variable 0x%lx has been"
- " signalled but the associated mutex 0x%lx is not locked"
- " by the signalling thread",
+ " signaled but the associated mutex 0x%lx is not locked"
+ " by the signalling thread.",
cei->cond, cei->mutex);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ mutex_first_observed(cei->mutex);
break;
}
case CondDestrErr: {
@@ -185,10 +206,11 @@
cdi->cond, cdi->mutex,
DrdThreadIdToVgThreadId(cdi->tid), cdi->tid);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ mutex_first_observed(cdi->mutex);
break;
}
case SemaphoreErr: {
- SemaphoreErrInfo* sei =(SemaphoreErrInfo*)(VG_(get_error_extra)(e));
+ SemaphoreErrInfo* sei = (SemaphoreErrInfo*)(VG_(get_error_extra)(e));
tl_assert(sei);
VG_(message)(Vg_UserMsg,
"%s: semaphore 0x%lx",
Modified: trunk/exp-drd/drd_mutex.c
===================================================================
--- trunk/exp-drd/drd_mutex.c 2008-06-28 13:01:30 UTC (rev 8295)
+++ trunk/exp-drd/drd_mutex.c 2008-06-28 13:40:41 UTC (rev 8296)
@@ -77,6 +77,7 @@
p->owner = DRD_INVALID_THREADID;
p->last_locked_segment = 0;
p->acquiry_time_ms = 0;
+ p->first_observed_at = VG_(record_ExeContext)(VG_(get_running_tid)(), 0);
p->acquired_at = 0;
}
@@ -109,6 +110,7 @@
p->last_locked_segment = 0;
}
+/** Let Valgrind report that there is no mutex object at address 'mutex'. */
static void not_a_mutex(const Addr mutex)
{
MutexErrInfo MEI = { mutex, -1, DRD_INVALID_THREADID };
Modified: trunk/exp-drd/drd_mutex.h
===================================================================
--- trunk/exp-drd/drd_mutex.h 2008-06-28 13:01:30 UTC (rev 8295)
+++ trunk/exp-drd/drd_mutex.h 2008-06-28 13:40:41 UTC (rev 8296)
@@ -23,9 +23,6 @@
*/
-// Mutex state information: owner thread and recursion count.
-
-
#ifndef __DRD_MUTEX_H
#define __DRD_MUTEX_H
Modified: trunk/exp-drd/tests/pth_cond_race.stderr.exp
===================================================================
--- trunk/exp-drd/tests/pth_cond_race.stderr.exp 2008-06-28 13:01:30 UTC (rev 8295)
+++ trunk/exp-drd/tests/pth_cond_race.stderr.exp 2008-06-28 13:40:41 UTC (rev 8296)
@@ -1,10 +1,13 @@
Thread 2:
-Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
by 0x........: thread_func (pth_cond_race.c:?)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
+Mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_cond_race.c:?)
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 13:01:30 UTC (rev 8295)
+++ trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 13:40:41 UTC (rev 8296)
@@ -4,7 +4,7 @@
by 0x........: main (tc23_bogus_condwait.c:69)
Thread 3:
-Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
by 0x........: rescue_me (tc23_bogus_condwait.c:20)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
@@ -17,12 +17,15 @@
by 0x........: main (tc23_bogus_condwait.c:72)
Thread 3:
-Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
by 0x........: rescue_me (tc23_bogus_condwait.c:24)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
+Mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:51)
Thread 1:
The object at address 0x........ is not a mutex.
@@ -30,7 +33,7 @@
by 0x........: main (tc23_bogus_condwait.c:75)
Thread 3:
-Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
by 0x........: rescue_me (tc23_bogus_condwait.c:28)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
@@ -43,12 +46,15 @@
by 0x........: main (tc23_bogus_condwait.c:78)
Thread 3:
-Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
by 0x........: rescue_me (tc23_bogus_condwait.c:32)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
+Mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:53)
The impossible happened: mutex 0x........ is locked simultaneously by two threads (recursion count 1, owners 2 and 1) !
Thread 2:
|
|
From: <sv...@va...> - 2008-06-28 13:01:23
|
Author: bart
Date: 2008-06-28 14:01:30 +0100 (Sat, 28 Jun 2008)
New Revision: 8295
Log:
Some time ago reporting sending POSIX signals where the mutex associated
with the signal via pthread_cond_wait()/pthread_cond_timedwait() was
disabled. Reenabled this report, made it configurable, and added a
regression test for the new command line option.
Added:
trunk/exp-drd/tests/pth_cond_race3.stderr.exp
trunk/exp-drd/tests/pth_cond_race3.vgtest
Modified:
trunk/exp-drd/drd_cond.c
trunk/exp-drd/drd_cond.h
trunk/exp-drd/drd_error.c
trunk/exp-drd/drd_main.c
trunk/exp-drd/tests/Makefile.am
trunk/exp-drd/tests/pth_cond_race.stderr.exp
trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
Modified: trunk/exp-drd/drd_cond.c
===================================================================
--- trunk/exp-drd/drd_cond.c 2008-06-28 11:53:01 UTC (rev 8294)
+++ trunk/exp-drd/drd_cond.c 2008-06-28 13:01:30 UTC (rev 8295)
@@ -28,25 +28,30 @@
#include "drd_error.h"
#include "drd_mutex.h"
#include "drd_suppression.h"
-#include "pub_tool_errormgr.h" // VG_(maybe_record_error)()
-#include "pub_tool_libcassert.h" // tl_assert()
-#include "pub_tool_libcprint.h" // VG_(printf)()
-#include "pub_tool_machine.h" // VG_(get_IP)()
-#include "pub_tool_options.h" // VG_(clo_backtrace_size)
-#include "pub_tool_threadstate.h" // VG_(get_running_tid)()
+#include "pub_tool_errormgr.h" /* VG_(maybe_record_error)() */
+#include "pub_tool_libcassert.h" /* tl_assert() */
+#include "pub_tool_libcprint.h" /* VG_(printf)() */
+#include "pub_tool_machine.h" /* VG_(get_IP)() */
+#include "pub_tool_options.h" /* VG_(clo_backtrace_size) */
+#include "pub_tool_threadstate.h" /* VG_(get_running_tid)() */
-// Local functions.
+/* Local functions. */
static void cond_cleanup(struct cond_info* p);
-// Local variables.
+/* Global variables. */
+Bool s_drd_report_signal_unlocked = True;
+
+
+/* Local variables. */
+
static Bool s_trace_cond;
-// Function definitions.
+/* Function definitions. */
void cond_set_trace(const Bool trace_cond)
{
@@ -243,11 +248,11 @@
if (cond_p && cond_p->waiter_count > 0)
{
- if (! mutex_is_locked_by(cond_p->mutex, drd_tid))
+ if (s_drd_report_signal_unlocked
+ && ! mutex_is_locked_by(cond_p->mutex, drd_tid))
{
/* A signal is sent while the associated mutex has not been locked. */
/* This can indicate but is not necessarily a race condition. */
-#if 0
CondRaceErrInfo cei;
cei.cond = cond;
cei.mutex = cond_p->mutex;
@@ -256,7 +261,6 @@
VG_(get_IP)(vg_tid),
"CondErr",
&cei);
-#endif
}
}
else
Modified: trunk/exp-drd/drd_cond.h
===================================================================
--- trunk/exp-drd/drd_cond.h 2008-06-28 11:53:01 UTC (rev 8294)
+++ trunk/exp-drd/drd_cond.h 2008-06-28 13:01:30 UTC (rev 8295)
@@ -23,21 +23,26 @@
*/
-// Condition variable state information: mutex specified in pthread_cond_wait()
-// call.
-
-
#ifndef __DRD_COND_H
#define __DRD_COND_H
-#include "drd_thread.h" // DrdThreadid
-#include "pub_tool_basics.h" // Addr
+#include "drd_thread.h" /* DrdThreadid */
+#include "pub_tool_basics.h" /* Addr */
+/* Forward declarations. */
+
struct cond_info;
+/* Global variables. */
+
+extern Bool s_drd_report_signal_unlocked;
+
+
+/* Function declarations. */
+
void cond_set_trace(const Bool trace_cond);
void cond_pre_init(const Addr cond);
void cond_post_destroy(const Addr cond);
Modified: trunk/exp-drd/drd_error.c
===================================================================
--- trunk/exp-drd/drd_error.c 2008-06-28 11:53:01 UTC (rev 8294)
+++ trunk/exp-drd/drd_error.c 2008-06-28 13:01:30 UTC (rev 8295)
@@ -170,7 +170,7 @@
case CondRaceErr: {
CondRaceErrInfo* cei = (CondRaceErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
- "Race condition: condition variable 0x%lx has been"
+ "Probably a race condition: condition variable 0x%lx has been"
" signalled but the associated mutex 0x%lx is not locked"
" by the signalling thread",
cei->cond, cei->mutex);
Modified: trunk/exp-drd/drd_main.c
===================================================================
--- trunk/exp-drd/drd_main.c 2008-06-28 11:53:01 UTC (rev 8294)
+++ trunk/exp-drd/drd_main.c 2008-06-28 13:01:30 UTC (rev 8295)
@@ -103,14 +103,15 @@
VG_BOOL_CLO (arg, "--check-stack-var", s_drd_check_stack_accesses)
else VG_BOOL_CLO(arg, "--drd-stats", s_drd_print_stats)
+ else VG_BOOL_CLO(arg,"--report-signal-unlocked",s_drd_report_signal_unlocked)
else VG_BOOL_CLO(arg, "--segment-merging", segment_merging)
else VG_BOOL_CLO(arg, "--show-confl-seg", show_confl_seg)
else VG_BOOL_CLO(arg, "--show-stack-usage", s_show_stack_usage)
else VG_BOOL_CLO(arg, "--trace-barrier", trace_barrier)
else VG_BOOL_CLO(arg, "--trace-clientobj", trace_clientobj)
else VG_BOOL_CLO(arg, "--trace-cond", trace_cond)
+ else VG_BOOL_CLO(arg, "--trace-conflict-set", trace_conflict_set)
else VG_BOOL_CLO(arg, "--trace-csw", trace_csw)
- else VG_BOOL_CLO(arg, "--trace-conflict-set", trace_conflict_set)
else VG_BOOL_CLO(arg, "--trace-fork-join", s_drd_trace_fork_join)
else VG_BOOL_CLO(arg, "--trace-mutex", trace_mutex)
else VG_BOOL_CLO(arg, "--trace-rwlock", trace_rwlock)
@@ -173,6 +174,10 @@
" stack variables [no].\n"
" --exclusive-threshold=<n> Print an error message if any mutex or\n"
" writer lock is held longer than the specified time (in milliseconds).\n"
+" --report-signal-unlocked=yes|no Whether to report calls to\n"
+" pthread_cond_signal() where the mutex associated\n"
+" with the signal via pthread_cond_wait() is not\n"
+" locked at the time the signal is sent [yes].\n"
" --segment-merging=yes|no Controls segment merging [yes].\n"
" Segment merging is an algorithm to limit memory usage of the\n"
" data race detection algorithm. Disabling segment merging may\n"
Modified: trunk/exp-drd/tests/Makefile.am
===================================================================
--- trunk/exp-drd/tests/Makefile.am 2008-06-28 11:53:01 UTC (rev 8294)
+++ trunk/exp-drd/tests/Makefile.am 2008-06-28 13:01:30 UTC (rev 8295)
@@ -69,6 +69,8 @@
pth_cond_race.vgtest \
pth_cond_race2.stderr.exp \
pth_cond_race2.vgtest \
+ pth_cond_race3.stderr.exp \
+ pth_cond_race3.vgtest \
pth_create_chain.stderr.exp \
pth_create_chain.vgtest \
pth_detached.stderr.exp \
Modified: trunk/exp-drd/tests/pth_cond_race.stderr.exp
===================================================================
--- trunk/exp-drd/tests/pth_cond_race.stderr.exp 2008-06-28 11:53:01 UTC (rev 8294)
+++ trunk/exp-drd/tests/pth_cond_race.stderr.exp 2008-06-28 13:01:30 UTC (rev 8295)
@@ -1,3 +1,10 @@
+Thread 2:
+Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: thread_func (pth_cond_race.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Added: trunk/exp-drd/tests/pth_cond_race3.stderr.exp
===================================================================
--- trunk/exp-drd/tests/pth_cond_race3.stderr.exp (rev 0)
+++ trunk/exp-drd/tests/pth_cond_race3.stderr.exp 2008-06-28 13:01:30 UTC (rev 8295)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Property changes on: trunk/exp-drd/tests/pth_cond_race3.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
+
Added: trunk/exp-drd/tests/pth_cond_race3.vgtest
===================================================================
--- trunk/exp-drd/tests/pth_cond_race3.vgtest (rev 0)
+++ trunk/exp-drd/tests/pth_cond_race3.vgtest 2008-06-28 13:01:30 UTC (rev 8295)
@@ -0,0 +1,3 @@
+prereq: ./supported_libpthread
+prog: pth_cond_race
+vgopts: --report-signal-unlocked=no
Property changes on: trunk/exp-drd/tests/pth_cond_race3.vgtest
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 11:53:01 UTC (rev 8294)
+++ trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-06-28 13:01:30 UTC (rev 8295)
@@ -3,17 +3,52 @@
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
+Thread 3:
+Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: rescue_me (tc23_bogus_condwait.c:20)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+
+Thread 1:
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:72)
+Thread 3:
+Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: rescue_me (tc23_bogus_condwait.c:24)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+
+Thread 1:
The object at address 0x........ is not a mutex.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:75)
+Thread 3:
+Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: rescue_me (tc23_bogus_condwait.c:28)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+
+Thread 1:
Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 2.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:78)
+
+Thread 3:
+Probably a race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
+ at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
+ by 0x........: rescue_me (tc23_bogus_condwait.c:32)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
The impossible happened: mutex 0x........ is locked simultaneously by two threads (recursion count 1, owners 2 and 1) !
Thread 2:
@@ -24,4 +59,4 @@
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
-ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
|
|
From: <sv...@va...> - 2008-06-28 11:52:54
|
Author: bart
Date: 2008-06-28 12:53:01 +0100 (Sat, 28 Jun 2008)
New Revision: 8294
Log:
Delayed thread termination such that the "other segment" information is included in the data race reports.
Modified:
trunk/exp-drd/tests/rwlock_race.c
trunk/exp-drd/tests/rwlock_race.stderr.exp
Modified: trunk/exp-drd/tests/rwlock_race.c
===================================================================
--- trunk/exp-drd/tests/rwlock_race.c 2008-06-28 10:00:37 UTC (rev 8293)
+++ trunk/exp-drd/tests/rwlock_race.c 2008-06-28 11:53:01 UTC (rev 8294)
@@ -8,19 +8,27 @@
#define _GNU_SOURCE 1
+#include <pthread.h>
#include <stdio.h>
-#include <pthread.h>
+#include <unistd.h>
#include "../drd_clientreq.h"
static pthread_rwlock_t s_rwlock;
static int s_racy;
-static void* thread(void* arg)
+static void sleep_ms(const int ms)
{
+ struct timespec delay = { ms / 1000, (ms % 1000) * 1000 * 1000 };
+ nanosleep(&delay, 0);
+}
+
+static void* thread_func(void* arg)
+{
pthread_rwlock_rdlock(&s_rwlock);
s_racy++;
pthread_rwlock_unlock(&s_rwlock);
+ sleep_ms(100);
return 0;
}
@@ -36,8 +44,8 @@
#endif
pthread_rwlock_init(&s_rwlock, 0);
- pthread_create(&thread1, 0, thread, 0);
- pthread_create(&thread2, 0, thread, 0);
+ pthread_create(&thread1, 0, thread_func, 0);
+ pthread_create(&thread2, 0, thread_func, 0);
pthread_join(thread1, 0);
pthread_join(thread2, 0);
pthread_rwlock_destroy(&s_rwlock);
Modified: trunk/exp-drd/tests/rwlock_race.stderr.exp
===================================================================
--- trunk/exp-drd/tests/rwlock_race.stderr.exp 2008-06-28 10:00:37 UTC (rev 8293)
+++ trunk/exp-drd/tests/rwlock_race.stderr.exp 2008-06-28 11:53:01 UTC (rev 8294)
@@ -1,28 +1,44 @@
-Thread 2:
-Conflicting load by thread 2/3 at 0x........ size 4
- at 0x........: thread (rwlock_race.c:?)
+Thread 3:
+Conflicting load by thread 3/3 at 0x........ size 4
+ at 0x........: thread_func (rwlock_race.c:?)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside local var "s_racy"
-declared at rwlock_race.c:17, in frame #? of thread 2
-Other segment start (thread 0/2)
- (thread finished, call stack no longer available)
-Other segment end (thread 0/2)
- (thread finished, call stack no longer available)
+declared at rwlock_race.c:18, in frame #? of thread 3
+Other segment start (thread 2/2)
+ at 0x........: pthread_rwlock_rdlock* (drd_pthread_intercepts.c:?)
+ by 0x........: thread_func (rwlock_race.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+Other segment end (thread 2/2)
+ at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
+ by 0x........: thread_func (rwlock_race.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
-Conflicting store by thread 2/3 at 0x........ size 4
- at 0x........: thread (rwlock_race.c:?)
+Conflicting store by thread 3/3 at 0x........ size 4
+ at 0x........: thread_func (rwlock_race.c:?)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside local var "s_racy"
-declared at rwlock_race.c:17, in frame #? of thread 2
-Other segment start (thread 0/2)
- (thread finished, call stack no longer available)
-Other segment end (thread 0/2)
- (thread finished, call stack no longer available)
+declared at rwlock_race.c:18, in frame #? of thread 3
+Other segment start (thread 2/2)
+ at 0x........: pthread_rwlock_rdlock* (drd_pthread_intercepts.c:?)
+ by 0x........: thread_func (rwlock_race.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
+Other segment end (thread 2/2)
+ at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
+ by 0x........: thread_func (rwlock_race.c:?)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
Result: 2
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
|
|
From: <sv...@va...> - 2008-06-28 10:00:31
|
Author: bart
Date: 2008-06-28 11:00:37 +0100 (Sat, 28 Jun 2008)
New Revision: 8293
Log:
Moved shell statements for building Firefox to a separate file.
Added:
trunk/exp-drd/scripts/download-and-build-firefox
Modified:
trunk/exp-drd/Testing.txt
Modified: trunk/exp-drd/Testing.txt
===================================================================
--- trunk/exp-drd/Testing.txt 2008-06-28 09:59:35 UTC (rev 8292)
+++ trunk/exp-drd/Testing.txt 2008-06-28 10:00:37 UTC (rev 8293)
@@ -20,47 +20,3 @@
5. Test DRD with Firefox. First of all, build and install Firefox 3. Next,
run the following command:
LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --trace-children=yes --tool=exp-drd $HOME/software/mozilla-build/dist/bin/firefox-bin
-
-
-
-
-
-
-The Firefox source code can be obtained here:
-ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${version}/source
-
-See also http://developer.mozilla.org/en/docs/Build_Documentation
-
-Firefox can be compiled via the following shell script:
-------------------------------------------------------------
-#!/bin/sh
-
-SRCDIR=$HOME/software
-SRC=$SRCDIR/mozilla
-BUILD=${SRC}-build
-PREFIX=$HOME/firefox3
-MOZCONFIG=$BUILD/mozconfig-firefox
-export MOZCONFIG
-
-rm -rf ${BUILD} || exit $?
-rm -rf ${PREFIX} || exit $?
-mkdir -p ${BUILD} || exit $?
-cd ${BUILD} || exit $?
-
-cat <<EOF >$MOZCONFIG
-. $SRC/browser/config/mozconfig
-mk_add_options MOZ_OBJDIR="$BUILD"
-ac_add_app_options browser --enable-application=browser
-ac_add_options --disable-optimize
-ac_add_options --disable-tests
-ac_add_options --enable-debug
-ac_add_options --enable-static
-ac_add_options --prefix $PREFIX
-ac_add_options --enable-optimize="-O1 -g -pipe"
-EOF
-
-${SRC}/configure
-
-make -s -j2 || exit $?
-# make -s install || exit $?
-------------------------------------------------------------
Added: trunk/exp-drd/scripts/download-and-build-firefox
===================================================================
--- trunk/exp-drd/scripts/download-and-build-firefox (rev 0)
+++ trunk/exp-drd/scripts/download-and-build-firefox 2008-06-28 10:00:37 UTC (rev 8293)
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# See also http://developer.mozilla.org/en/docs/Build_Documentation
+SRCURL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0/source"
+
+SRCDIR="$HOME/software"
+SRC="$SRCDIR/mozilla"
+DOWNLOADS="$SRCDIR/downloads"
+BUILD="${SRC}-build"
+TAR="firefox-3.0-source.tar.bz2"
+PREFIX="$HOME/firefox3"
+MOZCONFIG="$BUILD/mozconfig-firefox"
+export MOZCONFIG
+export LC_ALL=C
+export MAKEFLAGS="-j$(($(grep -c '^processor' /proc/cpuinfo) + 1))"
+
+if [ ! -e /usr/include/dbus-1.0/dbus/dbus-glib.h ]; then
+ echo "Please install the dbus-1-glib-devel package first."
+ exit 1
+fi
+
+if [ ! -e /usr/include/libIDL-2.0/libIDL/IDL.h ]; then
+ echo "Please install the libidl-devel package first."
+ exit 1
+fi
+
+rm -rf ${BUILD} || exit $?
+rm -rf ${PREFIX} || exit $?
+mkdir -p ${DOWNLOADS} || exit $?
+mkdir -p ${BUILD} || exit $?
+cd ${BUILD} || exit $?
+
+if [ ! -e $DOWNLOADS/$TAR ]; then
+ ( cd $DOWNLOADS && wget -q $SRCURL/$TAR )
+fi
+
+if [ ! -e $SRC ]; then
+ ( cd $SRCDIR && tar -xjf $DOWNLOADS/$TAR )
+fi
+
+cat <<EOF >$MOZCONFIG
+. $SRC/browser/config/mozconfig
+mk_add_options MOZ_OBJDIR="$BUILD"
+ac_add_app_options browser --enable-application=browser
+ac_add_options --disable-optimize
+ac_add_options --disable-tests
+ac_add_options --enable-debug
+ac_add_options --enable-static
+ac_add_options --prefix $PREFIX
+ac_add_options --enable-optimize="-O1 -g -pipe"
+EOF
+
+# Note: apparently Firefox 3.0 doesn't compile with gcc 4.3.
+CC=~/gcc-4.2.4/bin/gcc CXX=~/gcc-4.2.4/bin/g++ ${SRC}/configure
+
+make -s -j2 || exit $?
+# make -s install || exit $?
Property changes on: trunk/exp-drd/scripts/download-and-build-firefox
___________________________________________________________________
Name: svn:executable
+ *
|
|
From: <sv...@va...> - 2008-06-28 09:59:31
|
Author: bart
Date: 2008-06-28 10:59:35 +0100 (Sat, 28 Jun 2008)
New Revision: 8292
Log:
Swapped two mkdir statements.
Modified:
trunk/exp-drd/scripts/download-and-build-gcc
Modified: trunk/exp-drd/scripts/download-and-build-gcc
===================================================================
--- trunk/exp-drd/scripts/download-and-build-gcc 2008-06-28 07:19:56 UTC (rev 8291)
+++ trunk/exp-drd/scripts/download-and-build-gcc 2008-06-28 09:59:35 UTC (rev 8292)
@@ -29,8 +29,8 @@
rm -rf ${BUILD} || exit $?
rm -rf ${PREFIX} || exit $?
+mkdir -p ${DOWNLOADS} || exit $?
mkdir -p ${BUILD} || exit $?
-mkdir -p ${DOWNLOADS} || exit $?
cd ${BUILD} || exit $?
if [ ! -e $DOWNLOADS/$TAR ]; then
|
|
From: Bart V. A. <bar...@gm...> - 2008-06-28 07:36:11
|
Hello Julian,
While looking for documentation examples I noticed that in the
memcheck manual some occurrences of the names of memory allocation
functions (malloc/free/new/delete/...) were formatted
(<function>/</function>) and some not. Would it be a good idea to
format all occurrences of such names, as in the patch below ?
Bart.
Index: mc-manual.xml
===================================================================
--- mc-manual.xml (revision 8284)
+++ mc-manual.xml (working copy)
@@ -17,8 +17,9 @@
<para>Memcheck is Valgrind's heavyweight memory checking tool. All
reads and writes of memory are checked, and calls to
-malloc/new/free/delete are intercepted. As a result, Memcheck can detect
-the following problems:</para>
+<function>malloc</function>/<computeroutput>new</computeroutput>/<function>free</function>/<computeroutput>delete</computeroutput>
+are intercepted. As a result, Memcheck can detect the following
+problems:</para>
<itemizedlist>
<listitem>
@@ -38,8 +39,10 @@
lost forever</para>
</listitem>
<listitem>
- <para>Mismatched use of malloc/new/new [] vs
- free/delete/delete []</para>
+ <para>Mismatched use of
+ <function>malloc</function>/<computeroutput>new</computeroutput>/<computeroutput>new[]</computeroutput>
+ versus
+ <function>free</function>/<computeroutput>delete</computeroutput>/<computeroutput>delete[]</computeroutput></para>
</listitem>
<listitem>
<para>Overlapping <computeroutput>src</computeroutput> and
@@ -198,15 +201,16 @@
</term>
<listitem>
<para>When the client program releases memory using
- <function>free</function> (in <literal>C</literal>) or delete
+ <function>free</function> (in <literal>C</literal>) or
+ <computeroutput>delete</computeroutput>
(<literal>C++</literal>), that memory is not immediately made
available for re-allocation. Instead, it is marked inaccessible
- and placed in a queue of freed blocks. The purpose is to defer as
- long as possible the point at which freed-up memory comes back
- into circulation. This increases the chance that
+ and placed in a queue of freed blocks. The purpose is to defer
+ as long as possible the point at which freed-up memory comes
+ back into circulation. This increases the chance that
<constant>memcheck</constant> will be able to detect invalid
- accesses to blocks for some significant period of time after they
- have been freed.</para>
+ accesses to blocks for some significant period of time after
+ they have been freed.</para>
<para>This flag specifies the maximum total size, in bytes, of the
blocks in the queue. The default value is ten million bytes.
@@ -408,9 +412,10 @@
</listitem>
<listitem>
<para>The contents of malloc'd blocks, before you write something
- there. In C++, the new operator is a wrapper round malloc, so if
- you create an object with new, its fields will be uninitialised
- until you (or the constructor) fill them in.</para>
+ there. In C++, the new operator is a wrapper round
+ <function>malloc</function>, so if you create an object with new,
+ its fields will be uninitialised until you (or the constructor)
+ fill them in.</para>
</listitem>
</itemizedlist>
@@ -436,12 +441,14 @@
by 0x80484C7: main (tests/doublefree.c:10)
]]></programlisting>
-<para>Memcheck keeps track of the blocks allocated by your program with
-malloc/new, so it can know exactly whether or not the argument to
-free/delete is legitimate or not. Here, this test program has freed the
-same block twice. As with the illegal read/write errors, Memcheck
-attempts to make sense of the address free'd. If, as here, the address
-is one which has previously been freed, you wil be told that -- making
+<para>Memcheck keeps track of the blocks allocated by your program
+with <function>malloc</function>/<computeroutput>new</computeroutput>,
+so it can know exactly whether or not the argument to
+<function>free</function>/<computeroutput>delete</computeroutput> is
+legitimate or not. Here, this test program has freed the same block
+twice. As with the illegal read/write errors, Memcheck attempts to
+make sense of the address free'd. If, as here, the address is one
+which has previously been freed, you wil be told that -- making
duplicate frees of the same block easy to spot.</para>
</sect2>
@@ -627,8 +634,9 @@
<title>Memory leak detection</title>
<para>Memcheck keeps track of all memory blocks issued in response to
-calls to malloc/calloc/realloc/new. So when the program exits, it knows
-which blocks have not been freed.
+calls to
+<function>malloc</function>/<function>calloc</function>/<function>realloc</function>/<computeroutput>new</computeroutput>.
+So when the program exits, it knows which blocks have not been freed.
</para>
<para>If <option>--leak-check</option> is set appropriately, for each
@@ -944,10 +952,11 @@
</listitem>
<listitem>
- <para>When the program does malloc/new, the A bits for exactly the
- area allocated, and not a byte more, are marked as accessible. Upon
- freeing the area the A bits are changed to indicate
- inaccessibility.</para>
+ <para>When the program does
+ <function>malloc</function>/<computeroutput>new</computeroutput>,
+ the A bits for exactly the area allocated, and not a byte more,
+ are marked as accessible. Upon freeing the area the A bits are
+ changed to indicate inaccessibility.</para>
</listitem>
<listitem>
@@ -1055,43 +1064,53 @@
</itemizedlist>
-<para>Memcheck intercepts calls to malloc, calloc, realloc, valloc,
-memalign, free, new, new[], delete and delete[]. The behaviour you get
+<para>Memcheck intercepts calls to <function>malloc</function>,
+<function>calloc</function>, <function>realloc</function>,
+<function>valloc</function>, <function>memalign</function>,
+<function>free</function>, <computeroutput>new</computeroutput>,
+<computeroutput>new[]</computeroutput>,
+<computeroutput>delete</computeroutput> and
+<computeroutput>delete[]</computeroutput>. The behaviour you get
is:</para>
<itemizedlist>
<listitem>
- <para>malloc/new/new[]: the returned memory is marked as addressable
- but not having valid values. This means you have to write to it
- before you can read it.</para>
+ <para><function>malloc</function>/<function>new</function>/<computeroutput>new[]</computeroutput>:
+ the returned memory is marked as addressable but not having valid
+ values. This means you have to write to it before you can read
+ it.</para>
</listitem>
<listitem>
- <para>calloc: returned memory is marked both addressable and valid,
- since calloc clears the area to zero.</para>
+ <para><function>calloc</function>: returned memory is marked both
+ addressable and valid, since <function>calloc</function> clears
+ the area to zero.</para>
</listitem>
<listitem>
- <para>realloc: if the new size is larger than the old, the new
- section is addressable but invalid, as with malloc.</para>
+ <para><function>realloc</function>: if the new size is larger than
+ the old, the new section is addressable but invalid, as with
+ <function>malloc</function>.</para>
</listitem>
<listitem>
- <para>If the new size is smaller, the dropped-off section is marked
- as unaddressable. You may only pass to realloc a pointer previously
- issued to you by malloc/calloc/realloc.</para>
+ <para>If the new size is smaller, the dropped-off section is
+ marked as unaddressable. You may only pass to
+ <function>realloc</function> a pointer previously issued to you by
+ <function>malloc</function>/<function>calloc</function>/<function>realloc</function>.</para>
</listitem>
<listitem>
- <para>free/delete/delete[]: you may only pass to these functions a
- pointer previously issued to you by the corresponding allocation
- function. Otherwise, Memcheck complains. If the pointer is indeed
- valid, Memcheck marks the entire area it points at as unaddressable,
- and places the block in the freed-blocks-queue. The aim is to defer
- as long as possible reallocation of this block. Until that happens,
- all attempts to access it will elicit an invalid-address error, as
- you would hope.</para>
+ <para><function>free</function>/<computeroutput>delete</computeroutput>/<computeroutput>delete[]</computeroutput>:
+ you may only pass to these functions a pointer previously issued
+ to you by the corresponding allocation function. Otherwise,
+ Memcheck complains. If the pointer is indeed valid, Memcheck
+ marks the entire area it points at as unaddressable, and places
+ the block in the freed-blocks-queue. The aim is to defer as long
+ as possible reallocation of this block. Until that happens, all
+ attempts to access it will elicit an invalid-address error, as you
+ would hope.</para>
</listitem>
</itemizedlist>
@@ -1224,7 +1243,9 @@
</listitem>
<listitem>
<para>Typically the pool's chunks are drawn from a contiguous
- "superblock" acquired through the system malloc() or mmap().</para>
+ "superblock" acquired through the system
+ <function>malloc()</function> or
+ <function>mmap()</function>.</para>
</listitem>
</itemizedlist>
@@ -1358,22 +1379,23 @@
</listitem>
<listitem>
- <para><varname>VALGRIND_MOVE_MEMPOOL(poolA, poolB)</varname>:
- This request informs Memcheck that the pool previously anchored at
- address "poolA" has moved to anchor address "poolB". This is a rare
- request, typically only needed if you realloc() the header of
- a mempool.</para>
+ <para><varname>VALGRIND_MOVE_MEMPOOL(poolA, poolB)</varname>: This
+ request informs Memcheck that the pool previously anchored at
+ address "poolA" has moved to anchor address "poolB". This is a
+ rare request, typically only needed if you
+ <function>realloc()</function> the header of a mempool.</para>
<para>No memory-status bits are altered by this request.</para>
</listitem>
<listitem>
<para>
- <varname>VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size)</varname>:
- This request informs Memcheck that the chunk previously allocated at
- address "addrA" within "pool" has been moved and/or resized, and should
- be changed to cover the region [addrB,addrB+size). This is a rare
- request, typically only needed if you realloc() a superblock or wish
- to extend a chunk without changing its memory-status bits.
+ <varname>VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB,
+ size)</varname>: This request informs Memcheck that the chunk
+ previously allocated at address "addrA" within "pool" has been
+ moved and/or resized, and should be changed to cover the region
+ [addrB,addrB+size). This is a rare request, typically only needed
+ if you <function>realloc()</function> a superblock or wish to
+ extend a chunk without changing its memory-status bits.
</para>
<para>No memory-status bits are altered by this request.
</para>
|
|
From: <sv...@va...> - 2008-06-28 07:20:13
|
Author: bart
Date: 2008-06-28 08:19:56 +0100 (Sat, 28 Jun 2008)
New Revision: 8291
Log:
Renamed "danger set" into "conflict set".
Modified:
trunk/exp-drd/drd_main.c
trunk/exp-drd/drd_thread.c
trunk/exp-drd/drd_thread.h
trunk/exp-drd/drd_thread_bitmap.h
Modified: trunk/exp-drd/drd_main.c
===================================================================
--- trunk/exp-drd/drd_main.c 2008-06-27 19:25:35 UTC (rev 8290)
+++ trunk/exp-drd/drd_main.c 2008-06-28 07:19:56 UTC (rev 8291)
@@ -93,7 +93,7 @@
int trace_clientobj = -1;
int trace_cond = -1;
int trace_csw = -1;
- int trace_danger_set = -1;
+ int trace_conflict_set = -1;
int trace_mutex = -1;
int trace_rwlock = -1;
int trace_segment = -1;
@@ -110,7 +110,7 @@
else VG_BOOL_CLO(arg, "--trace-clientobj", trace_clientobj)
else VG_BOOL_CLO(arg, "--trace-cond", trace_cond)
else VG_BOOL_CLO(arg, "--trace-csw", trace_csw)
- else VG_BOOL_CLO(arg, "--trace-danger-set", trace_danger_set)
+ else VG_BOOL_CLO(arg, "--trace-conflict-set", trace_conflict_set)
else VG_BOOL_CLO(arg, "--trace-fork-join", s_drd_trace_fork_join)
else VG_BOOL_CLO(arg, "--trace-mutex", trace_mutex)
else VG_BOOL_CLO(arg, "--trace-rwlock", trace_rwlock)
@@ -150,8 +150,8 @@
cond_set_trace(trace_cond);
if (trace_csw != -1)
thread_trace_context_switches(trace_csw);
- if (trace_danger_set != -1)
- thread_trace_danger_set(trace_danger_set);
+ if (trace_conflict_set != -1)
+ thread_trace_conflict_set(trace_conflict_set);
if (trace_mutex != -1)
mutex_set_trace(trace_mutex);
if (trace_rwlock != -1)
@@ -207,7 +207,7 @@
" --drd-stats=yes|no Print statistics about DRD activity [no].\n"
" --trace-clientobj=yes|no Trace all client object activity [no].\n"
" --trace-csw=yes|no Trace all scheduler context switches [no].\n"
-" --trace-danger-set=yes|no Trace all danger set updates [no].\n"
+" --trace-conflict-set=yes|no Trace all conflict set updates [no].\n"
" --trace-segment=yes|no Trace segment actions [no].\n"
" --trace-suppr=yes|no Trace all address suppression actions [no].\n"
);
@@ -1155,23 +1155,23 @@
// thread_print_all();
if (VG_(clo_verbosity) > 1 || s_drd_print_stats)
{
- ULong update_danger_set_count;
+ ULong update_conflict_set_count;
ULong dsnsc;
ULong dscvc;
- update_danger_set_count
- = thread_get_update_danger_set_count(&dsnsc, &dscvc);
+ update_conflict_set_count
+ = thread_get_update_conflict_set_count(&dsnsc, &dscvc);
VG_(message)(Vg_UserMsg,
" thread: %lld context switches"
- " / %lld updates of the danger set",
+ " / %lld updates of the conflict set",
thread_get_context_switch_count(),
- update_danger_set_count);
+ update_conflict_set_count);
VG_(message)(Vg_UserMsg,
" (%lld new sg + %lld combine vc + %lld csw).",
dsnsc,
dscvc,
- update_danger_set_count - dsnsc - dscvc);
+ update_conflict_set_count - dsnsc - dscvc);
VG_(message)(Vg_UserMsg,
" segments: created %lld segments, max %lld alive,"
" %lld discard points.",
Modified: trunk/exp-drd/drd_thread.c
===================================================================
--- trunk/exp-drd/drd_thread.c 2008-06-27 19:25:35 UTC (rev 8290)
+++ trunk/exp-drd/drd_thread.c 2008-06-28 07:19:56 UTC (rev 8291)
@@ -46,26 +46,26 @@
static void thread_append_segment(const DrdThreadId tid,
Segment* const sg);
static void thread_discard_segment(const DrdThreadId tid, Segment* const sg);
-static Bool thread_danger_set_up_to_date(const DrdThreadId tid);
-static void thread_compute_danger_set(struct bitmap** danger_set,
- const DrdThreadId tid);
+static Bool thread_conflict_set_up_to_date(const DrdThreadId tid);
+static void thread_compute_conflict_set(struct bitmap** conflict_set,
+ const DrdThreadId tid);
// Local variables.
static ULong s_context_switch_count;
static ULong s_discard_ordered_segments_count;
-static ULong s_update_danger_set_count;
-static ULong s_danger_set_new_segment_count;
-static ULong s_danger_set_combine_vc_count;
-static ULong s_danger_set_bitmap_creation_count;
-static ULong s_danger_set_bitmap2_creation_count;
+static ULong s_update_conflict_set_count;
+static ULong s_conflict_set_new_segment_count;
+static ULong s_conflict_set_combine_vc_count;
+static ULong s_conflict_set_bitmap_creation_count;
+static ULong s_conflict_set_bitmap2_creation_count;
static ThreadId s_vg_running_tid = VG_INVALID_THREADID;
DrdThreadId s_drd_running_tid = DRD_INVALID_THREADID;
ThreadInfo s_threadinfo[DRD_N_THREADS];
-struct bitmap* s_danger_set;
+struct bitmap* s_conflict_set;
static Bool s_trace_context_switches = False;
-static Bool s_trace_danger_set = False;
+static Bool s_trace_conflict_set = False;
static Bool s_segment_merging = True;
@@ -76,9 +76,9 @@
s_trace_context_switches = t;
}
-void thread_trace_danger_set(const Bool t)
+void thread_trace_conflict_set(const Bool t)
{
- s_trace_danger_set = t;
+ s_trace_conflict_set = t;
}
void thread_set_segment_merging(const Bool m)
@@ -310,7 +310,7 @@
if (s_threadinfo[tid].detached_posix_thread)
{
/* Once a detached thread has finished, its stack is deallocated and */
- /* should no longer be taken into account when computing the danger set*/
+ /* should no longer be taken into account when computing the conflict set*/
s_threadinfo[tid].stack_min = s_threadinfo[tid].stack_max;
/* For a detached thread, calling pthread_exit() invalidates the */
@@ -386,7 +386,7 @@
}
s_vg_running_tid = vg_tid;
s_drd_running_tid = drd_tid;
- thread_compute_danger_set(&s_danger_set, drd_tid);
+ thread_compute_conflict_set(&s_conflict_set, drd_tid);
s_context_switch_count++;
}
@@ -604,7 +604,7 @@
/** Every change in the vector clock of a thread may cause segments that
* were previously ordered to this thread to become unordered. Hence,
- * it may be necessary to recalculate the danger set if the vector clock
+ * it may be necessary to recalculate the conflict set if the vector clock
* of the current thread is updated. This function check whether such a
* recalculation is necessary.
*
@@ -612,7 +612,7 @@
* appended.
* @param new_sg Pointer to the most recent segment of thread tid.
*/
-static Bool danger_set_update_needed(const DrdThreadId tid,
+static Bool conflict_set_update_needed(const DrdThreadId tid,
const Segment* const new_sg)
{
#if 0
@@ -622,11 +622,11 @@
tl_assert(new_sg);
/* If a new segment was added to another thread than the running thread, */
- /* just tell the caller to update the danger set. */
+ /* just tell the caller to update the conflict set. */
if (tid != s_drd_running_tid)
return True;
- /* Always let the caller update the danger set after creation of the */
+ /* Always let the caller update the conflict set after creation of the */
/* first segment. */
old_sg = new_sg->prev;
if (old_sg == 0)
@@ -648,13 +648,13 @@
break;
/* If the vector clock of the 2nd the last segment is not ordered */
/* to the vector clock of segment q, and the last segment is, ask */
- /* the caller to update the danger set. */
+ /* the caller to update the conflict set. */
if (! vc_lte(&old_sg->vc, &q->vc))
{
return True;
}
/* If the vector clock of the last segment is not ordered to the */
- /* vector clock of segment q, ask the caller to update the danger */
+ /* vector clock of segment q, ask the caller to update the conflict */
/* set. */
if (! vc_lte(&q->vc, &new_sg->vc) && ! vc_lte(&new_sg->vc, &q->vc))
{
@@ -682,14 +682,14 @@
new_sg = sg_new(tid, tid);
thread_append_segment(tid, new_sg);
- if (danger_set_update_needed(tid, new_sg))
+ if (conflict_set_update_needed(tid, new_sg))
{
- thread_compute_danger_set(&s_danger_set, s_drd_running_tid);
- s_danger_set_new_segment_count++;
+ thread_compute_conflict_set(&s_conflict_set, s_drd_running_tid);
+ s_conflict_set_new_segment_count++;
}
else if (tid == s_drd_running_tid)
{
- tl_assert(thread_danger_set_up_to_date(s_drd_running_tid));
+ tl_assert(thread_conflict_set_up_to_date(s_drd_running_tid));
}
thread_discard_ordered_segments();
@@ -713,7 +713,7 @@
if (joiner == s_drd_running_tid)
{
- thread_compute_danger_set(&s_danger_set, joiner);
+ thread_compute_conflict_set(&s_conflict_set, joiner);
}
}
@@ -728,9 +728,9 @@
tl_assert(s_threadinfo[tid].last);
tl_assert(vc);
vc_combine(&s_threadinfo[tid].last->vc, vc);
- thread_compute_danger_set(&s_danger_set, tid);
+ thread_compute_conflict_set(&s_conflict_set, tid);
thread_discard_ordered_segments();
- s_danger_set_combine_vc_count++;
+ s_conflict_set_combine_vc_count++;
}
/** Call this function whenever a thread is no longer using the memory
@@ -763,11 +763,11 @@
}
/* If any other thread had accessed memory in [ a1, a2 [, update the */
- /* danger set. */
+ /* conflict set. */
if (other_user != DRD_INVALID_THREADID
- && bm_has_any_access(s_danger_set, a1, a2))
+ && bm_has_any_access(s_conflict_set, a1, a2))
{
- thread_compute_danger_set(&s_danger_set, thread_get_running_tid());
+ thread_compute_conflict_set(&s_conflict_set, thread_get_running_tid());
}
}
@@ -901,34 +901,34 @@
}
}
-/** Verify whether the danger set for thread tid is up to date. Only perform
- * the check if the environment variable DRD_VERIFY_DANGER_SET has been set.
+/** Verify whether the conflict set for thread tid is up to date. Only perform
+ * the check if the environment variable DRD_VERIFY_CONFLICT_SET has been set.
*/
-static Bool thread_danger_set_up_to_date(const DrdThreadId tid)
+static Bool thread_conflict_set_up_to_date(const DrdThreadId tid)
{
- static int do_verify_danger_set = -1;
+ static int do_verify_conflict_set = -1;
Bool result;
- struct bitmap* computed_danger_set = 0;
+ struct bitmap* computed_conflict_set = 0;
- if (do_verify_danger_set < 0)
+ if (do_verify_conflict_set < 0)
{
- //VG_(message)(Vg_DebugMsg, "%s", VG_(getenv)("DRD_VERIFY_DANGER_SET"));
- do_verify_danger_set = VG_(getenv)("DRD_VERIFY_DANGER_SET") != 0;
+ //VG_(message)(Vg_DebugMsg, "%s", VG_(getenv)("DRD_VERIFY_CONFLICT_SET"));
+ do_verify_conflict_set = VG_(getenv)("DRD_VERIFY_CONFLICT_SET") != 0;
}
- if (do_verify_danger_set == 0)
+ if (do_verify_conflict_set == 0)
return True;
- thread_compute_danger_set(&computed_danger_set, tid);
- result = bm_equal(s_danger_set, computed_danger_set);
- bm_delete(computed_danger_set);
+ thread_compute_conflict_set(&computed_conflict_set, tid);
+ result = bm_equal(s_conflict_set, computed_conflict_set);
+ bm_delete(computed_conflict_set);
return result;
}
/** Compute a bitmap that represents the union of all memory accesses of all
* segments that are unordered to the current segment of the thread tid.
*/
-static void thread_compute_danger_set(struct bitmap** danger_set,
- const DrdThreadId tid)
+static void thread_compute_conflict_set(struct bitmap** conflict_set,
+ const DrdThreadId tid)
{
Segment* p;
@@ -936,22 +936,22 @@
&& tid != DRD_INVALID_THREADID);
tl_assert(tid == s_drd_running_tid);
- s_update_danger_set_count++;
- s_danger_set_bitmap_creation_count -= bm_get_bitmap_creation_count();
- s_danger_set_bitmap2_creation_count -= bm_get_bitmap2_creation_count();
+ s_update_conflict_set_count++;
+ s_conflict_set_bitmap_creation_count -= bm_get_bitmap_creation_count();
+ s_conflict_set_bitmap2_creation_count -= bm_get_bitmap2_creation_count();
- if (*danger_set)
+ if (*conflict_set)
{
- bm_delete(*danger_set);
+ bm_delete(*conflict_set);
}
- *danger_set = bm_new();
+ *conflict_set = bm_new();
- if (s_trace_danger_set)
+ if (s_trace_conflict_set)
{
char msg[256];
VG_(snprintf)(msg, sizeof(msg),
- "computing danger set for thread %d/%d with vc ",
+ "computing conflict set for thread %d/%d with vc ",
DrdThreadIdToVgThreadId(tid), tid);
vc_snprint(msg + VG_(strlen)(msg),
sizeof(msg) - VG_(strlen)(msg),
@@ -963,12 +963,12 @@
{
unsigned j;
- if (s_trace_danger_set)
+ if (s_trace_conflict_set)
{
char msg[256];
VG_(snprintf)(msg, sizeof(msg),
- "danger set: thread [%d] at vc ",
+ "conflict set: thread [%d] at vc ",
tid);
vc_snprint(msg + VG_(strlen)(msg),
sizeof(msg) - VG_(strlen)(msg),
@@ -985,25 +985,25 @@
{
if (! vc_lte(&q->vc, &p->vc) && ! vc_lte(&p->vc, &q->vc))
{
- if (s_trace_danger_set)
+ if (s_trace_conflict_set)
{
char msg[256];
VG_(snprintf)(msg, sizeof(msg),
- "danger set: [%d] merging segment ", j);
+ "conflict set: [%d] merging segment ", j);
vc_snprint(msg + VG_(strlen)(msg),
sizeof(msg) - VG_(strlen)(msg),
&q->vc);
VG_(message)(Vg_UserMsg, "%s", msg);
}
- bm_merge2(*danger_set, q->bm);
+ bm_merge2(*conflict_set, q->bm);
}
else
{
- if (s_trace_danger_set)
+ if (s_trace_conflict_set)
{
char msg[256];
VG_(snprintf)(msg, sizeof(msg),
- "danger set: [%d] ignoring segment ", j);
+ "conflict set: [%d] ignoring segment ", j);
vc_snprint(msg + VG_(strlen)(msg),
sizeof(msg) - VG_(strlen)(msg),
&q->vc);
@@ -1015,14 +1015,14 @@
}
}
- s_danger_set_bitmap_creation_count += bm_get_bitmap_creation_count();
- s_danger_set_bitmap2_creation_count += bm_get_bitmap2_creation_count();
+ s_conflict_set_bitmap_creation_count += bm_get_bitmap_creation_count();
+ s_conflict_set_bitmap2_creation_count += bm_get_bitmap2_creation_count();
- if (0 && s_trace_danger_set)
+ if (0 && s_trace_conflict_set)
{
- VG_(message)(Vg_UserMsg, "[%d] new danger set:", tid);
- bm_print(*danger_set);
- VG_(message)(Vg_UserMsg, "[%d] end of new danger set.", tid);
+ VG_(message)(Vg_UserMsg, "[%d] new conflict set:", tid);
+ bm_print(*conflict_set);
+ VG_(message)(Vg_UserMsg, "[%d] end of new conflict set.", tid);
}
}
@@ -1036,21 +1036,21 @@
return s_discard_ordered_segments_count;
}
-ULong thread_get_update_danger_set_count(ULong* dsnsc, ULong* dscvc)
+ULong thread_get_update_conflict_set_count(ULong* dsnsc, ULong* dscvc)
{
tl_assert(dsnsc);
tl_assert(dscvc);
- *dsnsc = s_danger_set_new_segment_count;
- *dscvc = s_danger_set_combine_vc_count;
- return s_update_danger_set_count;
+ *dsnsc = s_conflict_set_new_segment_count;
+ *dscvc = s_conflict_set_combine_vc_count;
+ return s_update_conflict_set_count;
}
-ULong thread_get_danger_set_bitmap_creation_count(void)
+ULong thread_get_conflict_set_bitmap_creation_count(void)
{
- return s_danger_set_bitmap_creation_count;
+ return s_conflict_set_bitmap_creation_count;
}
-ULong thread_get_danger_set_bitmap2_creation_count(void)
+ULong thread_get_conflict_set_bitmap2_creation_count(void)
{
- return s_danger_set_bitmap2_creation_count;
+ return s_conflict_set_bitmap2_creation_count;
}
Modified: trunk/exp-drd/drd_thread.h
===================================================================
--- trunk/exp-drd/drd_thread.h 2008-06-27 19:25:35 UTC (rev 8290)
+++ trunk/exp-drd/drd_thread.h 2008-06-28 07:19:56 UTC (rev 8291)
@@ -85,13 +85,13 @@
extern DrdThreadId s_drd_running_tid;
extern ThreadInfo s_threadinfo[DRD_N_THREADS];
-extern struct bitmap* s_danger_set;
+extern struct bitmap* s_conflict_set;
// Function declarations.
void thread_trace_context_switches(const Bool t);
-void thread_trace_danger_set(const Bool t);
+void thread_trace_conflict_set(const Bool t);
void thread_set_segment_merging(const Bool m);
DrdThreadId VgThreadIdToDrdThreadId(const ThreadId tid);
@@ -138,9 +138,9 @@
ULong thread_get_context_switch_count(void);
ULong thread_get_report_races_count(void);
ULong thread_get_discard_ordered_segments_count(void);
-ULong thread_get_update_danger_set_count(ULong* dsnsc, ULong* dscvc);
-ULong thread_get_danger_set_bitmap_creation_count(void);
-ULong thread_get_danger_set_bitmap2_creation_count(void);
+ULong thread_get_update_conflict_set_count(ULong* dsnsc, ULong* dscvc);
+ULong thread_get_conflict_set_bitmap_creation_count(void);
+ULong thread_get_conflict_set_bitmap2_creation_count(void);
static __inline__
@@ -160,9 +160,9 @@
}
static __inline__
-struct bitmap* thread_get_danger_set(void)
+struct bitmap* thread_get_conflict_set(void)
{
- return s_danger_set;
+ return s_conflict_set;
}
static __inline__
Modified: trunk/exp-drd/drd_thread_bitmap.h
===================================================================
--- trunk/exp-drd/drd_thread_bitmap.h 2008-06-27 19:25:35 UTC (rev 8290)
+++ trunk/exp-drd/drd_thread_bitmap.h 2008-06-28 07:19:56 UTC (rev 8291)
@@ -32,7 +32,7 @@
Bool bm_access_load_1_triggers_conflict(const Addr a1)
{
bm_access_load_1(running_thread_get_segment()->bm, a1);
- return bm_load_1_has_conflict_with(thread_get_danger_set(), a1);
+ return bm_load_1_has_conflict_with(thread_get_conflict_set(), a1);
}
static __inline__
@@ -41,12 +41,12 @@
if ((a1 & 1) == 0)
{
bm_access_aligned_load(running_thread_get_segment()->bm, a1, 2);
- return bm_aligned_load_has_conflict_with(thread_get_danger_set(), a1, 2);
+ return bm_aligned_load_has_conflict_with(thread_get_conflict_set(), a1, 2);
}
else
{
bm_access_range(running_thread_get_segment()->bm, a1, a1 + 2, eLoad);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 2, eLoad);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 2, eLoad);
}
}
@@ -56,12 +56,12 @@
if ((a1 & 3) == 0)
{
bm_access_aligned_load(running_thread_get_segment()->bm, a1, 4);
- return bm_aligned_load_has_conflict_with(thread_get_danger_set(), a1, 4);
+ return bm_aligned_load_has_conflict_with(thread_get_conflict_set(), a1, 4);
}
else
{
bm_access_range(running_thread_get_segment()->bm, a1, a1 + 4, eLoad);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 4, eLoad);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 4, eLoad);
}
}
@@ -71,18 +71,18 @@
if ((a1 & 7) == 0)
{
bm_access_aligned_load(running_thread_get_segment()->bm, a1, 8);
- return bm_aligned_load_has_conflict_with(thread_get_danger_set(), a1, 8);
+ return bm_aligned_load_has_conflict_with(thread_get_conflict_set(), a1, 8);
}
else if ((a1 & 3) == 0)
{
bm_access_aligned_load(running_thread_get_segment()->bm, a1 + 0, 4);
bm_access_aligned_load(running_thread_get_segment()->bm, a1 + 4, 4);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 8, eLoad);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 8, eLoad);
}
else
{
bm_access_range(running_thread_get_segment()->bm, a1, a1 + 8, eLoad);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 8, eLoad);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 8, eLoad);
}
}
@@ -90,14 +90,14 @@
Bool bm_access_load_triggers_conflict(const Addr a1, const Addr a2)
{
bm_access_range_load(running_thread_get_segment()->bm, a1, a2);
- return bm_load_has_conflict_with(thread_get_danger_set(), a1, a2);
+ return bm_load_has_conflict_with(thread_get_conflict_set(), a1, a2);
}
static __inline__
Bool bm_access_store_1_triggers_conflict(const Addr a1)
{
bm_access_store_1(running_thread_get_segment()->bm, a1);
- return bm_store_1_has_conflict_with(thread_get_danger_set(), a1);
+ return bm_store_1_has_conflict_with(thread_get_conflict_set(), a1);
}
static __inline__
@@ -106,12 +106,12 @@
if ((a1 & 1) == 0)
{
bm_access_aligned_store(running_thread_get_segment()->bm, a1, 2);
- return bm_aligned_store_has_conflict_with(thread_get_danger_set(), a1, 2);
+ return bm_aligned_store_has_conflict_with(thread_get_conflict_set(), a1, 2);
}
else
{
bm_access_range(running_thread_get_segment()->bm, a1, a1 + 2, eStore);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 2, eStore);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 2, eStore);
}
}
@@ -121,12 +121,12 @@
if ((a1 & 3) == 0)
{
bm_access_aligned_store(running_thread_get_segment()->bm, a1, 4);
- return bm_aligned_store_has_conflict_with(thread_get_danger_set(), a1, 4);
+ return bm_aligned_store_has_conflict_with(thread_get_conflict_set(), a1, 4);
}
else
{
bm_access_range(running_thread_get_segment()->bm, a1, a1 + 4, eStore);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 4, eStore);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 4, eStore);
}
}
@@ -136,18 +136,18 @@
if ((a1 & 7) == 0)
{
bm_access_aligned_store(running_thread_get_segment()->bm, a1, 8);
- return bm_aligned_store_has_conflict_with(thread_get_danger_set(), a1, 8);
+ return bm_aligned_store_has_conflict_with(thread_get_conflict_set(), a1, 8);
}
else if ((a1 & 3) == 0)
{
bm_access_aligned_store(running_thread_get_segment()->bm, a1 + 0, 4);
bm_access_aligned_store(running_thread_get_segment()->bm, a1 + 4, 4);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 8, eStore);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 8, eStore);
}
else
{
bm_access_range(running_thread_get_segment()->bm, a1, a1 + 8, eStore);
- return bm_has_conflict_with(thread_get_danger_set(), a1, a1 + 8, eStore);
+ return bm_has_conflict_with(thread_get_conflict_set(), a1, a1 + 8, eStore);
}
}
@@ -155,7 +155,7 @@
Bool bm_access_store_triggers_conflict(const Addr a1, const Addr a2)
{
bm_access_range_store(running_thread_get_segment()->bm, a1, a2);
- return bm_store_has_conflict_with(thread_get_danger_set(), a1, a2);
+ return bm_store_has_conflict_with(thread_get_conflict_set(), a1, a2);
}
#endif // __DRD_THREAD_BITMAP_H
|
|
From: Tom H. <th...@cy...> - 2008-06-28 02:57:26
|
Nightly build on aston ( x86_64, Fedora Core 5 ) started at 2008-06-28 03:20:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 438 tests, 8 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) none/tests/blockfault (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2008-06-28 02:53:08
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-06-28 03:05:13 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 432 tests, 5 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2008-06-28 02:41:54
|
Nightly build on trojan ( x86_64, Fedora Core 6 ) started at 2008-06-28 03:25:04 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 436 tests, 7 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/bug133694 (stdout) memcheck/tests/x86/bug133694 (stderr) memcheck/tests/x86/scalar (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 436 tests, 8 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/bug133694 (stdout) memcheck/tests/x86/bug133694 (stderr) memcheck/tests/x86/scalar (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap2 (stdout) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jun 28 03:33:35 2008 --- new.short Sat Jun 28 03:42:02 2008 *************** *** 8,10 **** ! == 436 tests, 8 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) --- 8,10 ---- ! == 436 tests, 7 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) *************** *** 18,20 **** none/tests/mremap2 (stdout) - helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc20_verifywrap (stderr) --- 18,19 ---- |
|
From: Tom H. <th...@cy...> - 2008-06-28 02:38:59
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2008-06-28 03:10:04 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 433 tests, 9 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/linux-timerfd-syscall (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/blockfault (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 433 tests, 8 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/linux-timerfd-syscall (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/blockfault (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jun 28 03:24:49 2008 --- new.short Sat Jun 28 03:39:06 2008 *************** *** 8,10 **** ! == 433 tests, 8 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) --- 8,10 ---- ! == 433 tests, 9 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) *************** *** 16,17 **** --- 16,18 ---- none/tests/mremap2 (stdout) + helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) |
|
From: Tom H. <th...@cy...> - 2008-06-28 02:33:38
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-06-28 03:00:13 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 438 tests, 31 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/file_locking (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/amd64/insn_ssse3 (stdout) none/tests/amd64/insn_ssse3 (stderr) none/tests/amd64/ssse3_misaligned (stderr) none/tests/blockfault (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap2 (stdout) none/tests/x86/insn_ssse3 (stdout) none/tests/x86/insn_ssse3 (stderr) none/tests/x86/ssse3_misaligned (stderr) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |