Re: valgrind on Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 15, 2023 at 10:10:24PM -0800, Gordon Messmer wrote:
> I'm working on reducing memory use in packagekitd, and so far
> progress has been very good.  I've opened 4 memory-related PRs
> against PackageKit and libdnf this week, and locally I've reduced
> memory use at idle by almost 90% (I can reliably cause stock
> packagekitd to use ~ 700MB of RAM in a couple of minutes, but a
> patched version will free most of its memory and shrink to around
> 75MB.)
> 
> However, I've hit a possibly minor road block.  I haven't fixed all
> of the leaks originally reported; valgrind still reports some leaks
> in my patched builds, but most of the call stack is unresolved, so I
> can't locate the problems in order to address any remaining issues.
> 
> I'm running 'valgrind --leak-check=full --num-callers=25
> /usr/libexec/packagekitd', running for a while, and then exiting
> with Ctrl-C.  When I exit, I get a list of leaks, most of which
> contain unresolved symbols.  I see the same thing when I run
> Fedora's builds (in which case, debug info appears to be provided by
> debuginfod-client), or when I run my own builds (in which case I'm
> installing the debuginfo and debugsource packages produced by the
> local build.)
> 
> Does anyone have any hints for improving the information I get from
> valgrind?

Just wanted to report that valgrind works very well for me in Fedora
if you have correct debuginfo installed (or debuginfod).  I use it
very regularly.

Also want to mention that your valgrind command line is ... a little
naive.  Many other options are useful.  Here's what we use in nbdkit:

  https://gitlab.com/nbdkit/nbdkit/-/blob/a5f804180240aea7031470cb8ed294f904268f0a/wrapper.c#L206-216

(Best to check each of these options in the manual before using)

Also make use of suppressions:

  https://gitlab.com/nbdkit/nbdkit/-/tree/master/valgrind

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux