Merge lp://staging/~ted/ubuntu-app-launch/lp1495871-unref-context into lp://staging/ubuntu-app-launch/16.04

Proposed by Ted Gould
Status: Superseded
Proposed branch: lp://staging/~ted/ubuntu-app-launch/lp1495871-unref-context
Merge into: lp://staging/ubuntu-app-launch/16.04
Prerequisite: lp://staging/~ted/ubuntu-app-launch/pids-tools
Diff against target: 57 lines (+12/-3)
2 files modified
helpers-shared.c (+11/-2)
libubuntu-app-launch/ubuntu-app-launch.h (+1/-1)
To merge this branch: bzr merge lp://staging/~ted/ubuntu-app-launch/lp1495871-unref-context
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Indicator Applet Developers Pending
Review via email: mp+279321@code.staging.launchpad.net

This proposal supersedes a proposal from 2015-09-16.

This proposal has been superseded by a proposal from 2015-12-07.

Commit message

Ensure all pending events on the context are complete before unref'ing it.

Description of the change

So while we create a context to ensure that we can capture all the events to the CGManager connection it seems that some of those events can get stuck on the context, and they need to get processed to complete. Otherwise they hold onto references of things, and that actually results in a g_spawn getting left around because it never gets free'd. (actually of the context itself, which is a bit confusing, but eh, refcounting is fun)

Also brought in the pid tools branch because it made testing this much, much easier. You can use the ubuntu-app-list-pids tool to cause the FD to be leaked and then see it fixed with something like (assuming you've done ubuntu-app-launch firefox):

valgrind --track-fds=yes ./ubuntu-app-list-pids firefox

Which on trunk will have 6 FDs left over, but with this branch only 5. (which come from globals that we don't control)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
215. By Ted Gould

Merge FTBFS

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches