Segfault while collecting stacktrace with PIKA_WITH_THREAD_STACK_MMAP=OFF
#1316
Labels
effort: 3
A few days of work.
priority: low
Nice to have, but nobody is going to be sad if this is never done.
type: bug
type: feature
When
PIKA_WITH_THREAD_STACK_MMAP
is disabled, the stack trace collection may segfault in a few of the resource partitioner tests (shutdown_suspended_pus
,suspend_thread
,suspend_pool
). This is reproducible in CI with at least clang 15 and 17, and GCC 12 when they usePIKA_WITH_THREAD_STACK_MMAP=OFF
. It's also reproducible locally for me with GCC 14. The failure does not seem to reproduce in debug mode (requires-O1
or higher for failure) or with custom allocators (tested mimalloc, need system for failure).The quickest way to reproduce the failure is with the
shutdown_suspended_pus_test
and running it in a loop or multiple times through ctest:The test should segfault most of the time within a few tens of repetitions.
The backtrace is always:
i.e. comes from libstdc++'s unwind functionality.
A quick test with libunwind (https://www.nongnu.org/libunwind/man/libunwind(3).html, see "Local Unwinding") does not seem to have the same problem, so we could consider adding libunwind support (optional?) for stacktraces.
The text was updated successfully, but these errors were encountered: