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
(10) |
2
(8) |
3
(17) |
4
(28) |
5
(22) |
6
(8) |
|
7
(8) |
8
(22) |
9
(12) |
10
(17) |
11
(14) |
12
(15) |
13
(6) |
|
14
(9) |
15
(9) |
16
(16) |
17
(13) |
18
(18) |
19
(7) |
20
(5) |
|
21
(6) |
22
(5) |
23
(11) |
24
(5) |
25
(11) |
26
(7) |
27
(15) |
|
28
(11) |
29
(12) |
30
(12) |
31
(15) |
|
|
|
|
From: <sv...@va...> - 2007-10-31 20:20:07
|
Author: sewardj
Date: 2007-10-31 20:20:08 +0000 (Wed, 31 Oct 2007)
New Revision: 7067
Log:
Update expected output following r7066.
Modified:
branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-amd64
Modified: branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-amd64
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-amd64 2007-10-31 20:17:16 UTC (rev 7066)
+++ branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-amd64 2007-10-31 20:20:08 UTC (rev 7067)
@@ -4,17 +4,17 @@
by 0x........: ...
by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...)
by 0x........: pthread_create@* (tc_intercepts.c:...)
- by 0x........: main (tc21_pthonce.c:70)
+ by 0x........: main (tc21_pthonce.c:86)
Thread #3 was created
at 0x........: clone (in /...libc...)
by 0x........: ...
by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...)
by 0x........: pthread_create@* (tc_intercepts.c:...)
- by 0x........: main (tc21_pthonce.c:70)
+ by 0x........: main (tc21_pthonce.c:86)
Possible data race during write of size 4 at 0x........
- at 0x........: child (tc21_pthonce.c:58)
+ at 0x........: child (tc21_pthonce.c:74)
by 0x........: mythread_wrapper (tc_intercepts.c:...)
by 0x........: ...
by 0x........: ...
|
|
From: <sv...@va...> - 2007-10-31 20:17:16
|
Author: sewardj
Date: 2007-10-31 20:17:16 +0000 (Wed, 31 Oct 2007)
New Revision: 7066
Log:
Restrict this test to two threads in an attempt to make the output
more repeatable.
Modified:
branches/THRCHECK/thrcheck/tests/tc21_pthonce.c
branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86
branches/THRCHECK/thrcheck/tests/tc21_pthonce.stdout.exp
Modified: branches/THRCHECK/thrcheck/tests/tc21_pthonce.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc21_pthonce.c 2007-10-31 19:29:33 UTC (rev 7065)
+++ branches/THRCHECK/thrcheck/tests/tc21_pthonce.c 2007-10-31 20:17:16 UTC (rev 7066)
@@ -40,19 +40,35 @@
#include <pthread.h>
-#define NUM_THREADS 4
+/* With more than 2 threads, the precise error reports vary between
+ platforms, in terms of the number of races detected. Make life
+ simple and just have 2 threads and so just 1 race. */
+#define NUM_THREADS 2
static pthread_once_t welcome_once_block = PTHREAD_ONCE_INIT;
static int unprotected1 = 0;
static int unprotected2 = 0;
+/* This is a hack: delay threads except the first enough so as to
+ ensure threads[0] gets to the pthread_once call first. This is so
+ as to ensure that this test produces results which aren't
+ scheduling sensitive. (sigh) */
+void maybe_stall ( int myid )
+{
+ assert(myid >= 0 && myid < NUM_THREADS);
+ if (myid > 0)
+ sleep(1);
+}
+
void welcome(void) {
printf("welcome: Welcome\n");
unprotected1++; /* this is harmless */
}
-void maybe_stall ( int myid );
-void* child ( void* argV ) { int r; maybe_stall( *(int*)argV );
+
+void* child ( void* argV ) {
+ int r;
+ maybe_stall( *(int*)argV );
r= pthread_once(&welcome_once_block, welcome); assert(!r);
printf("child: Hi, I'm thread %d\n", *(int*)argV);
unprotected2++; /* whereas this is a race */
@@ -73,19 +89,8 @@
for (i = 0; i < NUM_THREADS; i++) {
pthread_join(threads[i], NULL);
- //printf("main: joined to thread %d\n", i);
+ /* printf("main: joined to thread %d\n", i); */
}
printf("main: Goodbye\n");
return 0;
}
-
-/* This is a hack: delay threads except the first enough so as to
- ensure threads[0] gets to the pthread_once call first. This is so
- as to ensure that this test produces results which aren't
- scheduling sensitive. (sigh) */
-void maybe_stall ( int myid )
-{
- assert(myid >= 0 && myid < NUM_THREADS);
- if (myid > 0)
- sleep(1);
-}
Modified: branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86 2007-10-31 19:29:33 UTC (rev 7065)
+++ branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86 2007-10-31 20:17:16 UTC (rev 7066)
@@ -3,16 +3,16 @@
at 0x........: clone (in /...libc...)
by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...)
by 0x........: pthread_create@* (tc_intercepts.c:...)
- by 0x........: main (tc21_pthonce.c:70)
+ by 0x........: main (tc21_pthonce.c:86)
Thread #3 was created
at 0x........: clone (in /...libc...)
by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...)
by 0x........: pthread_create@* (tc_intercepts.c:...)
- by 0x........: main (tc21_pthonce.c:70)
+ by 0x........: main (tc21_pthonce.c:86)
Possible data race during write of size 4 at 0x........
- at 0x........: child (tc21_pthonce.c:58)
+ at 0x........: child (tc21_pthonce.c:74)
by 0x........: mythread_wrapper (tc_intercepts.c:...)
by 0x........: ...
by 0x........: ...
Modified: branches/THRCHECK/thrcheck/tests/tc21_pthonce.stdout.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc21_pthonce.stdout.exp 2007-10-31 19:29:33 UTC (rev 7065)
+++ branches/THRCHECK/thrcheck/tests/tc21_pthonce.stdout.exp 2007-10-31 20:17:16 UTC (rev 7066)
@@ -1,6 +1,4 @@
welcome: Welcome
child: Hi, I'm thread 0
child: Hi, I'm thread 1
-child: Hi, I'm thread 2
-child: Hi, I'm thread 3
main: Goodbye
|
|
From: <sv...@va...> - 2007-10-31 19:29:35
|
Author: sewardj
Date: 2007-10-31 19:29:33 +0000 (Wed, 31 Oct 2007)
New Revision: 7065
Log:
Try to ensure this test produces scheduling-invariant results.
Modified:
branches/THRCHECK/thrcheck/tests/tc21_pthonce.c
Modified: branches/THRCHECK/thrcheck/tests/tc21_pthonce.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc21_pthonce.c 2007-10-31 18:19:54 UTC (rev 7064)
+++ branches/THRCHECK/thrcheck/tests/tc21_pthonce.c 2007-10-31 19:29:33 UTC (rev 7065)
@@ -51,9 +51,9 @@
printf("welcome: Welcome\n");
unprotected1++; /* this is harmless */
}
-
-void* child ( void* argV ) {
- int r= pthread_once(&welcome_once_block, welcome); assert(!r);
+void maybe_stall ( int myid );
+void* child ( void* argV ) { int r; maybe_stall( *(int*)argV );
+ r= pthread_once(&welcome_once_block, welcome); assert(!r);
printf("child: Hi, I'm thread %d\n", *(int*)argV);
unprotected2++; /* whereas this is a race */
return NULL;
@@ -78,3 +78,14 @@
printf("main: Goodbye\n");
return 0;
}
+
+/* This is a hack: delay threads except the first enough so as to
+ ensure threads[0] gets to the pthread_once call first. This is so
+ as to ensure that this test produces results which aren't
+ scheduling sensitive. (sigh) */
+void maybe_stall ( int myid )
+{
+ assert(myid >= 0 && myid < NUM_THREADS);
+ if (myid > 0)
+ sleep(1);
+}
|
|
From: <sv...@va...> - 2007-10-31 18:19:51
|
Author: sewardj
Date: 2007-10-31 18:19:54 +0000 (Wed, 31 Oct 2007)
New Revision: 7064
Log:
Fix breakage observed when running with --tc-sanity-flags=11111.
Modified:
branches/THRCHECK/thrcheck/tc_main.c
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-10-31 13:53:35 UTC (rev 7063)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-10-31 18:19:54 UTC (rev 7064)
@@ -109,7 +109,7 @@
# define SCE_CACHELINE 0 /* don't sanity-check CacheLine stuff */
#endif
-static void all__sanity_check ( char* who ); /* fwds */
+static void all__sanity_check ( Char* who ); /* fwds */
#define TC_CLI__MALLOC_REDZONE_SZB 16 /* let's say */
@@ -2755,16 +2755,18 @@
#undef BAD
}
-static void all__sanity_check ( char* who )
-{
+static void all_except_Locks__sanity_check ( Char* who ) {
stats__sanity_checks++;
- if (0) VG_(printf)("all__sanity_check(%s)\n", who);
+ if (0) VG_(printf)("all_except_Locks__sanity_check(%s)\n", who);
threads__sanity_check(who);
- locks__sanity_check(who);
segments__sanity_check(who);
shmem__sanity_check(who);
laog__sanity_check(who);
}
+static void all__sanity_check ( Char* who ) {
+ all_except_Locks__sanity_check(who);
+ locks__sanity_check(who);
+}
/*----------------------------------------------------------------*/
@@ -5142,7 +5144,8 @@
goto noerror;
noerror:
- /* check lock order acquisition graph, and update */
+ /* check lock order acquisition graph, and update. This has to
+ happen before the lock is added to the thread's locksetA/W. */
laog__pre_thread_acquires_lock( thr, lk );
/* update the thread's held-locks set */
thr->locksetA = TC_(addToWS)( univ_lsets, thr->locksetA, (Word)lk );
@@ -5210,7 +5213,8 @@
goto noerror;
noerror:
- /* check lock order acquisition graph, and update */
+ /* check lock order acquisition graph, and update. This has to
+ happen before the lock is added to the thread's locksetA/W. */
laog__pre_thread_acquires_lock( thr, lk );
/* update the thread's held-locks set */
thr->locksetA = TC_(addToWS)( univ_lsets, thr->locksetA, (Word)lk );
@@ -6809,8 +6813,13 @@
laog__add_edge( old, lk );
}
+ /* Why "except_Locks" ? We're here because a lock is being
+ acquired by a thread, and we're in an inconsistent state here.
+ See the call points in evhH__post_thread_{r,w}_acquires_lock.
+ When called in this inconsistent state, locks__sanity_check duly
+ barfs. */
if (clo_sanity_flags & SCE_LAOG)
- all__sanity_check("laog__pre_thread_acquires_lock-post");
+ all_except_Locks__sanity_check("laog__pre_thread_acquires_lock-post");
}
@@ -8387,7 +8396,7 @@
return False;
}
}
- VG_(printf)("XXX sanity flags: 0x%x\n", clo_sanity_flags);
+ if (0) VG_(printf)("XXX sanity flags: 0x%x\n", clo_sanity_flags);
}
else
|
|
From: Julian S. <js...@ac...> - 2007-10-31 16:11:20
|
On Wednesday 31 October 2007 16:01, Konstantin Serebryany wrote:
> Hi,
>
> I am trying to use thrcheck from THRCHECK branch.
>
> My program uses pthread_create to create threads, however it does not use
> pthread_mutex_lock/unclock for locking -- it has its own set of locking
> primitives.
>
> Is it possible to enhance thrcheck to handle user-settable lock/unlock
> primitives?
Yes, it is already possible. Look in tc_intercepts.c
and look at the functions pthreadZumutexZulock and
pthreadZumutexZuunlock. You need to make something like these
(add them to tc_intercepts.c to keep your life simple).
In the lock wrapper, the important components are
VALGRIND_GET_ORIG_FN(fn);
CALL_FN_W_W(ret, fn, mutex);
if (ret == 0 /*success*/) {
DO_CREQ_v_W(_VG_USERREQ__TC_PTHREAD_MUTEX_LOCK_POST,
pthread_mutex_t*,mutex);
It is this last part that notifies the tool that you acquired
the lock.
In the unlock wrapper, the important components are
VALGRIND_GET_ORIG_FN(fn);
DO_CREQ_v_W(_VG_USERREQ__TC_PTHREAD_MUTEX_UNLOCK_PRE,
pthread_mutex_t*,mutex);
CALL_FN_W_W(ret, fn, mutex);
So in the lock wrapper you don't notify Thrcheck you have the lock
until after the CALL_FN_W_W (the real lock call) succeeds.
Conversely in the unlock wrapper you tell thrcheck you have
released the lock before you really have released it.
You will need to know the soname of the object containing your
lock/unlock functions in order that you can write the magic PTH_FUNC
wrapper. Study PTH_FUNC and QT4_FUNC. You can find the soname of
xyz.so by doing "readelf -a xyz.so | grep soname".
Use --trace-redir=yes and/or -v to find out whether your wrappers
are actually getting called or not.
J
|
|
From: Konstantin S. <kon...@gm...> - 2007-10-31 15:01:12
|
Hi, I am trying to use thrcheck from THRCHECK branch. My program uses pthread_create to create threads, however it does not use pthread_mutex_lock/unclock for locking -- it has its own set of locking primitives. Is it possible to enhance thrcheck to handle user-settable lock/unlock primitives? Do you have this in plans? If not, I could try it myself (with some minimal guidance :)) Thanks, --kcc |
|
From: <sv...@va...> - 2007-10-31 13:53:33
|
Author: sewardj
Date: 2007-10-31 13:53:35 +0000 (Wed, 31 Oct 2007)
New Revision: 7063
Log:
Make sanity checking controllable from the command line, and tidy up
the top of tc_main.c a bit.
Modified:
branches/THRCHECK/thrcheck/tc_main.c
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-10-31 01:01:02 UTC (rev 7062)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-10-31 13:53:35 UTC (rev 7063)
@@ -76,6 +76,8 @@
// FIXME pth_cond_wait/timedwait wrappers. Even if these fail,
// the thread still holds the lock.
+/* ------------ Debug/trace options ------------ */
+
// this is:
// shadow_mem_make_NoAccess: 29156 SMs, 1728 scanned
// happens_before_wrk: 1000
@@ -90,34 +92,33 @@
#define SCE_LOCKS (1<<1) // Sanity check at lock events
#define SCE_BIGRANGE (1<<2) // Sanity check at big mem range events
#define SCE_ACCESS (1<<3) // Sanity check at mem accesses
+#define SCE_LAOG (1<<4) // Sanity check at significant LAOG events
#define SCE_BIGRANGE_T 256 // big mem range minimum size
-static const Int sanity_flags
-//= SCE_THREADS | SCE_LOCKS | SCE_BIGRANGE | SCE_ACCESS;
-= 0;
-#define SCE_CACHELINE 0 /* don't sanity-check CacheLine stuff */
-//#define SCE_CACHELINE 1 /* do sanity-check CacheLine stuff */
-//#define inline __attribute__((noinline))
+/* For the shadow mem cache stuff we may want more intrusive
+ checks. Unfortunately there's no almost-zero-cost way to make them
+ selectable at run time. Hence set the #if 0 to #if 1 and
+ rebuild if you want them. */
+#if 0
+# define SCE_CACHELINE 1 /* do sanity-check CacheLine stuff */
+# define inline __attribute__((noinline))
+ /* probably want to ditch -fomit-frame-pointer too */
+#else
+# define SCE_CACHELINE 0 /* don't sanity-check CacheLine stuff */
+#endif
static void all__sanity_check ( char* who ); /* fwds */
#define TC_CLI__MALLOC_REDZONE_SZB 16 /* let's say */
+// 0 for none, 1 for dump at end of run
+#define SHOW_DATA_STRUCTURES 0
-/* This has to do with printing error messages. See comments on
- announce_threadset() and summarise_threadset(). */
-#define N_THREADS_TO_ANNOUNCE 5
+/* ------------ Command line options ------------ */
-// FIXME: don't hardwire initial entries for root thread.
-// Instead, let the pre_thread_ll_create handler do this.
-
-// 0 for none, 1 for dump at end of run
-#define SHOW_DATA_STRUCTURES 0
-
-// FIXME move this somewhere sane
// 0 = no segments at all
// 1 = segments at thread create/join
// 2 = as 1 + segments at condition variable signal/broadcast/wait too
@@ -138,6 +139,21 @@
static Addr clo_trace_addr = 0;
static Int clo_trace_level = 0;
+/* Sanity check level. This is an or-ing of
+ SCE_{THREADS,LOCKS,BIGRANGE,ACCESS,LAOG}. */
+static Int clo_sanity_flags = 0;
+
+/* This has to do with printing error messages. See comments on
+ announce_threadset() and summarise_threadset(). Perhaps it
+ should be a command line option. */
+#define N_THREADS_TO_ANNOUNCE 5
+
+
+/* ------------ Misc comments ------------ */
+
+// FIXME: don't hardwire initial entries for root thread.
+// Instead, let the pre_thread_ll_create handler do this.
+
// FIXME: when a SecMap is completely set via and address range
// setting operation to a non-ShR/M state, clear its .mbHasShared
// bit
@@ -534,7 +550,6 @@
static UWord stats__lockN_acquires = 0;
static UWord stats__lockN_releases = 0;
-static UWord stats__lockN_acquires_w_ExeContext = 0;
static ThreadId map_threads_maybe_reverse_lookup_SLOW ( Thread* ); /*fwds*/
@@ -2383,8 +2398,11 @@
/*--- Sanity checking the data structures ---*/
/*----------------------------------------------------------------*/
+static UWord stats__sanity_checks = 0;
+
static Bool is_sane_CacheLine ( CacheLine* cl ); /* fwds */
static Bool cmpGEQ_VTS ( XArray* a, XArray* b ); /* fwds */
+static void laog__sanity_check ( Char* who ); /* fwds */
/* REQUIRED INVARIANTS:
@@ -2466,6 +2484,7 @@
}
/* Sanity check Threads, as far as possible */
+__attribute__((noinline))
static void threads__sanity_check ( Char* who )
{
#define BAD(_str) do { how = (_str); goto bad; } while (0)
@@ -2507,6 +2526,7 @@
/* Sanity check Locks, as far as possible */
+__attribute__((noinline))
static void locks__sanity_check ( Char* who )
{
#define BAD(_str) do { how = (_str); goto bad; } while (0)
@@ -2577,6 +2597,7 @@
/* Sanity check Segments, as far as possible */
+__attribute__((noinline))
static void segments__sanity_check ( Char* who )
{
#define BAD(_str) do { how = (_str); goto bad; } while (0)
@@ -2613,14 +2634,23 @@
/* Sanity check shadow memory, as far as possible */
+static Int cmp_Addr_for_ssort ( void* p1, void* p2 ) {
+ Addr a1 = *(Addr*)p1;
+ Addr a2 = *(Addr*)p2;
+ if (a1 < a2) return -1;
+ if (a1 > a2) return 1;
+ return 0;
+}
+__attribute__((noinline))
static void shmem__sanity_check ( Char* who )
{
#define BAD(_str) do { how = (_str); goto bad; } while (0)
Char* how = "no error";
Word smga;
SecMap* sm;
- Word i, j, ws_size;
+ Word i, j, ws_size, n_valid_tags;
Word* ws_words;
+ Addr* valid_tags;
TC_(initIterFM)( map_shmem );
// for sm in SecMaps {
while (TC_(nextIterFM)( map_shmem, (Word*)&smga, (Word*)&sm )) {
@@ -2653,7 +2683,7 @@
WordSetID lset = un_SHVAL_Sh_lset(w32);
if (!TC_(plausibleWS)( univ_tsets, tset )) BAD("5");
if (!TC_(saneWS_SLOW)( univ_tsets, tset )) BAD("6");
- if (TC_(isEmptyWS)( univ_tsets, tset )) BAD("7");
+ if (TC_(cardinalityWS)( univ_tsets, tset ) < 2) BAD("7");
if (!TC_(plausibleWS)( univ_lsets, lset )) BAD("8");
if (!TC_(saneWS_SLOW)( univ_lsets, lset )) BAD("9");
TC_(getPayloadWS)( &ws_words, &ws_size, univ_lsets, lset );
@@ -2689,6 +2719,9 @@
TC_(doneIterFM)( map_shmem );
// check the cache
+ valid_tags = tc_zalloc(N_WAY_NENT * sizeof(Addr));
+ n_valid_tags = 0;
+ tl_assert(valid_tags);
for (i = 0; i < N_WAY_NENT; i++) {
CacheLine* cl;
Addr tag;
@@ -2698,12 +2731,23 @@
if (tag != 1) {
if (!is_valid_scache_tag(tag)) BAD("14-0");
if (!is_sane_CacheLine(cl)) BAD("15-0");
+ /* A valid tag should be of the form
+ X---X line_number:N_WAY_BITS 0:N_LINE_BITS */
if (tag & (N_LINE_ARANGE-1)) BAD("16-0");
- for (j = i+1; j < N_WAY_NENT; j++)
- if (cache_shmem.tags0[j] == tag) BAD("17-0");
+ if ( i != ((tag >> N_LINE_BITS) & (N_WAY_NENT-1)) ) BAD("16-1");
+ valid_tags[n_valid_tags++] = tag;
}
}
-
+ tl_assert(n_valid_tags <= N_WAY_NENT);
+ if (n_valid_tags > 1) {
+ /* Check that the valid tags are unique */
+ VG_(ssort)( valid_tags, n_valid_tags, sizeof(Addr), cmp_Addr_for_ssort );
+ for (i = 0; i < n_valid_tags-1; i++) {
+ if (valid_tags[i] >= valid_tags[i+1])
+ BAD("16-2");
+ }
+ }
+ tc_free(valid_tags);
return;
bad:
VG_(printf)("shmem__sanity_check: who=\"%s\", bad=\"%s\"\n", who, how);
@@ -2713,11 +2757,13 @@
static void all__sanity_check ( char* who )
{
+ stats__sanity_checks++;
if (0) VG_(printf)("all__sanity_check(%s)\n", who);
threads__sanity_check(who);
locks__sanity_check(who);
segments__sanity_check(who);
shmem__sanity_check(who);
+ laog__sanity_check(who);
}
@@ -5344,7 +5390,7 @@
if (SHOW_EVENTS >= 2)
VG_(printf)("evh__new_mem(%p, %lu)\n", (void*)a, len );
shadow_mem_make_New( get_current_Thread(), a, len );
- if (len >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (len >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__new_mem-post");
}
@@ -5356,7 +5402,7 @@
(void*)a, len, (Int)rr, (Int)ww, (Int)xx );
if (rr || ww || xx)
shadow_mem_make_New( get_current_Thread(), a, len );
- if (len >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (len >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__new_mem_w_perms-post");
}
@@ -5371,7 +5417,7 @@
NoAccess, else leave it alone. */
if (!(rr || ww))
shadow_mem_make_NoAccess( get_current_Thread(), a, len );
- if (len >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (len >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__set_perms-post");
}
@@ -5380,7 +5426,7 @@
if (SHOW_EVENTS >= 2)
VG_(printf)("evh__die_mem(%p, %lu)\n", (void*)a, len );
shadow_mem_make_NoAccess( get_current_Thread(), a, len );
- if (len >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (len >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__die_mem-post");
}
@@ -5458,7 +5504,7 @@
}
}
- if (sanity_flags & SCE_THREADS)
+ if (clo_sanity_flags & SCE_THREADS)
all__sanity_check("evh__pre_thread_create-post");
}
@@ -5487,7 +5533,7 @@
entry, in order that the Valgrind core can re-use it. */
map_threads_delete( quit_tid );
- if (sanity_flags & SCE_THREADS)
+ if (clo_sanity_flags & SCE_THREADS)
all__sanity_check("evh__pre_thread_ll_exit-post");
}
@@ -5636,7 +5682,7 @@
tl_assert( map_threads_maybe_reverse_lookup_SLOW(thr_q)
== VG_INVALID_THREADID);
- if (sanity_flags & SCE_THREADS)
+ if (clo_sanity_flags & SCE_THREADS)
all__sanity_check("evh__post_thread_join-post");
}
@@ -5648,7 +5694,7 @@
VG_(printf)("evh__pre_mem_read(ctid=%d, \"%s\", %p, %lu)\n",
(Int)tid, s, (void*)a, size );
shadow_mem_read_range( map_threads_lookup(tid), a, size);
- if (size >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (size >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__pre_mem_read-post");
}
@@ -5662,7 +5708,7 @@
// FIXME: think of a less ugly hack
len = VG_(strlen)( (Char*) a );
shadow_mem_read_range( map_threads_lookup(tid), a, len+1 );
- if (len >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (len >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__pre_mem_read_asciiz-post");
}
@@ -5673,7 +5719,7 @@
VG_(printf)("evh__pre_mem_write(ctid=%d, \"%s\", %p, %lu)\n",
(Int)tid, s, (void*)a, size );
shadow_mem_write_range( map_threads_lookup(tid), a, size);
- if (size >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (size >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__pre_mem_write-post");
}
@@ -5688,7 +5734,7 @@
} else {
shadow_mem_make_New(get_current_Thread(), a, len);
}
- if (len >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (len >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__pre_mem_read-post");
}
@@ -5697,7 +5743,7 @@
if (SHOW_EVENTS >= 1)
VG_(printf)("evh__die_mem_heap(%p, %lu)\n", (void*)a, len );
shadow_mem_make_NoAccess( get_current_Thread(), a, len );
- if (len >= SCE_BIGRANGE_T && (sanity_flags & SCE_BIGRANGE))
+ if (len >= SCE_BIGRANGE_T && (clo_sanity_flags & SCE_BIGRANGE))
all__sanity_check("evh__pre_mem_read-post");
}
@@ -5777,7 +5823,7 @@
tl_assert(mbRec == 0 || mbRec == 1);
map_locks_lookup_or_create( mbRec ? LK_mbRec : LK_nonRec,
(Addr)mutex, tid );
- if (sanity_flags & SCE_LOCKS)
+ if (clo_sanity_flags & SCE_LOCKS)
all__sanity_check("evh__tc_PTHREAD_MUTEX_INIT_POST");
}
@@ -5818,7 +5864,7 @@
tl_assert( is_sane_LockN(lk) );
}
- if (sanity_flags & SCE_LOCKS)
+ if (clo_sanity_flags & SCE_LOCKS)
all__sanity_check("evh__tc_PTHREAD_MUTEX_DESTROY_PRE");
}
@@ -6058,7 +6104,7 @@
VG_(printf)("evh__tc_PTHREAD_RWLOCK_INIT_POST(ctid=%d, %p)\n",
(Int)tid, (void*)rwl );
map_locks_lookup_or_create( LK_rdwr, (Addr)rwl, tid );
- if (sanity_flags & SCE_LOCKS)
+ if (clo_sanity_flags & SCE_LOCKS)
all__sanity_check("evh__tc_PTHREAD_RWLOCK_INIT_POST");
}
@@ -6098,7 +6144,7 @@
tl_assert( is_sane_LockN(lk) );
}
- if (sanity_flags & SCE_LOCKS)
+ if (clo_sanity_flags & SCE_LOCKS)
all__sanity_check("evh__tc_PTHREAD_RWLOCK_DESTROY_PRE");
}
@@ -6430,12 +6476,12 @@
/* end EXPOSITION ONLY */
-static void laog__show ( void ) {
+static void laog__show ( Char* who ) {
Word i, ws_size;
Word* ws_words;
Lock* me;
LAOGLinks* links;
- VG_(printf)("laog {\n");
+ VG_(printf)("laog (requested by %s) {\n", who);
TC_(initIterFM)( laog );
me = NULL;
links = NULL;
@@ -6588,12 +6634,14 @@
}
}
-__attribute__((unused))
-static void laog__sanity_check ( void ) {
+__attribute__((noinline))
+static void laog__sanity_check ( Char* who ) {
Word i, ws_size;
Word* ws_words;
Lock* me;
LAOGLinks* links;
+ if ( !laog )
+ return; /* nothing much we can do */
TC_(initIterFM)( laog );
me = NULL;
links = NULL;
@@ -6622,7 +6670,8 @@
return;
bad:
- laog__show();
+ VG_(printf)("laog__sanity_check(%s) FAILED\n", who);
+ laog__show(who);
tl_assert(0);
}
@@ -6759,6 +6808,9 @@
tl_assert(old->acquired_at);
laog__add_edge( old, lk );
}
+
+ if (clo_sanity_flags & SCE_LAOG)
+ all__sanity_check("laog__pre_thread_acquires_lock-post");
}
@@ -6811,6 +6863,9 @@
TC_(getPayloadWS)( &ws_words, &ws_size, univ_lsets, locksToDelete );
for (i = 0; i < ws_size; i++)
laog__handle_one_lock_deletion( (Lock*)ws_words[i] );
+
+ if (clo_sanity_flags & SCE_LAOG)
+ all__sanity_check("laog__handle_lock_deletions-post");
}
@@ -8313,6 +8368,28 @@
}
else VG_BNUM_CLO(arg, "--trace-level", clo_trace_level, 0, 2)
+ /* "stuvw" --> stuvw (binary) */
+ else if (VG_CLO_STREQN(18, arg, "--tc-sanity-flags=")) {
+ Int j;
+ char* opt = & arg[18];
+
+ if (5 != VG_(strlen)(opt)) {
+ VG_(message)(Vg_UserMsg,
+ "--tc-sanity-flags argument must have 5 digits");
+ return False;
+ }
+ for (j = 0; j < 5; j++) {
+ if ('0' == opt[j]) { /* do nothing */ }
+ else if ('1' == opt[j]) clo_sanity_flags |= (1 << (5-1-j));
+ else {
+ VG_(message)(Vg_UserMsg, "--tc-sanity-flags argument can "
+ "only contain 0s and 1s");
+ return False;
+ }
+ }
+ VG_(printf)("XXX sanity flags: 0x%x\n", clo_sanity_flags);
+ }
+
else
return VG_(replacement_malloc_process_cmd_line_option)(arg);
@@ -8337,6 +8414,16 @@
"in .vcg format [no]\n");
VG_(printf)(" --cmp-race-err-addrs=no|yes are data addresses in "
"race errors significant? [no]\n");
+ VG_(printf)(" --tc-sanity-flags=<XXXXX> sanity check "
+ " at events (X = 0|1) [00000]\n");
+ VG_(printf)(" --tc-sanity-flags values:\n");
+ VG_(printf)(" 10000 after changes to "
+ "lock-order-acquisition-graph\n");
+ VG_(printf)(" 01000 at memory accesses (NB: not curently used)\n");
+ VG_(printf)(" 00100 at mem permission setting for "
+ "ranges >= %d bytes\n", SCE_BIGRANGE_T);
+ VG_(printf)(" 00010 at lock/unlock events\n");
+ VG_(printf)(" 00001 at thread create/join events\n");
}
static void tc_post_clo_init ( void )
@@ -8347,7 +8434,7 @@
{
if (SHOW_DATA_STRUCTURES)
pp_everything( PP_ALL, "SK_(fini)" );
- if (sanity_flags)
+ if (clo_sanity_flags)
all__sanity_check("SK_(fini)");
if (clo_gen_vcg > 0)
@@ -8377,33 +8464,36 @@
VG_(printf)(" hbefore: %,10lu probes\n", stats__hbefore_probes);
VG_(printf)("\n");
- VG_(printf)("segments: %,10lu Segment objects allocated\n",
+ VG_(printf)(" segments: %,8lu Segment objects allocated\n",
stats__mk_Segment);
- VG_(printf)("locksets: %8d unique lock sets\n",
+ VG_(printf)(" locksets: %,8d unique lock sets\n",
(Int)TC_(cardinalityWSU)( univ_lsets ));
- VG_(printf)("threadsets: %8d unique thread sets\n",
+ VG_(printf)(" threadsets: %,8d unique thread sets\n",
(Int)TC_(cardinalityWSU)( univ_tsets ));
- VG_(printf)("univ_laog: %8d unique lock sets\n",
+ VG_(printf)(" univ_laog: %,8d unique lock sets\n",
(Int)TC_(cardinalityWSU)( univ_laog ));
- VG_(printf)("L(ast)L(ock) map: %8lu inserts (%d map size)\n",
+ VG_(printf)("L(ast)L(ock) map: %,8lu inserts (%d map size)\n",
stats__ga_LL_adds,
(Int)(ga_to_lastlock ? TC_(sizeFM)( ga_to_lastlock ) : 0) );
- VG_(printf)("LockN-to-P map: %8lu queries (%d map size)\n",
+ VG_(printf)(" LockN-to-P map: %,8lu queries (%d map size)\n",
stats__ga_LockN_to_P_queries,
(Int)(yaWFM ? TC_(sizeFM)( yaWFM ) : 0) );
- VG_(printf)("string table map: %8lu queries (%d map size)\n",
+ VG_(printf)("string table map: %,8lu queries (%d map size)\n",
stats__string_table_queries,
(Int)(string_table ? TC_(sizeFM)( string_table ) : 0) );
-
- VG_(printf)(" locks: %,lu acquires (%,lu w/ExeContext), "
+ VG_(printf)(" LAOG: %,8d map size\n",
+ (Int)(laog ? TC_(sizeFM)( laog ) : 0));
+ VG_(printf)(" LAOG exposition: %,8d map size\n",
+ (Int)(laog_exposition ? TC_(sizeFM)( laog_exposition ) : 0));
+ VG_(printf)(" locks: %,8lu acquires, "
"%,lu releases\n",
stats__lockN_acquires,
- stats__lockN_acquires_w_ExeContext,
stats__lockN_releases
);
+ VG_(printf)(" sanity checks: %,8lu\n", stats__sanity_checks);
VG_(printf)("\n");
VG_(printf)(" msm: %,12lu %,12lu rd/wr_Excl_nochange\n",
|
|
From: Tom H. <th...@cy...> - 2007-10-31 03:31:45
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-10-31 03:15:02 GMT 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 == 260 tests, 27 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-31 03:25:38
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-10-31 03:05:06 GMT 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-31 03:23:29
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-10-31 03:10:04 GMT 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Oct 31 03:16:52 2007 --- new.short Wed Oct 31 03:23:31 2007 *************** *** 8,10 **** ! == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) *************** *** 15,17 **** none/tests/mremap2 (stdout) - none/tests/pth_detached (stdout) --- 15,16 ---- |
|
From: Tom H. <th...@cy...> - 2007-10-31 03:15:40
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-10-31 03:00:02 GMT 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 == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Rich C. <Ric...@me...> - 2007-10-31 02:46:16
|
[ resend with patch compressed ] Attached is Bryan's Omega patch against revision 7020. It worked for the test supplied by Bryan. I can also modify for the extension's framework when that becomes available. R. |
|
From: <js...@ac...> - 2007-10-31 01:09:23
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-10-31 02:00:01 CET 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 == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... failed Last 20 lines of verbose log follow echo Checking out valgrind source tree ... svn co svn://svn.valgrind.org/valgrind/trunk -r {2007-10-30T02:00:01} valgrind svn: Unknown hostname 'svn.valgrind.org' ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Oct 31 02:00:47 2007 --- new.short Wed Oct 31 02:09:23 2007 *************** *** 1,7 **** ! Checking out valgrind source tree ... failed ! Last 20 lines of verbose log follow echo - Checking out valgrind source tree ... svn co svn://svn.valgrind.org/valgrind/trunk -r {2007-10-30T02:00:01} valgrind - svn: Unknown hostname 'svn.valgrind.org' --- 1,18 ---- ! Checking out valgrind source tree ... done ! Configuring valgrind ... done ! Building valgrind ... done ! Running regression tests ... failed ! Regression test results follow ! ! == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == ! memcheck/tests/deep_templates (stdout) ! memcheck/tests/leak-cycle (stderr) ! memcheck/tests/leak-tree (stderr) ! memcheck/tests/pointer-trace (stderr) ! none/tests/faultstatus (stderr) ! none/tests/fdleak_cmsg (stderr) ! none/tests/mremap (stderr) ! none/tests/mremap2 (stdout) |
|
From: <sv...@va...> - 2007-10-31 01:01:15
|
Author: sewardj Date: 2007-10-31 01:01:02 +0000 (Wed, 31 Oct 2007) New Revision: 7062 Log: Add expected outputs for glibc25-x86. Added: branches/THRCHECK/thrcheck/tests/tc20_verifywrap.stderr.exp-glibc25-x86 branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86 Modified: branches/THRCHECK/thrcheck/tests/Makefile.am Modified: branches/THRCHECK/thrcheck/tests/Makefile.am =================================================================== --- branches/THRCHECK/thrcheck/tests/Makefile.am 2007-10-31 00:01:17 UTC (rev 7061) +++ branches/THRCHECK/thrcheck/tests/Makefile.am 2007-10-31 01:01:02 UTC (rev 7062) @@ -70,8 +70,10 @@ tc19_shadowmem.stderr.exp-glibc25-x86 \ tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \ tc20_verifywrap.stderr.exp-glibc25-amd64 \ + tc20_verifywrap.stderr.exp-glibc25-x86 \ tc21_pthonce.vgtest tc21_pthonce.stdout.exp \ - tc21_pthonce.stderr.exp-glibc25-amd64 + tc21_pthonce.stderr.exp-glibc25-amd64 \ + tc21_pthonce.stderr.exp-glibc25-x86 check_PROGRAMS = \ hg01_all_ok \ Added: branches/THRCHECK/thrcheck/tests/tc20_verifywrap.stderr.exp-glibc25-x86 =================================================================== --- branches/THRCHECK/thrcheck/tests/tc20_verifywrap.stderr.exp-glibc25-x86 (rev 0) +++ branches/THRCHECK/thrcheck/tests/tc20_verifywrap.stderr.exp-glibc25-x86 2007-10-31 01:01:02 UTC (rev 7062) @@ -0,0 +1,157 @@ + + +---------------- pthread_create/join ---------------- + +Thread #1 is the program's root thread + +Thread #2 was created + at 0x........: clone (in /...libc...) + by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) + by 0x........: pthread_create@* (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:64) + +Possible data race during write of size 2 at 0x........ + at 0x........: main (tc20_verifywrap.c:66) + Old state: owned exclusively by thread #2 + New state: shared-modified by threads #1, #2 + Reason: this thread, #1, holds no locks at all + +Thread #1's call to pthread_join failed + with error code 35 (EDEADLK: Resource deadlock would occur) + at 0x........: pthread_join (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:71) + +---------------- pthread_mutex_lock et al ---------------- + + +Thread #1's call to pthread_mutex_init failed + with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint) + at 0x........: pthread_mutex_init (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:80) + +Thread #1: pthread_mutex_destroy of a locked mutex + at 0x........: pthread_mutex_destroy (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:85) + +Thread #1's call to pthread_mutex_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_mutex_destroy (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:85) + +Thread #1's call to pthread_mutex_lock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_lock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:89) + +Thread #1's call to pthread_mutex_trylock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_trylock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:93) + +Thread #1's call to pthread_mutex_timedlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_timedlock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:98) + +Thread #1 unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #1's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +---------------- pthread_cond_wait et al ---------------- + + +Thread #1 unlocked a not-locked lock at 0x........ + at 0x........: pthread_cond_wait@* (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:119) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:117) + +Thread #1's call to pthread_cond_wait failed + with error code 1 (EPERM: Operation not permitted) + at 0x........: pthread_cond_wait@* (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:119) + +FIXME: can't figure out how to verify wrap of pthread_cond_signal + + +FIXME: can't figure out how to verify wrap of pthread_broadcast_signal + + +Thread #1's call to pthread_cond_timedwait failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_cond_timedwait@* (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:137) + +---------------- pthread_rwlock_* ---------------- + + +Thread #1 unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:151) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:150) +(1) no error on next line +(2) no error on next line +(3) ERROR on next line + +Thread #1 unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:168) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:158) +(4) no error on next line +(5) no error on next line +(6) no error on next line +(7) no error on next line +(8) ERROR on next line + +Thread #1 unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:184) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:158) + +---------------- sem_* ---------------- + + +Thread #1's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:200) + +FIXME: can't figure out how to verify wrap of sem_destroy + + +Thread #1: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (tc_intercepts.c:...) + by 0x........: sem_wait@* (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:214) + +FIXME: can't figure out how to verify wrap of sem_post + + +------------ dealloc of mem holding locks ------------ + + +Thread #1 deallocated location 0x........ containing a locked lock + at 0x........: main (tc20_verifywrap.c:234) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:188) + +Thread #1 deallocated location 0x........ containing a locked lock + at 0x........: main (tc20_verifywrap.c:234) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (tc_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:117) + +ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0) Added: branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86 =================================================================== --- branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86 (rev 0) +++ branches/THRCHECK/thrcheck/tests/tc21_pthonce.stderr.exp-glibc25-x86 2007-10-31 01:01:02 UTC (rev 7062) @@ -0,0 +1,24 @@ + +Thread #2 was created + at 0x........: clone (in /...libc...) + by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) + by 0x........: pthread_create@* (tc_intercepts.c:...) + by 0x........: main (tc21_pthonce.c:70) + +Thread #3 was created + at 0x........: clone (in /...libc...) + by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) + by 0x........: pthread_create@* (tc_intercepts.c:...) + by 0x........: main (tc21_pthonce.c:70) + +Possible data race during write of size 4 at 0x........ + at 0x........: child (tc21_pthonce.c:58) + by 0x........: mythread_wrapper (tc_intercepts.c:...) + by 0x........: ... + by 0x........: ... + Old state: shared-readonly by threads #2, #3 + New state: shared-modified by threads #2, #3 + Reason: this thread, #3, holds no consistent locks + Location 0x........ has never been protected by any lock + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) |
|
From: <sv...@va...> - 2007-10-31 00:01:15
|
Author: sewardj
Date: 2007-10-31 00:01:17 +0000 (Wed, 31 Oct 2007)
New Revision: 7061
Log:
Add suppression required for tc21_pthonce. Backtrace-with-a-hole-in-it
created by the hack in r7059.
Modified:
branches/THRCHECK/glibc-2.X-thrcheck.supp
Modified: branches/THRCHECK/glibc-2.X-thrcheck.supp
===================================================================
--- branches/THRCHECK/glibc-2.X-thrcheck.supp 2007-10-30 23:59:15 UTC (rev 7060)
+++ branches/THRCHECK/glibc-2.X-thrcheck.supp 2007-10-31 00:01:17 UTC (rev 7061)
@@ -58,6 +58,13 @@
obj:/lib*/libpthread-2.5.so
obj:/lib*/libc-2.5.so
}
+{
+ thrcheck-glibc25-09
+ Thrcheck:Race
+ obj:/lib*/libc-2.5.so
+ fun:*
+ obj:/lib*/libc-2.5.so
+}
# These are very ugly. They are needed to suppress errors inside (eg)
# NPTL's pthread_cond_signal. Why only one stack frame -- at least we
|