Bug 487639 - heaptrack_gui fails to parse generated report
Summary: heaptrack_gui fails to parse generated report
Status: RESOLVED WORKSFORME
Alias: None
Product: Heaptrack
Classification: Applications
Component: general (show other bugs)
Version: 1.3.0
Platform: Debian stable Linux
: NOR major
Target Milestone: ---
Assignee: Milian Wolff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-27 17:58 UTC by ILIA
Modified: 2024-06-28 03:48 UTC (History)
0 users

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


Attachments
heaptrack_gui error (124.22 KB, image/png)
2024-05-27 17:58 UTC, ILIA
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ILIA 2024-05-27 17:58:16 UTC
Created attachment 169883 [details]
heaptrack_gui error

SUMMARY
heaptrack_gui fails to part the generated report

STEPS TO REPRODUCE
1. Run a docker container(base image docker.io/debian:bookworm-slim)
2. Attach to an already running process `heaptrack --pid 7`
3. Wait for a couple of minutes
4. heaptrack output file is already generated
5. Without killing the original process, send SIGINT to the heaptrack process
6. Even after a couple of minutes, `heaptrack_interpret ` continues to run and the output file still receive updates(which is not expected, I believe)
7. After sending SIGINT to the heaptrack_interpret process, it is not stopped, so sending SIGKILL only helps.
8. Download the heaptrack output file and open in heaptrack_gui. I used UTM with Debian 11 running on MacOS.

OBSERVED RESULT
heaptrack_gui is unable to parse the file(screenshot attached)

EXPECTED RESULT
The file is parsed

SOFTWARE/OS VERSIONS
heaptrack report collected on:
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

heaptrack_gui OS:
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
Comment 1 Milian Wolff 2024-05-27 19:58:46 UTC
is docker important for reproducing this? when I try this locally it just works as expected. I fear you'll have to debug this on your end so we can see where it fails.

terminal 1:
```
$ heaptrack -p $(pidof kwrite)
heaptrack output will be written to "/tmp/heaptrack.kwrite.27448.zst"
injecting heaptrack into application via GDB, this might take some time...
NOTE: heaptrack detected DEBUGINFOD_URLS but will disable it to prevent 
unintended network delays during recording
If you really want to use DEBUGINFOD, export HEAPTRACK_ENABLE_DEBUGINFOD=1
injection finished
```

terminal 2:
```
$ ps aux | grep heap
milian     27448  0.0  0.0   8048  5412 pts/0    S+   21:56   0:00 /bin/sh /mnt/data1/milian/compiled/other/bin/heaptrack -p 27411
...
$ kill 27448
```

terminal 1:
```
removing heaptrack injection via GDB, this might take some time...
heaptrack stats:
        allocations:            82
        leaked allocations:     7
        temporary allocations:  31
Heaptrack finished! Now run the following to investigate the data:

  heaptrack --analyze "/tmp/heaptrack.kwrite.27448.zst"

heaptrack_gui detected, automatically opening the file...
```

does it work when you use 'ctrl+c' directly to send the signal to the whole process group instead of just the bash script individually?

do you see any output on the CLI when sending the signal?
Comment 2 Milian Wolff 2024-05-27 19:59:01 UTC
need more info
Comment 3 Milian Wolff 2024-05-27 19:59:45 UTC
Oh, maybe simply update to heaptrack 1.4 or 1.5 if you are running 1.3?
Comment 4 ILIA 2024-05-27 20:41:31 UTC
Updating to the latest version of heaptrack_gui helped, thank you!
Comment 5 ILIA 2024-05-28 07:49:32 UTC
Btw, even after updating to the latest heaptrack version, Ctrl+C/SIGINT shutdowns the heaptrack's process only and heaptract_interpret continues to run. Is that expected?
Comment 6 Milian Wolff 2024-05-28 20:41:42 UTC
I cannot reproduce that either. Initially after attaching I have heaptrack + heaptrack_interpret. Then I Ctrl+C which closes heaptrack_interpret and instead heaptrack_gui is opened up. If I then Ctrl+C again both heaptrack and heaptrack_gui are gone.

What shell do you use?
Comment 7 ILIA 2024-05-29 10:50:27 UTC
Standard `/bin/bash`. OS: Debian 11 and 12.
Comment 8 ILIA 2024-05-29 10:52:45 UTC
When I attach to a running process, 'Ctrl+C' shutdowns the heaptrack process only, and no output is shown in the terminal, which appears only when heaptrack_interpret is killed manually later.
Comment 9 Bug Janitor Service 2024-06-13 03:47:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2024-06-28 03:48:03 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!