1 2 3 4 ------ This is output for >= glibc 2.4 ------ 5 6 ---------------- pthread_create/join ---------------- 7 8 ---Thread-Announcement------------------------------------------ 9 10 Thread #x is the program's root thread 11 12 ---Thread-Announcement------------------------------------------ 13 14 Thread #x was created 15 ... 16 by 0x........: pthread_create@* (hg_intercepts.c:...) 17 by 0x........: main (tc20_verifywrap.c:81) 18 19 ---------------------------------------------------------------- 20 21 Possible data race during write of size 2 at 0x........ by thread #x 22 Locks held: none 23 at 0x........: main (tc20_verifywrap.c:83) 24 25 This conflicts with a previous write of size 2 by thread #x 26 Locks held: none 27 at 0x........: racy_child (tc20_verifywrap.c:39) 28 by 0x........: mythread_wrapper (hg_intercepts.c:...) 29 ... 30 Location 0x........ is 0 bytes inside global var "unprotected" 31 declared at tc20_verifywrap.c:32 32 33 ---------------------------------------------------------------- 34 35 Thread #x's call to pthread_join failed 36 with error code 35 (EDEADLK: Resource deadlock would occur) 37 at 0x........: pthread_join_WRK (hg_intercepts.c:...) 38 by 0x........: pthread_join (hg_intercepts.c:...) 39 by 0x........: main (tc20_verifywrap.c:88) 40 41 42 ---------------- pthread_mutex_lock et al ---------------- 43 44 ---------------------------------------------------------------- 45 46 Thread #x's call to pthread_mutex_init failed 47 with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint) 48 at 0x........: pthread_mutex_init (hg_intercepts.c:...) 49 by 0x........: main (tc20_verifywrap.c:102) 50 51 ---------------------------------------------------------------- 52 53 Thread #x: pthread_mutex_destroy of a locked mutex 54 at 0x........: mutex_destroy_WRK (hg_intercepts.c:...) 55 by 0x........: pthread_mutex_destroy (hg_intercepts.c:...) 56 by 0x........: main (tc20_verifywrap.c:112) 57 58 ---------------------------------------------------------------- 59 60 Thread #x's call to pthread_mutex_destroy failed 61 with error code 16 (EBUSY: Device or resource busy) 62 at 0x........: mutex_destroy_WRK (hg_intercepts.c:...) 63 by 0x........: pthread_mutex_destroy (hg_intercepts.c:...) 64 by 0x........: main (tc20_verifywrap.c:112) 65 66 ---------------------------------------------------------------- 67 68 Thread #x's call to pthread_mutex_lock failed 69 with error code 22 (EINVAL: Invalid argument) 70 at 0x........: mutex_lock_WRK (hg_intercepts.c:...) 71 by 0x........: pthread_mutex_lock (hg_intercepts.c:...) 72 by 0x........: main (tc20_verifywrap.c:118) 73 74 ---------------------------------------------------------------- 75 76 Thread #x's call to pthread_mutex_trylock failed 77 with error code 22 (EINVAL: Invalid argument) 78 at 0x........: mutex_trylock_WRK (hg_intercepts.c:...) 79 by 0x........: pthread_mutex_trylock (hg_intercepts.c:...) 80 by 0x........: main (tc20_verifywrap.c:126) 81 82 ---------------------------------------------------------------- 83 84 Thread #x's call to pthread_mutex_timedlock failed 85 with error code 22 (EINVAL: Invalid argument) 86 at 0x........: mutex_timedlock_WRK (hg_intercepts.c:...) 87 by 0x........: pthread_mutex_timedlock (hg_intercepts.c:...) 88 by 0x........: main (tc20_verifywrap.c:131) 89 90 ---------------------------------------------------------------- 91 92 Thread #x unlocked an invalid lock at 0x........ 93 at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) 94 by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) 95 by 0x........: main (tc20_verifywrap.c:135) 96 97 ---------------------------------------------------------------- 98 99 Thread #x's call to pthread_mutex_unlock failed 100 with error code 22 (EINVAL: Invalid argument) 101 at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) 102 by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) 103 by 0x........: main (tc20_verifywrap.c:135) 104 105 106 ---------------- pthread_cond_wait et al ---------------- 107 108 ---------------------------------------------------------------- 109 110 Thread #x: pthread_cond_{timed}wait called with un-held mutex 111 at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...) 112 by 0x........: pthread_cond_wait@* (hg_intercepts.c:...) 113 by 0x........: main (tc20_verifywrap.c:157) 114 115 ---------------------------------------------------------------- 116 117 Thread #x's call to pthread_cond_wait failed 118 with error code 1 (EPERM: Operation not permitted) 119 at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...) 120 by 0x........: pthread_cond_wait@* (hg_intercepts.c:...) 121 by 0x........: main (tc20_verifywrap.c:157) 122 123 ---------------------------------------------------------------- 124 125 Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread 126 at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...) 127 by 0x........: pthread_cond_signal@* (hg_intercepts.c:...) 128 by 0x........: main (tc20_verifywrap.c:162) 129 130 131 FIXME: can't figure out how to verify wrap of pthread_cond_signal 132 133 ---------------------------------------------------------------- 134 135 Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread 136 at 0x........: pthread_cond_broadcast_WRK (hg_intercepts.c:...) 137 by 0x........: pthread_cond_broadcast@* (hg_intercepts.c:...) 138 by 0x........: main (tc20_verifywrap.c:168) 139 140 141 FIXME: can't figure out how to verify wrap of pthread_broadcast_signal 142 143 ---------------------------------------------------------------- 144 145 Thread #x: pthread_cond_{timed}wait called with un-held mutex 146 at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...) 147 by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) 148 by 0x........: main (tc20_verifywrap.c:175) 149 150 ---------------------------------------------------------------- 151 152 Thread #x's call to pthread_cond_timedwait failed 153 with error code 22 (EINVAL: Invalid argument) 154 at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...) 155 by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) 156 by 0x........: main (tc20_verifywrap.c:175) 157 158 159 ---------------- pthread_rwlock_* ---------------- 160 161 ---------------------------------------------------------------- 162 163 Thread #x unlocked a not-locked lock at 0x........ 164 at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...) 165 by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) 166 ... 167 by 0x........: main (tc20_verifywrap.c:189) 168 Lock at 0x........ was first observed 169 at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...) 170 by 0x........: pthread_rwlock_init (hg_intercepts.c:...) 171 by 0x........: main (tc20_verifywrap.c:188) 172 Location 0x........ is 0 bytes inside local var "rwl" 173 declared at tc20_verifywrap.c:52, in frame #x of thread x 174 175 176 (1) no error on next line 177 (2) no error on next line 178 (3) ERROR on next line 179 ---------------------------------------------------------------- 180 181 Thread #x unlocked a not-locked lock at 0x........ 182 at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...) 183 by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) 184 ... 185 by 0x........: main (tc20_verifywrap.c:206) 186 Lock at 0x........ was first observed 187 at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...) 188 by 0x........: pthread_rwlock_init (hg_intercepts.c:...) 189 by 0x........: main (tc20_verifywrap.c:196) 190 Location 0x........ is 0 bytes inside local var "rwl2" 191 declared at tc20_verifywrap.c:53, in frame #x of thread x 192 193 194 (4) no error on next line 195 (5) no error on next line 196 (6) no error on next line 197 (7) no error on next line 198 (8) ERROR on next line 199 ---------------------------------------------------------------- 200 201 Thread #x unlocked a not-locked lock at 0x........ 202 at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...) 203 by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) 204 ... 205 by 0x........: main (tc20_verifywrap.c:227) 206 Lock at 0x........ was first observed 207 at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...) 208 by 0x........: pthread_rwlock_init (hg_intercepts.c:...) 209 by 0x........: main (tc20_verifywrap.c:196) 210 Location 0x........ is 0 bytes inside local var "rwl2" 211 declared at tc20_verifywrap.c:53, in frame #x of thread x 212 213 214 215 ---------------- sem_* ---------------- 216 217 ---------------------------------------------------------------- 218 219 Thread #x's call to sem_init failed 220 with error code 22 (EINVAL: Invalid argument) 221 at 0x........: sem_init_WRK (hg_intercepts.c:...) 222 by 0x........: sem_init@* (hg_intercepts.c:...) 223 by 0x........: main (tc20_verifywrap.c:248) 224 225 226 FIXME: can't figure out how to verify wrap of sem_destroy 227 228 ---------------------------------------------------------------- 229 230 Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post 231 at 0x........: sem_wait_WRK (hg_intercepts.c:...) 232 by 0x........: sem_wait (hg_intercepts.c:...) 233 by 0x........: main (tc20_verifywrap.c:262) 234 235 236 FIXME: can't figure out how to verify wrap of sem_post 237 238 239 ------------ dealloc of mem holding locks ------------ 240 241 ---------------------------------------------------------------- 242 243 Thread #x: Exiting thread still holds 1 lock 244 ... 245 246 247 ERROR SUMMARY: 22 errors from 22 contexts (suppressed: 0 from 0) 248