LOCK TRACE

table of contents

Please note: the colors are only used for easier reading, they don't have a special meaning.

  1. meta data
  2. durations
  3. errors
  4. double lock/unlock mutexes
  5. still locked mutexes
  6. double lock/unlock r/w-locks
  7. still locked r/w-locks
  8. where are locks used
  9. correlations between locks

The "tid" is the thread identifier of the thread that triggered a measurement.

1. META DATA

meta data
executable/home/folkert/Projects/lock_tracer/build/test
PID89812
schedulersched-other
host namelappiemctopface
core file/tmp/core-main-6-1000-1000-89812-1639996891
trace filedump.dat.89812
# trace records15251343 (90.91%, 4.10%/s)
fork warningfalse
# cores4
started at1639996868.032641172 (2021-12-20 11:41:08.32640919)
stopped at1639996890.203887701 (2021-12-20 11:41:30.203887492)
took22.171247s

counts

# mutex try-locks1
# rwlock try-rdlock1
# rwlock try-timed-rdlock1
# rwlock try-wrlock1
# rwlock try-timed-rwlock1
failed mutex destroy0
failed mutex init0
failed mutex locks1
failed mutex unlocks0
failed pthread_clean0
failed rw destroy0
failed rw init0
failed rw read lock2
failed rw unlock0
failed rw write lock3
mutex destroy0
mutex init4
mutex locks7361738
mutex unlocks7889581
pthread_clean0
rw destroy0
rw init0
rw read lock4
rw unlock8
rw write lock2

2. acquisition durations

How long it took before a mutex (or r/w-lock) was acquired. This takes longer if an other thread is already holding it and doesn't immediately return it.

Also shown is, how long mutex was held on average. 'sd' is the standard deviation.

mutexavg: 0.521us, sd: 23.693us
mutex heldavg: 3.634us, sd: 1122.081us
read lockavg: 0.047us, sd: 0.030us
write lockavg: 0.370us, sd: 320.000us

per mutex durations

acquiration duration

pointeraveragestandard deviation
0x00005615a3680040/test (.bss)/??:0/536.000us0.000us
0x00007fedd82001a0/()+0x101a0/??:0/384.000us0.000us
0x00007fedd8204398/()+0x14398/??:0/60.491us4827.144us
0x00007fedd820aa80/()+0x1aa80/??:0/98.739us91.636us
0x00007ffd8455d390/??/??:0/417811.423us559825.385us
0x00007ffd8455d3c0/??/??:0/353.000us0.000us
0x00007ffd8455d3f0/??/??:0/72.641us121.384us
0x00007ffd8455d400/??/??:0/65.000us0.000us
0x00007ffd8455d420/??/??:0/27.285us83.137us

mutex held duration

pointeraveragestandard deviation
0x00005615a3680040/test (.bss)/??:0/40251.000us0.000us
0x00007fedd82001a0/()+0x101a0/??:0/112106.000us0.000us
0x00007fedd8204398/()+0x14398/??:0/689.648us905193.350us
0x00007fedd820aa80/()+0x1aa80/??:0/2204.077us17377.393us
0x00007ffd8455d390/??/??:0/2456101.417us19592147.290us
0x00007ffd8455d3f0/??/??:0/61392.560us583404.706us
0x00007ffd8455d400/??/??:0/501368772.000us0.000us
0x00007ffd8455d420/??/??:0/8413.764us62623.228us

per r/w lock durations

read lock acquiration duration

pointerr/waveragestandard deviation
0x00007ffd8455d430/??/??:0/43.333us33.639us
0x00007ffd8455d440/??/??:0/59.000us0.000us

write lock acquiration duration

pointerr/waveragestandard deviation
0x00007ffd8455d440/??/??:0/370.000us320.000us

r/w-lock held duration

pointerr/w>averagestandard deviation
0x00007ffd8455d440/??/??:0/r24727.000us0.000us
w27939.000us14916.823us

3. function call errors

pthread_-functions can fail, they then return an errno-alike error code. In this section, all that occured (for the ones checked, like mutex errors etc) are listed.

Count: 4

Resource temporarily unavailable

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702157136
took0.065us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8471c590x00007fedd8471c59/??/??:0/
0x5615a367db8b0x00005615a367db8b/test_rwlock+0x9b (.text)//home/folkert/Projects/lock_tracer/test.c:147:2/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702180606
took0.045us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8471c590x00007fedd8471c59/??/??:0/
0x5615a367db930x00005615a367db93/test_rwlock+0xa3 (.text)//home/folkert/Projects/lock_tracer/test.c:149:2/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

Device or resource busy

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702320958
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8472a4e0x00007fedd8472a4e/??/??:0/
0x5615a367dc3b0x00005615a367dc3b/test_try_lock+0x6b (.text)//home/folkert/Projects/lock_tracer/test.c:165:18/
0x5615a367d3df0x00005615a367d3df/main+0x1f (.text)//home/folkert/Projects/lock_tracer/test.c:205:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

Resource deadlock avoided

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.536292605
took0.558us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84721c70x00007fedd84721c7/??/??:0/
0x5615a367da6f0x00005615a367da6f/test_mutex+0x2bf (.text)//home/folkert/Projects/lock_tracer/test.c:120:16/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702080483
took0.052us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8471b390x00007fedd8471b39/??/??:0/
0x5615a367db6b0x00005615a367db6b/test_rwlock+0x7b (.text)//home/folkert/Projects/lock_tracer/test.c:142:2/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

Connection timed out

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702382172
took12.652us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8472b380x00007fedd8472b38/??/??:0/
0x5615a367dc590x00005615a367dc59/test_try_lock+0x89 (.text)//home/folkert/Projects/lock_tracer/test.c:169:1/
0x5615a367d3df0x00005615a367d3df/main+0x1f (.text)//home/folkert/Projects/lock_tracer/test.c:205:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

4. mutex lock/unlock mistakes

Mistakes are: locking a mutex another time by the same thread, unlocking mutexes that are not locked and unlocking of a mutex by some other thread than the one who locked the mutex.

This section contains a list of all the seen mutex/error-type combinations and then for each the mistakes made and then one or more backtraces ("first" and "next") where they occured.

Count: 4

mutex 0x5615a3680040, type "not locked"

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:18.35263837
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367d8dd0x00005615a367d8dd/test_mutex+0x12d (.text)//home/folkert/Projects/lock_tracer/test.c:85:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

mutex 0x7ffd8455d390, type "already locked"

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.535657752
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84726bb0x00007fedd84726bb/??/??:0/
0x5615a367da2e0x00005615a367da2e/test_mutex+0x27e (.text)//home/folkert/Projects/lock_tracer/test.c:109:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.535536519
took0.283us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84721c70x00007fedd84721c7/??/??:0/
0x5615a367da1e0x00005615a367da1e/test_mutex+0x26e (.text)//home/folkert/Projects/lock_tracer/test.c:105:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.535590139
took0.143us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84721c70x00007fedd84721c7/??/??:0/
0x5615a367da260x00005615a367da26/test_mutex+0x276 (.text)//home/folkert/Projects/lock_tracer/test.c:107:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

mutex 0x7ffd8455d390, type "not locked"

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.536025028
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367da3e0x00005615a367da3e/test_mutex+0x28e (.text)//home/folkert/Projects/lock_tracer/test.c:111:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.536084923
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367da460x00005615a367da46/test_mutex+0x296 (.text)//home/folkert/Projects/lock_tracer/test.c:112:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.536127132
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367da4e0x00005615a367da4e/test_mutex+0x29e (.text)//home/folkert/Projects/lock_tracer/test.c:114:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

mutex 0x7ffd8455d420, type "not locked"

first

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:18.35831552
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367d9740x00005615a367d974/test_mutex+0x1c4 (.text)//home/folkert/Projects/lock_tracer/test.c:99:3/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

next

Mistake count: 175947 (total number of backtraces seen; note that the list below is de-duplicated).

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:18.36026859
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367d9740x00005615a367d974/test_mutex+0x1c4 (.text)//home/folkert/Projects/lock_tracer/test.c:99:3/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

first

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:18.35794505
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367d96c0x00005615a367d96c/test_mutex+0x1bc (.text)//home/folkert/Projects/lock_tracer/test.c:98:3/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

next

Mistake count: 175947 (total number of backtraces seen; note that the list below is de-duplicated).

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:18.35999687
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367d96c0x00005615a367d96c/test_mutex+0x1bc (.text)//home/folkert/Projects/lock_tracer/test.c:98:3/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

first

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:18.35880072
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367d97c0x00005615a367d97c/test_mutex+0x1cc (.text)//home/folkert/Projects/lock_tracer/test.c:20:25/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

next

Mistake count: 175947 (total number of backtraces seen; note that the list below is de-duplicated).

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:18.36066712
took0.000us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84727330x00007fedd8472733/??/??:0/
0x5615a367d97c0x00005615a367d97c/test_mutex+0x1cc (.text)//home/folkert/Projects/lock_tracer/test.c:20:25/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

5. still locked mutexes

A list of the mutexes that were still locked when the program terminated.

Count: 2

mutex 0x7ffd8455d390

The following location did not unlock:

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.536198587
took0.174us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84721c70x00007fedd84721c7/??/??:0/
0x5615a367da560x00005615a367da56/test_mutex+0x2a6 (.text)//home/folkert/Projects/lock_tracer/test.c:116:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

mutex 0x7ffd8455d3c0

The following location did not unlock:

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.536252876
took0.353us
call trace
0x7fedd8471d620x00007fedd8471d62/??/??:0/
0x7fedd84721c70x00007fedd84721c7/??/??:0/
0x5615a367da620x00005615a367da62/test_mutex+0x2b2 (.text)//home/folkert/Projects/lock_tracer/test.c:117:2/
0x5615a367d3d10x00005615a367d3d1/main+0x11 (.text)//home/folkert/Projects/lock_tracer/test.c:201:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

6. r/w-lock lock/unlock mistakes

Mistakes are: read-locking a r/w-lock another time by the same thread, unlocking r/w-locks that are not locked and unlocking of an r/w-lock by some other thread than the one who locked it.

This section contains a list of all the seen r/w-lock/error-type combinations and then for each the mistakes made and then one or more backtraces ("first" and "next") where they occured.

Count: 2

r/w-lock 0x7ffd8455d430, type "already locked"

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702294116
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd847289e0x00007fedd847289e/??/??:0/
0x5615a367dc330x00005615a367dc33/test_try_lock+0x63 (.text)//home/folkert/Projects/lock_tracer/test.c:163:2/
0x5615a367d3df0x00005615a367d3df/main+0x1f (.text)//home/folkert/Projects/lock_tracer/test.c:205:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702342638
took0.082us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd84729880x00007fedd8472988/??/??:0/
0x5615a367dc4e0x00005615a367dc4e/test_try_lock+0x7e (.text)//home/folkert/Projects/lock_tracer/test.c:168:2/
0x5615a367d3df0x00005615a367d3df/main+0x1f (.text)//home/folkert/Projects/lock_tracer/test.c:205:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

r/w-lock 0x7ffd8455d440, type "not locked"

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702120240
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8472bf30x00007fedd8472bf3/??/??:0/
0x5615a367db7b0x00005615a367db7b/test_rwlock+0x8b (.text)//home/folkert/Projects/lock_tracer/test.c:144:2/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702236748
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8472bf30x00007fedd8472bf3/??/??:0/
0x5615a367dbab0x00005615a367dbab/test_rwlock+0xbb (.text)//home/folkert/Projects/lock_tracer/test.c:152:1/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702200333
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8472bf30x00007fedd8472bf3/??/??:0/
0x5615a367db9b0x00005615a367db9b/test_rwlock+0xab (.text)//home/folkert/Projects/lock_tracer/test.c:150:2/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702217176
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8472bf30x00007fedd8472bf3/??/??:0/
0x5615a367dba30x00005615a367dba3/test_rwlock+0xb3 (.text)//home/folkert/Projects/lock_tracer/test.c:151:2/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702140682
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8472bf30x00007fedd8472bf3/??/??:0/
0x5615a367db830x00005615a367db83/test_rwlock+0x93 (.text)//home/folkert/Projects/lock_tracer/test.c:146:2/
0x5615a367d3d80x00005615a367d3d8/main+0x18 (.text)//home/folkert/Projects/lock_tracer/test.c:203:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

7. still locked rwlocks

A list of the r/w-locks that were still locked when the program terminated.

Count: 1

rwlock 0x7ffd8455d430

One of the following locations did not unlock:

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702264110
took0.048us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd8471c590x00007fedd8471c59/??/??:0/
0x5615a367dc2b0x00005615a367dc2b/test_try_lock+0x5b (.text)//home/folkert/Projects/lock_tracer/test.c:162:2/
0x5615a367d3df0x00005615a367d3df/main+0x1f (.text)//home/folkert/Projects/lock_tracer/test.c:205:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702294116
took0.000us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd847289e0x00007fedd847289e/??/??:0/
0x5615a367dc330x00005615a367dc33/test_try_lock+0x63 (.text)//home/folkert/Projects/lock_tracer/test.c:163:2/
0x5615a367d3df0x00005615a367d3df/main+0x1f (.text)//home/folkert/Projects/lock_tracer/test.c:205:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

tid89812
thread nametest-mutex
timestamp2021-12-20 11:41:29.702342638
took0.082us
call trace
0x7fedd84716fd0x00007fedd84716fd/??/??:0/
0x7fedd84729880x00007fedd8472988/??/??:0/
0x5615a367dc4e0x00005615a367dc4e/test_try_lock+0x7e (.text)//home/folkert/Projects/lock_tracer/test.c:168:2/
0x5615a367d3df0x00005615a367d3df/main+0x1f (.text)//home/folkert/Projects/lock_tracer/test.c:205:2/
0x7fedd8248fd00x00007fedd8248fd0/__libc_start_call_main+0x80 (.text)/../sysdeps/nptl/libc_start_call_main.h:58:16/
0x7fedd824907d0x00007fedd824907d/__libc_start_main@@GLIBC_2.34+0x7d (.text)/../csu/libc-start.c:128:20/
0x5615a367d4550x00005615a367d455/_start+0x25 (.text)/??:0/

