[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Get backtrace from segfault in qemu user mode
From: |
Oliver Smith |
Subject: |
Get backtrace from segfault in qemu user mode |
Date: |
Thu, 13 Aug 2020 18:54:18 +0200 |
Hello,
I'm running the apk package manager from Alpine Linux in an aarch64
chroot with qemu-aarch64 where I can trigger a segfault. I have compiled
apk and qemu with debug symbols, and obtained a coredump.
When I open it with gdb (x86_64), it says:
> Reading symbols from /usr/bin/qemu-aarch64...
>
> warning: core file may not match specified executable file.
> [New LWP 8648]
> [New LWP 8651]
>
> warning: Error reading shared library list entry at 0x8d48308b4864f089
>
> warning: Error reading shared library list entry at 0x9066000000000084
> Unsupported JIT protocol version 2742054296 in descriptor (expected 1)
> Core was generated by `/usr/bin/qemu-aarch64-static /sbin/apk --no-progress
> add --wait 30 --repository'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0 0x00007feca36f5f00 in tcsetattr (fd=-1838678216, act=8, tio=0x0) at
> src/termios/tcsetattr.c:8
> 8 src/termios/tcsetattr.c: No such file or directory.
> [Current thread is 1 (LWP 8648)]
The binary is the same (/usr/bin/qemu-aarch64 in x86_64 env, as mount
--bind to /usr/bin/qemu-aarch64-static in aarch64 chroot).
I'm wondering what exactly crashed here, was it the apk process, or did
qemu crash?
And if apk crashed, I guess I need to extract the "guest memory" of the
apk process inside the qemu process somehow, to load it as coredump in
gdb. If that is the case, how would I extract the "guest memory"?
Some more details, the core dump file and packages with debug symbols
and a failed attempt at using dump-guest-memory.py for this are here:
https://gitlab.com/postmarketOS/pmbootstrap/-/issues/1958
Any help appreciated.
Oliver
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Get backtrace from segfault in qemu user mode,
Oliver Smith <=