Bug 464184 - readlink("/proc/self/exe") failed when debug systemd(pid 1)
Summary: readlink("/proc/self/exe") failed when debug systemd(pid 1)
Status: RESOLVED DUPLICATE of bug 464185
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.16.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-12 09:26 UTC by hguo3
Modified: 2023-01-12 13:03 UTC (History)
1 user (show)

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 hguo3 2023-01-12 09:26:50 UTC
SUMMARY
By the https://github.com/systemd/systemd/issues/2187, I try to debug systemd (pid 1) memory leak  using valgrind.
Kernel boot command is below:
/usr/bin/valgrind --leak-check=full --log-file=/valgrind.out /lib/systemd/systemd

Boot log and result of "/usr/bin/valgrind /lib/systemd/systemd"

OBSERVED RESULT

[   11.653187] /usr/bin/valgrind --leak-check=full --log-file=/valgrind.out /lib/systemd/systemdsh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
sh-4.3# /usr/bin/valgrind /lib/systemd/systemd
valgrind: warning (non-fatal): readlink("/proc/self/exe") failed.
valgrind: continuing, however --trace-children=yes will not work.
--247:0: aspacem Valgrind: FATAL: can't open /proc/self/maps
--247:0: aspacem Exiting now.

EXPECTED RESULT
In this link https://github.com/systemd/systemd/issues/2187, valgrind can debug systemd(pid 1)

SOFTWARE/OS VERSIONS

Linux:  2.6 or yocto dunfell
Comment 1 Mark Wielaard 2023-01-12 13:03:58 UTC
*** This bug has been marked as a duplicate of bug 464185 ***