Bug 475208 - error: cannot take snapshot before execution has started
Summary: error: cannot take snapshot before execution has started
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: massif (show other bugs)
Version: 3.22 GIT
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Nicholas Nethercote
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-04 10:40 UTC by Fred M
Modified: 2023-10-04 11:12 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred M 2023-10-04 10:40:41 UTC
SUMMARY

By running valgrind memory leak with a heavy application : 
valgrind --tool=massif my_apps &

The detail_snapshot is failing : 
vgdb detailed_snapshot /tmp/massif2023-10-04_12-21-23_0.out
sending command detailed_snapshot /tmp/massif2023-10-04_12-21-23_0.out to pid 1941
error: cannot take snapshot before execution has started

Instead of adding a temporization with "sleep" between the valgrind and vgdb command.
Is there or could it have a function to wait that Valgrind is ready ? 
A blocking/sync wait argument to the vgdb? 
or an option/return vgdb to know everything is ready? I can do the detailed_snapshot.

Regards,
Frédéric 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  ARM / linux
Comment 1 Fred M 2023-10-04 11:12:39 UTC
I workarounded like this : 

sleep 10
vgdb detailed_snapshot my_output.out
while [[ $? != 0 ]]; do
  sleep 60
  vgdb detailed_snapshot my_output.out
done