diff options
author | Jason Molenda <jmolenda@apple.com> | 2024-02-14 10:05:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 10:05:22 -0800 |
commit | dbc40b34617b5ee5d2f82272c8863c602265063c (patch) | |
tree | 0d3dae6a6abcef6355533ec55ffca4418fd893fe /llvm/lib/CodeGen/BasicBlockSections.cpp | |
parent | 630f82ec0c61b772711355fad08ed0d0adce922d (diff) | |
download | llvm-dbc40b34617b5ee5d2f82272c8863c602265063c.zip llvm-dbc40b34617b5ee5d2f82272c8863c602265063c.tar.gz llvm-dbc40b34617b5ee5d2f82272c8863c602265063c.tar.bz2 |
[lldb] Fix the flakey Concurrent tests on macOS (#81710)
The concurrent tests all do a pthread_join at the end, and
concurrent_base.py stops after that pthread_join and sanity checks that
only 1 thread is running. On macOS, after pthread_join() has completed,
there can be an extra thread still running which is completing the
details of that task asynchronously; this causes testsuite failures.
When this happens, we see the second thread is in
```
frame #0: 0x0000000180ce7700 libsystem_kernel.dylib`__ulock_wake + 8
frame #1: 0x0000000180d25ad4 libsystem_pthread.dylib`_pthread_joiner_wake + 52
frame #2: 0x0000000180d23c18 libsystem_pthread.dylib`_pthread_terminate + 384
frame #3: 0x0000000180d23a98 libsystem_pthread.dylib`_pthread_terminate_invoke + 92
frame #4: 0x0000000180d26740 libsystem_pthread.dylib`_pthread_exit + 112
frame #5: 0x0000000180d26040 libsystem_pthread.dylib`_pthread_start + 148
```
there are none of the functions from the test file present on this
thread.
In this patch, instead of counting the number of threads, I iterate over
the threads looking for functions from our test file (by name) and only
count threads that have at least one of them.
It's a lower frequency failure than the darwin kernel bug causing an
extra step instruction mach exception when hardware
breakpoint/watchpoints are used, but once I fixed that, this came up as
the next most common failure for these tests.
rdar://110555062
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
0 files changed, 0 insertions, 0 deletions