s_clientobj = 0;
}
+/** Return the data associated with the client object at client address addr.
+ * Return 0 if there is no client object in the set with the specified start
+ * address.
+ */
+DrdClientobj* clientobj_get_any(const Addr addr)
+{
+ return VG_(OSetGen_Lookup)(s_clientobj, &addr);
+}
+
/** Return the data associated with the client object at client address addr
* and that has object type t. Return 0 if there is no client object in the
* set with the specified start address.
VG_(memset)(p, 0, sizeof(*p));
p->any.a1 = a1;
p->any.type = t;
+ p->any.first_observed_at = VG_(record_ExeContext)(VG_(get_running_tid)(), 0);
VG_(OSetGen_Insert)(s_clientobj, p);
tl_assert(VG_(OSetGen_Lookup)(s_clientobj, &a1) == p);
drd_start_suppression(a1, a1 + 1, "clientobj");
return p;
}
+const char* clientobj_type_name(const ObjType t)
+{
+ switch (t)
+ {
+ case ClientMutex: return "mutex";
+ case ClientCondvar: return "cond";
+ case ClientSemaphore: return "semaphore";
+ case ClientBarrier: return "barrier";
+ case ClientRwlock: return "rwlock";
+ }
+ return "(unknown)";
+}
struct any
{
- Addr a1;
- ObjType type;
- void (*cleanup)(union drd_clientobj*);
+ Addr a1;
+ ObjType type;
+ void (*cleanup)(union drd_clientobj*);
+ ExeContext* first_observed_at;
};
struct mutex_info
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ ExeContext* first_observed_at;
MutexT mutex_type; // pthread_mutex_t or pthread_spinlock_t.
int recursion_count; // 0 if free, >= 1 if locked.
DrdThreadId owner; // owner if locked, last owner if free.
Segment* last_locked_segment;
ULong acquiry_time_ms;
- ExeContext* first_observed_at;
ExeContext* acquired_at;
};
struct cond_info
{
- Addr a1;
- ObjType type;
- void (*cleanup)(union drd_clientobj*);
- int waiter_count;
- Addr mutex; //Client mutex specified in pthread_cond_wait() call, and null
- //if no client threads are currently waiting on this cond.var.
+ Addr a1;
+ ObjType type;
+ void (*cleanup)(union drd_clientobj*);
+ ExeContext* first_observed_at;
+ int waiter_count;
+ Addr mutex; // Client mutex specified in pthread_cond_wait() call, and
+ // null if no client threads are currently waiting on this cond.var.
};
struct semaphore_info
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ ExeContext* first_observed_at;
UWord value; // Semaphore value.
UWord waiters; // Number of threads inside sem_wait().
DrdThreadId last_sem_post_tid; // Thread ID associated with last sem_post().
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ ExeContext* first_observed_at;
BarrierT barrier_type; // pthread_barrier or gomp_barrier.
Word count; // Participant count in a barrier wait.
Word pre_iteration; // pthread_barrier_wait() call count modulo two.
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ ExeContext* first_observed_at;
OSet* thread_info;
ULong acquiry_time_ms;
ExeContext* acquired_at;
void clientobj_set_trace(const Bool trace);
void clientobj_init(void);
void clientobj_cleanup(void);
+DrdClientobj* clientobj_get_any(const Addr addr);
DrdClientobj* clientobj_get(const Addr addr, const ObjType t);
Bool clientobj_present(const Addr a1, const Addr a2);
DrdClientobj* clientobj_add(const Addr a1, const ObjType t);
void clientobj_stop_using_mem(const Addr a1, const Addr a2);
void clientobj_resetiter(void);
DrdClientobj* clientobj_next(const ObjType t);
+const char* clientobj_type_name(const ObjType t);
+
#endif /* __DRD_CLIENTOBJ_H */
}
}
-/** 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.
+/** Report where an object has been observed for the first time. The printed
+ * call stack will either refer to a pthread_*_init() or a pthread_*lock()
+ * call.
*/
-static void mutex_first_observed(const Addr mutex)
+static void first_observed(const Addr obj)
{
- struct mutex_info* mi;
+ DrdClientobj* cl;
- mi = mutex_get(mutex);
- if (mi)
+ cl = clientobj_get_any(obj);
+ if (cl)
{
- tl_assert(mi->first_observed_at);
+ tl_assert(cl->any.first_observed_at);
VG_(message)(Vg_UserMsg,
- "Mutex 0x%lx was first observed at:", mutex);
- VG_(pp_ExeContext)(mi->first_observed_at);
+ "%s 0x%lx was first observed at:",
+ clientobj_type_name(cl->any.type),
+ obj);
+ VG_(pp_ExeContext)(cl->any.first_observed_at);
}
}
p->mutex);
}
VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ first_observed(p->mutex);
break;
}
case CondErr: {
VG_(get_error_string)(e),
cdei->cond);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ first_observed(cdei->cond);
break;
}
case CondDestrErr: {
cdi->cond, cdi->mutex,
DrdThreadIdToVgThreadId(cdi->tid), cdi->tid);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- mutex_first_observed(cdi->mutex);
+ first_observed(cdi->mutex);
break;
}
case CondRaceErr: {
" by the signalling thread.",
cei->cond, cei->mutex);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- mutex_first_observed(cei->mutex);
+ first_observed(cei->cond);
+ first_observed(cei->mutex);
break;
}
case CondWaitErr: {
cwei->mutex1,
cwei->mutex2);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- mutex_first_observed(cwei->mutex1);
- mutex_first_observed(cwei->mutex2);
+ first_observed(cwei->cond);
+ first_observed(cwei->mutex1);
+ first_observed(cwei->mutex2);
break;
}
case SemaphoreErr: {
"%s: semaphore 0x%lx",
VG_(get_error_string)(e),
sei->semaphore);
+ first_observed(sei->semaphore);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
break;
}
case BarrierErr: {
- BarrierErrInfo* sei =(BarrierErrInfo*)(VG_(get_error_extra)(e));
- tl_assert(sei);
+ BarrierErrInfo* bei =(BarrierErrInfo*)(VG_(get_error_extra)(e));
+ tl_assert(bei);
VG_(message)(Vg_UserMsg,
"%s: barrier 0x%lx",
VG_(get_error_string)(e),
- sei->barrier);
+ bei->barrier);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ first_observed(bei->barrier);
break;
}
case RwlockErr: {
VG_(get_error_string)(e),
p->rwlock);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ first_observed(p->rwlock);
break;
}
case HoldtimeErr: {
p->hold_time_ms,
p->threshold_ms);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
+ first_observed(p->synchronization_object);
break;
}
case GenericErr: {
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;
}
Lock on mutex 0x........ was held during ... ms (threshold: 500 ms).
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (hold_lock.c:?)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (hold_lock.c:?)
Locking rwlock exclusively ...
Acquired at:
Lock on rwlock 0x........ was held during ... ms (threshold: 500 ms).
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (hold_lock.c:?)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (hold_lock.c:?)
Locking rwlock shared ...
Done.
Lock on rwlock 0x........ was held during ... ms (threshold: 500 ms).
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (hold_lock.c:?)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (hold_lock.c:?)
Done.
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Barrier reinitializatoin: barrier 0x........
at 0x........: pthread_barrier_init (drd_pthread_intercepts.c:?)
by 0x........: main (pth_barrier_reinit.c:?)
+barrier 0x........ was first observed at:
+ at 0x........: pthread_barrier_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_barrier_reinit.c:?)
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
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:
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (pth_cond_race.c:?)
+mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (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:
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_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:?)
-Mutex 0x........ was first observed at:
+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:
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_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:?)
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:
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_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:?)
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
by 0x........: main (tc09_bad_unlock.c:49)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: nearly_main (tc09_bad_unlock.c:23)
+ by 0x........: main (tc09_bad_unlock.c:49)
Thread 2:
Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1.
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........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:49)
Thread 1:
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
by 0x........: main (tc09_bad_unlock.c:50)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: nearly_main (tc09_bad_unlock.c:23)
+ by 0x........: main (tc09_bad_unlock.c:50)
Thread 2:
Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1.
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........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:50)
Thread 1:
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
by 0x........: main (tc09_bad_unlock.c:49)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: nearly_main (tc09_bad_unlock.c:23)
+ by 0x........: main (tc09_bad_unlock.c:49)
Thread 2:
Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1.
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........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:49)
Thread 1:
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
by 0x........: main (tc09_bad_unlock.c:50)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: nearly_main (tc09_bad_unlock.c:23)
+ by 0x........: main (tc09_bad_unlock.c:50)
Thread 2:
Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1.
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........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:50)
Thread 1:
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc10_rec_lock.c:42)
by 0x........: main (tc10_rec_lock.c:47)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: nearly_main (tc10_rec_lock.c:24)
+ by 0x........: main (tc10_rec_lock.c:47)
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc12_rwl_trivial.c:29)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc12_rwl_trivial.c:18)
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Semaphore reinitialization: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc18_semabuse.c:23)
at 0x........: sem_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc18_semabuse.c:26)
Invalid semaphore: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc18_semabuse.c:23)
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc18_semabuse.c:34)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:108)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:116)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:121)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
---------------- pthread_cond_wait et al ----------------
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:147)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
FIXME: can't figure out how to verify wrap of pthread_cond_signal
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:179)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:178)
(1) no error on next line
(2) no error on next line
(3) ERROR on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:196)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
Reader-writer lock reinitialization: rwlock 0x.........
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:199)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
(4) no error on next line
(5) no error on next line
(6) no error on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:212)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
---------------- sem_* ----------------
Semaphore reinitialization: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:231)
Invalid semaphore: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:242)
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:147)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
FIXME: can't figure out how to verify wrap of pthread_cond_signal
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:179)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:178)
(1) no error on next line
(2) no error on next line
(3) ERROR on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:196)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
Reader-writer lock reinitialization: rwlock 0x.........
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:199)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
(4) no error on next line
(5) no error on next line
(6) no error on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:212)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
---------------- sem_* ----------------
Semaphore reinitialization: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:231)
Invalid semaphore: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:242)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:108)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:116)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:121)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
---------------- pthread_cond_wait et al ----------------
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:147)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
FIXME: can't figure out how to verify wrap of pthread_cond_signal
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:179)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:178)
(1) no error on next line
(2) no error on next line
(3) ERROR on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:196)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
Reader-writer lock reinitialization: rwlock 0x.........
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:199)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
(4) no error on next line
(5) no error on next line
(6) no error on next line
Invalid semaphore: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:242)
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:108)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:116)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:121)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
[1/1] mutex_unlock invalid mutex 0x........ rc 0
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
---------------- pthread_cond_wait et al ----------------
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:147)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
[1/1] cond_pre_wait cond 0x........
[1/1] cond_post_wait cond 0x........
[1/1] cond_post_wait error checking mutex 0x........ rc 0 owner 0
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:179)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:178)
(1) no error on next line
(2) no error on next line
(3) ERROR on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:196)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
Reader-writer lock reinitialization: rwlock 0x.........
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:199)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
(4) no error on next line
(5) no error on next line
(6) no error on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:212)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
---------------- sem_* ----------------
[1/1] semaphore_init 0x........
Semaphore reinitialization: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:231)
[1/1] semaphore_post_wait 0x........
Invalid semaphore: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:242)
[1/1] semaphore_post 0x........
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:147)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
[1/1] cond_pre_wait cond 0x........
[1/1] cond_post_wait cond 0x........
[1/1] cond_post_wait error checking mutex 0x........ rc 0 owner 0
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:179)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:178)
(1) no error on next line
(2) no error on next line
(3) ERROR on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:196)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
Reader-writer lock reinitialization: rwlock 0x.........
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:199)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
(4) no error on next line
(5) no error on next line
(6) no error on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:212)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
---------------- sem_* ----------------
[1/1] semaphore_init 0x........
Semaphore reinitialization: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:231)
[1/1] semaphore_post_wait 0x........
Invalid semaphore: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:242)
[1/1] semaphore_post 0x........
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:108)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:116)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
[1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:121)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
[1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 (locking failed)
[1/1] mutex_unlock invalid mutex 0x........ rc 0
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:125)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:108)
---------------- pthread_cond_wait et al ----------------
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:147)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
[1/1] cond_pre_wait cond 0x........
[1/1] cond_post_wait cond 0x........
[1/1] cond_post_wait error checking mutex 0x........ rc 0 owner 0
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:179)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:178)
(1) no error on next line
(2) no error on next line
(3) ERROR on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:196)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
Reader-writer lock reinitialization: rwlock 0x.........
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:199)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
(4) no error on next line
(5) no error on next line
(6) no error on next line
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:212)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:186)
---------------- sem_* ----------------
[1/1] semaphore_post_wait 0x........
Invalid semaphore: semaphore 0x........
+semaphore 0x........ was first observed at:
+ at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:228)
at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc20_verifywrap.c:242)
[1/1] semaphore_post 0x........
Mutex still locked at thread exit: mutex 0x........, recursion count 1, owner 3.
at 0x........: pthread_join (drd_pthread_intercepts.c:?)
by 0x........: main (tc22_exit_w_lock.c:43)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
+ by 0x........: child_fn1 (tc22_exit_w_lock.c:18)
+ by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
+ by 0x........: (within libpthread-?.?.so)
+ by 0x........: clone (in /...libc...)
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:56)
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)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:51)
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
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:
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:56)
+mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:51)
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)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:57)
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)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:57)
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:56)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:57)
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)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:53)
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
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:
+cond 0x........ was first observed at:
+ at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc23_bogus_condwait.c:56)
+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) !
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)
ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
Recursive writer locking not allowed: rwlock 0x.........
at 0x........: pthread_rwlock_wrlock* (drd_pthread_intercepts.c:?)
by 0x........: main (trylock.c:?)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (trylock.c:?)
Locking mutex via pthread_mutex_trylock().
Locking mutex via pthread_mutex_lock().
Locking mutex via pthread_mutex_timedlock().