I've found two ways (which are effectively the same) to workaround the fd leak 
caused by killing an app (comment #18)
 * removing surfaceItem.surface = null; in unity8 SurfaceContainer.qml
 * removing the 3 deleteLater in qtmir session.cpp

Both have the same effect. qtmir's session and mirsurface won't be freed
when the application is killed, just when the user actually swipes down
from the side spread, by doing that the fd leak is gone.

It has two problems:
 * We are delaying freeing memory resources and since the most common 
occurrence of apps being killed is by the OOM, this is not good
 * If you try to restart the app without swiping down from the side spread, 
unity8 will crash because the mir surface item has bad data, i think this could 
be fixed, but the first problem seems strong enough to disqualify these 
solutions.

The workaround seem to imply that something is wrong when the early free
for killed apps is done.

I've read the code and to my non-domain-expert-eye it all seems good.

Valgrind could not find any memory or fd leak either.

Maybe someone from the mir/qtmir fields can have a look at the early
free code for killed apps and see if they see anything wrong?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1495871

Title:
  unity8 leaks file descriptors cause unresponsive ui but power button
  works display

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1495871/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to