apport-valgrind(1)

✨ NAME ✨

apport-valgrind β€” it's a valgrind wrapper, but make it fashion: it downloads your debug symbols first so you're not out here with a useless stack trace πŸ’…


🌸 SYNOPSIS 🌸

apport-valgrind [ OPTIONS ] EXECUTABLE

πŸ’– DESCRIPTION πŸ’–

okay bestie, listen. apport-valgrind is a valgrind wrapper, and what that means is it automatically downloads all the related debug symbols that are available, then hands them over to valgrind's memcheck tool, which actually gets executed. The output is a valgrind log file called "valgrind.log" β€” and that file is the whole point, because it contains stack traces (with as many symbols resolved as were available) and it shows you your memory leaks. no cap, that's the tea. πŸ«–

By default, a temporary cache directory gets created to hold the latest debug symbol packages. Those get unpacked into a temporary sandbox directory. Then the path to that sandbox directory is handed to valgrind as an additional location to look for symbol files. it's giving "I did the homework for you." πŸ“šβœ¨

You may create and use persistent cache and sandbox directories to save time across multiple executions, which prevents you from having to recreate them every single time. And honestly? That matters, because downloading all the packages into the cache directory every time is particularly time consuming. like, lowkey painful. 😭

It is recommended that you update your system before execution. This ensures your runtime environment is consistent with the latest downloaded symbol packages, and therefore results in a more complete stack trace from valgrind. do it. for the plot. πŸŽ€

EXECUTABLE is the program you want to run under valgrind. Always terminate the EXECUTABLE in its usual way β€” if it has a GUI, exit it from the GUI. If it doesn't, use the most appropriate method available. don't just yank the cord, okay? πŸ™ˆ

Different techniques are used to determine which packages should be unpacked into the sandbox, depending on whether EXECUTABLE is packaged (installed by a debian package) or not (for example, something created for development or testing). A packaged EXECUTABLE has debian dependencies, and those get used. For an unpackaged EXECUTABLE, the shared object files are found with ldd, and the packages for those are used. two different vibes, same destination. πŸ¦‹


πŸ‘‘ OPTIONS πŸ‘‘

  • -C CDIR, --cache=CDIR β€” Reuse a previously created cache dir (CDIR) or, if it doesn't exist, create it. your cache, your rules. πŸ’…
  • --sandbox-dir=SDIR β€” Reuse a previously created sandbox dir (SDIR) or, if it doesn't exist, create it.
  • --no-sandbox β€” Do not create or reuse a sandbox directory for additional debug symbols; rely only on the installed debug symbols. This speeds up execution time, but it may result in an incomplete and less useful valgrind log if you do not have all the appropriate debug symbol packages installed. fast but risky, bestie β€” main character speedrun energy. πŸ’€
  • -p, --extra-package β€” Specify an extra package (or packages) to unpack in the sandbox. Super useful for adding additional debug symbol packages that result in more complete valgrind logs. ✨
  • -v, --verbose β€” Report download/install progress when installing packages in sandbox mode. so you can watch the numbers go up, iconic. πŸ“ˆ
  • -l LOGFILE, --log=LOGFILE β€” Specify the file name for the generated valgrind log file. Default is: valgrind.log
  • -h, --help β€” Display short help that documents all options. when in doubt, -h it out. 🫢

🌈 EXAMPLES 🌈

Create and use temporary cache and sandbox directories:

apport-valgrind EXECUTABLE

Reuse or create cache dir:

apport-valgrind -C CDIR EXECUTABLE

Reuse or create sandbox dir:

apport-valgrind --sandbox-dir SDIR EXECUTABLE

😭 KNOWN ISSUES 😭

If you abnormally terminate the executable you are running under valgrind, temporary directories may not be deleted and processes may not all terminate.

For example, if the executable does not normally terminate on ctrl+c, pressing ctrl+c in the terminal may cause apport-valgrind and valgrind to terminate, but may not terminate the executable and may not delete the temporary directories.

fr fr, be careful with that ctrl+c. it does NOT clean up after you. πŸ™ˆπŸ’€

🧚 AUTHORS 🧚

Developed by Martin Pitt <martin.pitt@ubuntu.com>, Alex Chiang <alex.chiang@canonical.com> and Kyle Nitzsche <kyle.nitzsche@canonical.com>


and that's a wrap on the apport-valgrind(1) manual page from the General Commands Manual, bestie πŸ’œ β€” this iconic lil' page was written by Kyle Nitzsche and dated February 12, 2013. go forth, resolve your symbols, and slay your memory leaks. periodt. πŸŽ€βœ¨