Bug 442480 - Cannot run heaptrack on recently built (dwarf-v5?) binaries
Summary: Cannot run heaptrack on recently built (dwarf-v5?) binaries
Status: RESOLVED FIXED
Alias: None
Product: Heaptrack
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Milian Wolff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-15 15:13 UTC by nyanpasu64
Modified: 2022-09-30 11:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2021-09-15 15:13:36 UTC
SUMMARY
Heaptrack cannot properly profile recently built packages on Arch Linux.

STEPS TO REPRODUCE
1. sudo pacman -S heaptrack
2. heaptrack ls

OBSERVED RESULT

The application fails to run, with the following output:

heaptrack output will be written to "/home/nyanpasu64/tmp/heaptrack/heaptrack.ls.506884.zst"
starting application, this might take some time...
heaptrack.ls.506884.zst  heaptrack.plasmashell.1813141.zst
/build/heaptrack/src/heaptrack-1.2.0/src/interpret/heaptrack_interpret.cpp:351 ERROR:Failed to create backtrace state for module /usr/lib/libstdc++.so.6: unrecognized DWARF version in .debug_info at 6 / Success (error code 0)
/build/heaptrack/src/heaptrack-1.2.0/src/interpret/heaptrack_interpret.cpp:351 ERROR:Failed to create backtrace state for module /usr/lib/libgcc_s.so.1: unrecognized DWARF version in .debug_info at 6 / Success (error code 0)
Heaptrack finished! Now run the following to investigate the data:

  heaptrack --analyze "/home/nyanpasu64/tmp/heaptrack/heaptrack.ls.506884.zst"

EXPECTED RESULT

The application runs.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.14.2-zen1-2-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2

ADDITIONAL INFORMATION

According to https://www.spinics.net/lists/fedora-devel/msg283759.html, "unrecognized DWARF version in .debug_info at 6" means the binary is built using dwarf-v5 which libbacktrace doesn't understand.
Comment 1 nyanpasu64 2021-09-15 15:19:39 UTC
This may have the same cause as Qt Creator crashing when debugging with gdb and displaying the stack trace of a Qt application, with an error similar to that of https://www.cygwin.com/bugzilla/show_bug.cgi?id=26549.
Comment 2 Milian Wolff 2021-09-18 23:01:44 UTC
the latest git should have this fixed, please try that