Mir

Merge lp:~alan-griffiths/mir/fix-fd-leak-thomi-reported into lp:~mir-team/mir/trunk

Proposed by Alan Griffiths
Status: Merged
Approved by: Alexandros Frantzis
Approved revision: no longer in the source branch.
Merged at revision: 727
Proposed branch: lp:~alan-griffiths/mir/fix-fd-leak-thomi-reported
Merge into: lp:~mir-team/mir/trunk
Diff against target: 21 lines (+5/-0)
1 file modified
src/client/mir_surface.cpp (+5/-0)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-fd-leak-thomi-reported
Reviewer Review Type Date Requested Status
Alexandros Frantzis (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+168012@code.launchpad.net

Commit message

client: close surface fds when finished with surface

Description of the change

client: close surface fds when finished with surface

"The mir_stress binary is now built as part of the regular trunk build process. However, the client API seems to be leaking FDs again.

"My plan is to make the stress tests run as part of every merge proposal, which will make regressions such as this impossible to land in the future. However, there's a bit of infrastructure we need to wrangle until that can happen, and I'm on holiday for the next few weeks.

"It would be great if someone familiar with the client API could run the mir-stress tests (run "mir_stress -n 10"), fix the FD leak, and possibly keep an eye on the situation until we manage to get this automated." - thomi

A better command is:

valgrind --track-fds=yes bin/mir_stress -n 10

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/client/mir_surface.cpp'
--- src/client/mir_surface.cpp 2013-06-03 08:14:01 +0000
+++ src/client/mir_surface.cpp 2013-06-07 10:56:53 +0000
@@ -25,6 +25,7 @@
25#include "mir/input/input_platform.h"25#include "mir/input/input_platform.h"
2626
27#include <cassert>27#include <cassert>
28#include <unistd.h>
2829
29namespace geom = mir::geometry;30namespace geom = mir::geometry;
30namespace mcl = mir::client;31namespace mcl = mir::client;
@@ -66,6 +67,10 @@
66 input_thread->stop();67 input_thread->stop();
67 input_thread->join();68 input_thread->join();
68 }69 }
70
71 for (auto i = 0, end = surface.fd_size(); i != end; ++i)
72 close(surface.fd(i));
73
69 release_cpu_region();74 release_cpu_region();
70}75}
7176

Subscribers

People subscribed via source and target branches