You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we crash due to segfault, we want to print the backtrace
incrementally, frame-by-frame, rather than all at once. This is because
the backtrace call may crash at some problematic frame, in which case we
get no output at all: these are very hard to diagnose.
Instead, introduce an "immediate" mode to backtrace buffer which prints
all appended strings immediately, and add an incremental mode to the
backtrace function which calls ::backtrace repeatedly, increasing the
number of requested frames by 1 each time. If we crash at some frame N
we will have printed all frames 1..N-1 already.
Before this change the backtrace looks like this using the reproducer
in #2697:
```
Backtrace:
```
After it looks like:
```
Backtrace:
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x36ce6a
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x32fbba
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x342d0b
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x35cf6c
/lib/x86_64-linux-gnu/libc.so.6+0x4251f
/lib/x86_64-linux-gnu/libgcc_s.so.1+0x17585
/lib/x86_64-linux-gnu/libc.so.6+0x133bb2
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x36d0d7
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x32fb84
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x32f0e7
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x330281
/lib/x86_64-linux-gnu/libc.so.6+0x4251f
/lib/x86_64-linux-gnu/libgcc_s.so.1+0x14789
/lib/x86_64-linux-gnu/libgcc_s.so.1+0x16f54
/home/tdowns/dev/seastar/build-clang-18/dev/libseastar.so+0x2b98a8
/lib/x86_64-linux-gnu/libgcc_s.so.1+0x173b8
```
Fixes#2710.
Closes#2712
0 commit comments