I see your point, but something is up. All other 7 threads are at the exact stacktrace I showed above, all at the Enter function of my barrier. Only the 8th is waiting for this synch!!!
Here's everything:
```
GNU gdb (Ubuntu 10.1-2ubuntu2) 10.1.90.20210411-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<
https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<
http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 168806
[New LWP 168807]
[New LWP 168808]
[New LWP 168809]
[New LWP 168810]
[New LWP 168811]
[New LWP 168812]
[New LWP 168813]
0x00007f3622094237 in syscall_ready ()
0x7f362236da00 <gdb_priv_cmds>: "add-symbol-file '/work/mewais/DCArch/DCSim/Build//libDCSClient.so' 0x00007f35de07eb40\nadd-symbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/lib64/release/libdynamorio.so' 0x00007f3621f979e0\nadd-sy"...
0x7f362236dac8 <gdb_priv_cmds+200>: "mbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/ext/lib64/release/libdrwrap.so' 0x00007f35de3cbd90\nadd-symbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/ext/lib64/release/libdrmgr.so' 0x00007f"...
0x7f362236db90 <gdb_priv_cmds+400>: "35de5d84c0\nadd-symbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/ext/lib64/release/libdrutil.so' 0x00007f35de7eb4e0\nadd-symbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/ext/lib64/release/libd"...
0x7f362236dc58 <gdb_priv_cmds+600>: "rx.so' 0x00007f35de9f2c80\nadd-symbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/ext/lib64/release/libdrreg.so' 0x00007f35debff770\nadd-symbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/ext/lib6"...
0x7f362236dd20 <gdb_priv_cmds+800>: "4/release/libdrsyms.so' 0x00007f35dee12650\nadd-symbol-file '/lib/x86_64-linux-gnu/libc.so.6' 0x00007f3621b74650\nadd-symbol-file '/usr/lib64/ld-linux-x86-64.so.2' 0x00007f3621eea090\nadd-symbol-file '/l"...
0x7f362236dde8 <gdb_priv_cmds+1000>: "ib/x86_64-linux-gnu/libstdc++.so.6' 0x00007f36217c02e0\nadd-symbol-file '/lib/x86_64-linux-gnu/libm.so.6' 0x00007f3621da93c0\nadd-symbol-file '/lib/x86_64-linux-gnu/libgcc_s.so.1' 0x00007f3621d815e0\n"
0x7f362236deae <gdb_priv_cmds+1198>: ""
0x7f362236deaf <gdb_priv_cmds+1199>: ""
Loading gdb scripts for debugging DynamoRIO...
(gdb) add-symbol-file '/work/mewais/DCArch/DCSim/Build//libDCSClient.so' 0x00007f35de07eb40
add symbol table from file "/work/mewais/DCArch/DCSim/Build//libDCSClient.so" at
.text_addr = 0x7f35de07eb40
Reading symbols from /work/mewais/DCArch/DCSim/Build//libDCSClient.so...
(gdb) add-symbol-file '/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/lib64/release/libdynamorio.so' 0x00007f3621f979e0
add symbol table from file "/tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/lib64/release/libdynamorio.so" at
.text_addr = 0x7f3621f979e0
Reading symbols from /tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/lib64/release/libdynamorio.so...
Reading symbols from /tools/DynamoRIO/DynamoRIO-Linux-8.0.0-1/lib64/release/libdynamorio.so.debug...
Loading gdb scripts for debugging DynamoRIO...
(gdb) thread 1
[Switching to thread 1 (LWP 168806)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x00007f355deffac0 in ?? ()
#2 0x00007f362200f239 in dr_thread_yield () at /home/travis/build/DynamoRIO/dynamorio/core/lib/instrument.c:5053
#3 0x00007f35de199afd in DCS::EVENT::DynamicEntryExitBarrier::Enter (this=this@entry=0x7f35de3a06a0) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:102
#4 0x00007f35de19ac49 in DCS::EVENT::SimulateEvents (phase_end_cycle=2000) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:138
#5 0x00007f35de19f631 in DCS::CORE::Scheduler::SimulatePhase (this=0x7f355dfebdb0) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Scheduler.cpp:104
#6 0x00007f35de1a6b88 in DCS::CORE::Simple::BasicBlock (this=0x7f355dfec210, thread=<optimized out>, address=<optimized out>, bb=0x7f355df4ede0) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Simple.cpp:67
#7 0x00007f35df0921ad in ?? ()
#8 0x0000000000000007 in ?? ()
#9 0x00007f361df57010 in ?? ()
#10 0x00007ffe8f01e0e0 in ?? ()
#11 0x00007f355df4a720 in ?? ()
#12 0x0000000000000000 in ?? ()
(gdb) thread 2
[Switching to thread 2 (LWP 168807)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x00007f355df9c280 in ?? ()
#2 0x00007f362200f239 in dr_thread_yield () at /home/travis/build/DynamoRIO/dynamorio/core/lib/instrument.c:5053
#3 0x00007f35de199afd in DCS::EVENT::DynamicEntryExitBarrier::Enter (this=this@entry=0x7f35de3a06a0) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:102
#4 0x00007f35de19ac49 in DCS::EVENT::SimulateEvents (phase_end_cycle=2000) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:138
#5 0x00007f35de19f631 in DCS::CORE::Scheduler::SimulatePhase (this=0x7f355df8edf0) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Scheduler.cpp:104
#6 0x00007f35de1a6b88 in DCS::CORE::Simple::BasicBlock (this=0x7f355df976a0, thread=<optimized out>, address=<optimized out>, bb=0x7f355e823bf8) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Simple.cpp:67
#7 0x00007f35df0e3b4d in ?? ()
#8 0x00007f361df520c4 in ?? ()
#9 0x0000000000000001 in ?? ()
#10 0x00007f3621318dc0 in ?? ()
#11 0x00007f355e536720 in ?? ()
#12 0x00007f361df6b140 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb) thread 3
[Switching to thread 3 (LWP 168808)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x00007f355e4faa80 in ?? ()
#2 0x00007f362200f239 in dr_thread_yield () at /home/travis/build/DynamoRIO/dynamorio/core/lib/instrument.c:5053
#3 0x00007f35de199afd in DCS::EVENT::DynamicEntryExitBarrier::Enter (this=this@entry=0x7f35de3a06a0) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:102
#4 0x00007f35de19ac49 in DCS::EVENT::SimulateEvents (phase_end_cycle=2000) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:138
#5 0x00007f35de19f631 in DCS::CORE::Scheduler::SimulatePhase (this=0x7f355dff6e70) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Scheduler.cpp:104
#6 0x00007f35de1a6b88 in DCS::CORE::Simple::BasicBlock (this=0x7f355dff74f0, thread=<optimized out>, address=<optimized out>, bb=0x7f355e5fd640) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Simple.cpp:67
#7 0x00007f35df1132bd in ?? ()
#8 0x00007f361df6b0e0 in ?? ()
#9 0x0000000000000008 in ?? ()
#10 0x00007f3620b17e30 in ?? ()
#11 0x00007f355e573720 in ?? ()
#12 0x00007f361df6b138 in ?? ()
#13 0x00007f361dfe5800 in ?? ()
#14 0x0000000000000000 in ?? ()
(gdb) thread 4
[Switching to thread 4 (LWP 168809)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x00007f355e504180 in ?? ()
#2 0x00007f362200f239 in dr_thread_yield () at /home/travis/build/DynamoRIO/dynamorio/core/lib/instrument.c:5053
#3 0x00007f35de199afd in DCS::EVENT::DynamicEntryExitBarrier::Enter (this=this@entry=0x7f35de3a06a0) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:102
#4 0x00007f35de19ac49 in DCS::EVENT::SimulateEvents (phase_end_cycle=2000) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:138
#5 0x00007f35de19f631 in DCS::CORE::Scheduler::SimulatePhase (this=0x7f355dff9600) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Scheduler.cpp:104
#6 0x00007f35de1a6b88 in DCS::CORE::Simple::BasicBlock (this=0x7f355dff9c80, thread=<optimized out>, address=<optimized out>, bb=0x7f355e686568) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Simple.cpp:67
#7 0x00007f35df15ae11 in ?? ()
#8 0x00007f3620317948 in ?? ()
#9 0x0000000000000000 in ?? ()
(gdb) thread 5
[Switching to thread 5 (LWP 168810)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x00007f355e507640 in ?? ()
#2 0x00007f362200f239 in dr_thread_yield () at /home/travis/build/DynamoRIO/dynamorio/core/lib/instrument.c:5053
#3 0x00007f35de199afd in DCS::EVENT::DynamicEntryExitBarrier::Enter (this=this@entry=0x7f35de3a06a0) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:102
#4 0x00007f35de19ac49 in DCS::EVENT::SimulateEvents (phase_end_cycle=2000) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:138
#5 0x00007f35de19f631 in DCS::CORE::Scheduler::SimulatePhase (this=0x7f355dffa330) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Scheduler.cpp:104
#6 0x00007f35de1a6b88 in DCS::CORE::Simple::BasicBlock (this=0x7f355dffa9b0, thread=<optimized out>, address=<optimized out>, bb=0x7f355e6b2898) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Simple.cpp:67
#7 0x00007f35df172a39 in ?? ()
#8 0x0000000000000000 in ?? ()
(gdb) thread 6
[Switching to thread 6 (LWP 168811)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x00007f355e501400 in ?? ()
#2 0x00007f362200f239 in dr_thread_yield () at /home/travis/build/DynamoRIO/dynamorio/core/lib/instrument.c:5053
#3 0x00007f35de199afd in DCS::EVENT::DynamicEntryExitBarrier::Enter (this=this@entry=0x7f35de3a06a0) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:102
#4 0x00007f35de19ac49 in DCS::EVENT::SimulateEvents (phase_end_cycle=2000) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:138
#5 0x00007f35de19f631 in DCS::CORE::Scheduler::SimulatePhase (this=0x7f355dff88d0) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Scheduler.cpp:104
#6 0x00007f35de1a6b88 in DCS::CORE::Simple::BasicBlock (this=0x7f355dff8f50, thread=<optimized out>, address=<optimized out>, bb=0x7f355e657258) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Simple.cpp:67
#7 0x00007f35df142a0d in ?? ()
#8 0x00007f361df6b140 in ?? ()
#9 0x000000000000004e in ?? ()
#10 0x00007f361f314dc0 in ?? ()
#11 0x00007f355e5a3720 in ?? ()
#12 0x00007f361df6b140 in ?? ()
#13 0x000000000000004e in ?? ()
#14 0x00007f35de3acd02 in ?? ()
#15 0x0000000000000000 in ?? ()
(gdb) thread 7
[Switching to thread 7 (LWP 168812)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x00007f355e4fe340 in ?? ()
#2 0x00007f362200f239 in dr_thread_yield () at /home/travis/build/DynamoRIO/dynamorio/core/lib/instrument.c:5053
#3 0x00007f35de199afd in DCS::EVENT::DynamicEntryExitBarrier::Enter (this=this@entry=0x7f35de3a06a0) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:102
#4 0x00007f35de19ac49 in DCS::EVENT::SimulateEvents (phase_end_cycle=2000) at /work/mewais/DCArch/DCSim/Sources/DCS/Event/Simulation.cpp:138
#5 0x00007f35de19f631 in DCS::CORE::Scheduler::SimulatePhase (this=0x7f355dff7ba0) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Scheduler.cpp:104
#6 0x00007f35de1a6b88 in DCS::CORE::Simple::BasicBlock (this=0x7f355dff8220, thread=<optimized out>, address=<optimized out>, bb=0x7f355e62b898) at /work/mewais/DCArch/DCSim/Sources/DCS/Cores/Simple.cpp:67
#7 0x00007f35df12aa39 in ?? ()
#8 0x0000000000000000 in ?? ()
(gdb) thread 8
[Switching to thread 8 (LWP 168813)]
#0 0x00007f3622094237 in syscall_ready ()
(gdb) where
#0 0x00007f3622094237 in syscall_ready ()
#1 0x0000000000000000 in ?? ()
(gdb) n
Single stepping until exit from function syscall_ready,
which has no line number information.
os_thread_sleep (milliseconds=<optimized out>) at /home/travis/build/DynamoRIO/dynamorio/core/unix/os.c:3495
3495 /home/travis/build/DynamoRIO/dynamorio/core/unix/os.c: No such file or directory.
(gdb) n
check_wait_at_safe_spot (dcontext=dcontext@entry=0x7f355e47c2c0, cur_state=cur_state@entry=THREAD_SYNCH_VALID_MCONTEXT) at /home/travis/build/DynamoRIO/dynamorio/core/synch.c:723
723 /home/travis/build/DynamoRIO/dynamorio/core/synch.c: No such file or directory.
(gdb) where
#0 check_wait_at_safe_spot (dcontext=dcontext@entry=0x7f355e47c2c0, cur_state=cur_state@entry=THREAD_SYNCH_VALID_MCONTEXT) at /home/travis/build/DynamoRIO/dynamorio/core/synch.c:723
#1 0x00007f3621fbd453 in dispatch_enter_fcache (targetf=0x7f355e5eb768, dcontext=0x7f355e47c2c0) at /home/travis/build/DynamoRIO/dynamorio/core/dispatch.c:436
#2 d_r_dispatch (dcontext=0x7f355e47c2c0) at /home/travis/build/DynamoRIO/dynamorio/core/dispatch.c:239
#3 0x00007f35de3ac445 in ?? ()
#4 0x0000000000000000 in ?? ()
(gdb)
```