da-viper wrote:
I have updated the test to be consistent, The feature (breakpoint on multiple
threads) is flaky itself not `dap` when the computer is stressed.
The second thread does not have a stop reason.
<details open>
<summary>
```sh
# stressed with
stress --cpu 14 --io 2 --vm 2 --vm-bytes 10G
# ran the lldb test suite at the same time
```
</summary>
```sh
(lldb) target create "build/test"
Current executable set to '/buildbot/test_process/build/test' (x86_64).
(lldb) b my_add
breakpoint set --name 'my_add'
Breakpoint 1: where = test`my_add(int, int) + 10 at test.cpp:27:10, address =
0x000000000000305a
(lldb) r
Process 2986656 launched: '/buildbot/test_process/build/test' (x86_64)
Process 2986656 stopped
* thread #3, name = 'test', stop reason = breakpoint 1.1
frame #0: 0x000055555555705a test`my_add(a=4, b=5) at test.cpp:27:10
24 pseudo_barrier_t g_barrier;
25
26 static int my_add(int a, int b) { // breakpoint
-> 27 return a + b;
28 }
29
30 static void do_test() {
(lldb) bt all
thread backtrace all
thread #1, name = 'test'
frame #0: 0x00007ffff78ac772 libc.so.6`__syscall_cancel_arch_end at
syscall_cancel.S:56
frame #1: 0x00007ffff78a00ac
libc.so.6`__internal_syscall_cancel(a1=<unavailable>, a2=<unavailable>,
a3=<unavailable>, a4=<unavailable>, a5=<unavailable>, a6=<unavailable>, nr=202)
at cancellation.c:49:12
frame #2: 0x00007ffff78a0807
libc.so.6`__futex_abstimed_wait_common64(private=<unavailable>,
futex_word=<unavailable>, expected=<unavailable>, op=<unavailable>,
abstime=<unavailable>, cancel=true) at futex-internal.c:57:12 [inlined]
frame #3: 0x00007ffff78a07fc
libc.so.6`__futex_abstimed_wait_common(futex_word=<unavailable>,
expected=<unavailable>, clockid=<unavailable>, abstime=<unavailable>,
private=<unavailable>, cancel=true) at futex-internal.c:87:9 [inlined]
frame #4: 0x00007ffff78a07ec
libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=<unavailable>,
expected=<unavailable>, clockid=<unavailable>, abstime=<unavailable>,
private=<unavailable>) at futex-internal.c:139:10
frame #5: 0x00007ffff78a5c1c
libc.so.6`__pthread_clockjoin_ex(threadid=140737345746624,
thread_return=0x0000000000000000, clockid=0, abstime=0x0000000000000000,
block=<unavailable>) at pthread_join_common.c:108:14
frame #6: 0x00007ffff7cf25f3 libstdc++.so.6`std::thread::join() + 35
frame #7: 0x0000555555556b6e test`do_test() at test.cpp:45:6
frame #8: 0x0000555555556b1b test`main(argc=1, argv=0x00007fffffffdd68) at
test.cpp:50:3
frame #9: 0x00007ffff782a575
libc.so.6`__libc_start_call_main(main=(test`main at test.cpp:49), argc=1,
argv=0x00007fffffffdd68) at libc_start_call_main.h:58:16
frame #10: 0x00007ffff782a628
libc.so.6`__libc_start_main_impl(main=(test`main at test.cpp:49), argc=1,
argv=0x00007fffffffdd68, init=<unavailable>, fini=<unavailable>,
rtld_fini=<unavailable>, stack_end=0x00007fffffffdd58) at libc-start.c:360:3
frame #11: 0x0000555555556a35 test`_start + 37
thread #2, name = 'test'
frame #0: 0x0000555555556f85
test`std::__atomic_base<int>::load(this=0x0000555555559d94, __m=seq_cst) const
at atomic_base.h:497:10 [inlined]
frame #1: 0x0000555555556f82
test`do_test()::$_0::operator()(this=0x000055555556c328) const at test.cpp:36:5
frame #2: 0x0000555555556f45 test`void std::__invoke_impl<void,
do_test()::$_0>((null)=__invoke_other @ 0x00007ffff77fedbf,
__f=0x000055555556c328) at invoke.h:63:14
frame #3: 0x0000555555556f05
test`std::__invoke_result<do_test()::$_0>::type
std::__invoke<do_test()::$_0>(__fn=0x000055555556c328) at invoke.h:98:14
frame #4: 0x0000555555556edd test`void
std::thread::_Invoker<std::tuple<do_test()::$_0>>::_M_invoke<0ul>(this=0x000055555556c328,
(null)=_Index_tuple<0UL> @ 0x00007ffff77fedff) at std_thread.h:303:13
frame #5: 0x0000555555556eb5
test`std::thread::_Invoker<std::tuple<do_test()::$_0>>::operator()(this=0x000055555556c328)
at std_thread.h:310:11
frame #6: 0x0000555555556e29
test`std::thread::_State_impl<std::thread::_Invoker<std::tuple<do_test()::$_0>>>::_M_run(this=0x000055555556c320)
at std_thread.h:255:13
frame #7: 0x00007ffff7cf2584 libstdc++.so.6`___lldb_unnamed_symbol_f2570 +
20
frame #8: 0x00007ffff78a3d64 libc.so.6`start_thread(arg=<unavailable>) at
pthread_create.c:448:8
frame #9: 0x00007ffff79373fc libc.so.6`__clone3 at clone3.S:78
* thread #3, name = 'test', stop reason = breakpoint 1.1
* frame #0: 0x000055555555705a test`my_add(a=4, b=5) at test.cpp:27:10
frame #1: 0x00005555555573d2
test`do_test()::$_1::operator()(this=0x000055555556c488) const at test.cpp:42:5
frame #2: 0x00005555555572d5 test`void std::__invoke_impl<void,
do_test()::$_1>((null)=__invoke_other @ 0x00007ffff6ffddbf,
__f=0x000055555556c488) at invoke.h:63:14
frame #3: 0x0000555555557295
test`std::__invoke_result<do_test()::$_1>::type
std::__invoke<do_test()::$_1>(__fn=0x000055555556c488) at invoke.h:98:14
frame #4: 0x000055555555726d test`void
std::thread::_Invoker<std::tuple<do_test()::$_1>>::_M_invoke<0ul>(this=0x000055555556c488,
(null)=_Index_tuple<0UL> @ 0x00007ffff6ffddff) at std_thread.h:303:13
frame #5: 0x0000555555557245
test`std::thread::_Invoker<std::tuple<do_test()::$_1>>::operator()(this=0x000055555556c488)
at std_thread.h:310:11
frame #6: 0x00005555555571b9
test`std::thread::_State_impl<std::thread::_Invoker<std::tuple<do_test()::$_1>>>::_M_run(this=0x000055555556c480)
at std_thread.h:255:13
frame #7: 0x00007ffff7cf2584 libstdc++.so.6`___lldb_unnamed_symbol_f2570 +
20
frame #8: 0x00007ffff78a3d64 libc.so.6`start_thread(arg=<unavailable>) at
pthread_create.c:448:8
frame #9: 0x00007ffff79373fc libc.so.6`__clone3 at clone3.S:78
(lldb)
```
</details>
https://github.com/llvm/llvm-project/pull/179689
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits