[MDEV-29568] libelf (specificly libdw) based stack resolver Created: 2022-09-19 Updated: 2024-02-07 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Server |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Daniel Black |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Part of libelf, though packages as libdw (at least in debian). This is the newer version on bfd for stack resolution. From source; https://sourceware.org/elfutils/, "The libraries and backends are dual GPLv2+/LGPLv3+. The utilities are GPLv3+", so staying with the libraries will mean there isn't non-distributable option. init
Resolution; example addr2line.
Using libelf, this integrates with debuginfod (when we run a service), or just rely on distro. |
| Comments |
| Comment by Sergei Golubchik [ 2022-09-22 ] |
|
why? |
| Comment by Daniel Black [ 2022-09-23 ] |
|
addr2line InnoDB stack tracks in bug reports ( The use of bfd isn't there because HAVE_BFD_H is under NOT_FOR_DISTRIBUTION so its not really useful (except for bb which tends to generate good traces). Libdw being GPL2+ is actually distributable and has some hope of providing decent resolution. Being integrated with debuginfod it could pull down a distro (or ours, if we provided a service) debuginfo symbols in the process of creating the stacktrace. |
| Comment by Sergei Golubchik [ 2022-09-26 ] |
|
do you think that broken stack traces are caused by addr2line working (or being used) incorrectly? And that a different resolver would fix it? Do you have any proofs of that? For example, does mariadbd linked with libbfd (yes, not distributable) resolve stacks better? Can you show any case where mariadb+libbfd resolves stacks while mariadb+addr2line fails to? |
| Comment by Marko Mäkelä [ 2024-02-07 ] |
|
man 2 open on Linux mentions the following:
Starting with |