https://bugs.kde.org/show_bug.cgi?id=437571
Bug ID: 437571 Summary: Segfalut when attaching to binary (Ubuntu 20.04 docker) Product: Heaptrack Version: 1.1.0 Platform: Compiled Sources OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: m...@milianw.de Reporter: domaga...@gmail.com Target Milestone: --- I'm getting the Segfault when running heaptrack with attach mode (heaptrack -p) on programs compiled inside docker container (ubuntu 20.04 clang-10, heaptrack 1.1.80 and 1.2.80). I've tested it on pre-compiled programs, such as nano, and it works fine, so I'm guessing I'm doing something wrong. Even as simple program as this will fail: int main(int argc, char** argv) { while(1){ int* a = new int(10); delete a; } return 0; } I've tried to debug the issue (see ADDITIONAL INFORMATION below) but wasn't able to fix the issue. STEPS TO REPRODUCE Not sure whether it's related to my docker container or how I compile things, but anything that I compile and try to run heaptrack on it, will fail. OBSERVED RESULT heaptrack output will be written to "//heaptrack.a.out.17470.gz" injecting heaptrack into application via GDB, this might take some time... The program being debugged was signaled while in a function called from GDB. GDB remains in the frame where the signal was received. To change this behavior use "set unwindonsignal on". Evaluation of the expression containing the function (heaptrack_inject) will be abandoned. When the function is done executing, GDB will silently stop. heaptrack stats: allocations: 0 leaked allocations: 0 temporary allocations: 0 injection finished removing heaptrack injection via GDB, this might take some time... ptrace: No such process. No symbol table is loaded. Use the "file" command. The program is not being run. Heaptrack finished! Now run the following to investigate the data: heaptrack --analyze "//heaptrack.a.out.17470.gz" EXPECTED RESULT SOFTWARE/OS VERSIONS Docker image: Ubuntu 20.04 Compiler: clang-10 or gcc-9.3 heaptrack 1.1.80 and 1.2.80 ADDITIONAL INFORMATION I've tried to debug where exactly it segfaults and it seems that it fails during call to heaptrack_inject, on this line: libheaptrack.cpp:317 s_data = new LockedData(out, stopCallback); and then inside: heaptrack_inject.cpp:94 static void* hook(size_t size) noexcept Let me know if you need any other information. -- You are receiving this mail because: You are watching all bug changes.