8. where are locks used

0x00005615a3680040/test (.bss)/??:0/
0x00007fedd8471d62/??/??:0/
0x00007ffd8455d390/??/??:0/
0x00007fedd8471d62/??/??:0/
0x00007ffd8455d3c0/??/??:0/
0x00007fedd8471d62/??/??:0/
0x00007ffd8455d3f0/??/??:0/
0x00007fedd8471d62/??/??:0/
0x00007ffd8455d400/??/??:0/
0x00007fedd8471d62/??/??:0/
0x00007ffd8455d420/??/??:0/
0x00007fedd8471d62/??/??:0/
0x00007ffd8455d430/??/??:0/
0x00007fedd84716fd/??/??:0/
0x00007ffd8455d440/??/??:0/
0x00007fedd84716fd/??/??:0/

9. which locks might be correlated

%3 0x5615a3680040 0x5615a3680040 0x7fedd82001a0 0x7fedd82001a0 0x5615a3680040--0x7fedd82001a0 0x7fedd820aa80 0x7fedd820aa80 0x5615a3680040--0x7fedd820aa80 0x7ffd8455d3c0 0x7ffd8455d3c0 0x5615a3680040--0x7ffd8455d3c0 0x7ffd8455d390 0x7ffd8455d390 0x5615a3680040--0x7ffd8455d390 0x7ffd8455d440 0x7ffd8455d440 0x5615a3680040--0x7ffd8455d440 0x7ffd8455d420 0x7ffd8455d420 0x5615a3680040--0x7ffd8455d420 0x7ffd8455d430 0x7ffd8455d430 0x5615a3680040--0x7ffd8455d430 0x7ffd8455d400 0x7ffd8455d400 0x5615a3680040--0x7ffd8455d400 0x7ffd8455d3f0 0x7ffd8455d3f0 0x5615a3680040--0x7ffd8455d3f0 0x7fedd8204398 0x7fedd8204398 0x5615a3680040--0x7fedd8204398 0x7fedd82001a0--0x7fedd820aa80 0x7fedd82001a0--0x7ffd8455d3c0 0x7fedd82001a0--0x7ffd8455d390 0x7fedd82001a0--0x7ffd8455d440 0x7fedd82001a0--0x7ffd8455d420 0x7fedd82001a0--0x7ffd8455d430 0x7fedd82001a0--0x7ffd8455d400 0x7fedd82001a0--0x7ffd8455d3f0 0x7fedd82001a0--0x7fedd8204398 0x7fedd820aa80--0x7ffd8455d3c0 0x7fedd820aa80--0x7ffd8455d390 0x7fedd820aa80--0x7ffd8455d440 0x7fedd820aa80--0x7ffd8455d420 0x7fedd820aa80--0x7ffd8455d430 0x7fedd820aa80--0x7ffd8455d400 0x7fedd820aa80--0x7ffd8455d3f0 0x7ffd8455d3c0--0x7ffd8455d440 0x7ffd8455d3c0--0x7ffd8455d420 0x7ffd8455d3c0--0x7ffd8455d430 0x7ffd8455d3c0--0x7ffd8455d400 0x7ffd8455d3c0--0x7ffd8455d3f0 0x7ffd8455d390--0x7ffd8455d3c0 0x7ffd8455d390--0x7ffd8455d440 0x7ffd8455d390--0x7ffd8455d420 0x7ffd8455d390--0x7ffd8455d430 0x7ffd8455d390--0x7ffd8455d400 0x7ffd8455d390--0x7ffd8455d3f0 0x7ffd8455d420--0x7ffd8455d440 0x7ffd8455d420--0x7ffd8455d430 0x7ffd8455d430--0x7ffd8455d440 0x7ffd8455d400--0x7ffd8455d440 0x7ffd8455d400--0x7ffd8455d420 0x7ffd8455d400--0x7ffd8455d430 0x7ffd8455d3f0--0x7ffd8455d440 0x7ffd8455d3f0--0x7ffd8455d420 0x7ffd8455d3f0--0x7ffd8455d430 0x7ffd8455d3f0--0x7ffd8455d400 0x7fedd8204398--0x7fedd820aa80 0x7fedd8204398--0x7ffd8455d3c0 0x7fedd8204398--0x7ffd8455d390 0x7fedd8204398--0x7ffd8455d440 0x7fedd8204398--0x7ffd8455d420 0x7fedd8204398--0x7ffd8455d430 0x7fedd8204398--0x7ffd8455d400 0x7fedd8204398--0x7ffd8455d3f0