Skip to content

Not a bug: libunwind: aarch64: SIGSEGV signal handler leads to another seg fault #63855

@maxknv

Description

@maxknv

Problem can be 100% reproduced in integration tests on ARM in TCs:

  1. test_crash_log/test.py::test_pkill
  2. test_send_crash_reports/test.py::test_send_segfault

Stack trace:

#0  libunwind::CFI_Parser<libunwind::LocalAddressSpace>::parseFDEInstructions (addressSpace=..., fdeInfo=..., cieInfo=..., upToPC=<optimized out>, arch=<optimized out>, results=<optimized out>)
    at /tmp/ClickHouse/contrib/libunwind/src/DwarfParser.hpp:561
561     /tmp/ClickHouse/contrib/libunwind/src/DwarfParser.hpp: No such file or directory.
[Current thread is 1 (Thread 0xffffa8bae020 (LWP 13297))]
(gdb) bt
#0  libunwind::CFI_Parser<libunwind::LocalAddressSpace>::parseFDEInstructions (addressSpace=..., fdeInfo=..., cieInfo=..., upToPC=<optimized out>, arch=<optimized out>, results=<optimized out>)
    at /tmp/ClickHouse/contrib/libunwind/src/DwarfParser.hpp:561
#1  0x0000aaaae80afa60 in libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::getInfoFromFdeCie (this=0xffff20832370, fdeInfo=..., cieInfo=..., pc=187651014192840, 
    dso_base=187650590556160) at /tmp/ClickHouse/contrib/libunwind/src/UnwindCursor.hpp:1614
#2  libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::getInfoFromDwarfSection (this=0xffff20832370, pc=187651014192840, sects=..., fdeSectionOffsetHint=0)
    at /tmp/ClickHouse/contrib/libunwind/src/UnwindCursor.hpp:1689
#3  libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::setInfoBasedOnIPRegister (this=this@entry=0xffff20832370, isReturnAddress=<optimized out>)
    at /tmp/ClickHouse/contrib/libunwind/src/UnwindCursor.hpp:2592
#4  0x0000aaaae80ae01c in __unw_init_local (cursor=0xffff20832370, context=0xffff208325e0) at /tmp/ClickHouse/contrib/libunwind/src/libunwind.cpp:91
#5  0x0000aaaae80aeed8 in unw_backtrace (buffer=0xffff208328f8, size=45) at /tmp/ClickHouse/contrib/libunwind/src/libunwind.cpp:346
#6  0x0000aaaad654cde8 in StackTrace::tryCapture (this=0xffff208328e8) at /tmp/ClickHouse/src/Common/StackTrace.cpp:347
#7  0x0000aaaad654ccbc in StackTrace::StackTrace (this=0xffff208328e8, signal_context=...) at /tmp/ClickHouse/src/Common/StackTrace.cpp:316
#8  0x0000aaaad6959244 in signalHandler (sig=11, info=0xffff20832da0, context=0xffff20832e20) at /tmp/ClickHouse/src/Daemon/BaseDaemon.cpp:154
#9  <signal handler called>

libunwind fork commit: 40d8eadf96b127d9b22d53ce7a4fc52aaedea965

To reproduce manually (not in tests):

  1. run CH server on Aarch64 linux
  2. kill -SEGV pid
  3. Server crashes with segfault, No crash report will be generated SELECT COUNT(*) FROM system.crash_log ==> 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-build-systemBuild system (CMake, compilation, platform builds).crashCrash / segfault / abort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions