This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/16719] systemtap runs hold vmlinux file descriptor open
- From: "jlebon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 17 Mar 2014 21:55:23 +0000
- Subject: [Bug runtime/16719] systemtap runs hold vmlinux file descriptor open
- Auto-submitted: auto-generated
- References: <bug-16719-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16719
--- Comment #4 from Jonathan Lebon <jlebon at redhat dot com> ---
(In reply to Josh Stone from comment #1)
> 1-4 could be released for pass 5, and I think we do some, just not all. I
> thought we did release all the dwfl handles, which would include the open
> vmlinux, but I could be wrong (or we could have something like a refcount
> leak).
Good call. That's exactly what's happening here. Those files are kept open by
libdw because their associated Dwfl objects are wrapped in shared_ptrs, and
although build_no_more() reduces the refcount, setupdwfl.cxx also holds its own
reference to it as a caching strategy (see setupdwfl.cxx:75).
Since pass 3 also requires access to those objects, this actually works in our
favour: build_no_more() lowers the refcount, and then we can completely lower
it and free the Dwfl object once pass 3 is completed. The attached patch shows
one straightforward way of doing this, placing it at the end of
translate_pass(). (Is there a better-suited place for this? Maybe in main.cxx's
passes_0_4()?).
--
You are receiving this mail because:
You are the assignee for the bug.