upstart user session leaks all the dbus events it receives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Unity |
Fix Released
|
Medium
|
Marco Trevisan (Treviño) | ||
7.2 |
Fix Released
|
Medium
|
Marco Trevisan (Treviño) | ||
unity (Ubuntu) |
Fix Released
|
Medium
|
Marco Trevisan (Treviño) | ||
Trusty |
Fix Released
|
Medium
|
Stephen M. Webb | ||
upstart (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The unity-panel-service process has been caching D-Bus messages sent from upstart, effectively leaking memory. The solution replaces the offending code with a single upstart event emission.
[Test Case]
0. Make sure there is a user session job with a dbus rule (eg unity-greeter-
1. Install and run system-
2. Set the update interval to 100ms
3. Now watch the memory use of init --user increase by 100kb per second
4. Also open up upstart-monitor to see all the dbus messages being sent
[Regression Potential]
Some kind of hidden functionality depending on upstart events sent through D-Bus to the unity-panel-service may have become disconnected. Unlikely.
[Other Info]
The fix for Ubuntu 14.04 LTS was cherry picked from the Ubuntu "Vivid Vervet" dev release where it has been in regular use for some time without apparent regression.
Related branches
- Andrea Azzarone (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 226 lines (+52/-64)5 files modifieddebian/control (+0/-3)
services/CMakeLists.txt (+0/-3)
services/panel-service.c (+48/-54)
tests/CMakeLists.txt (+1/-1)
unity-shared/UpstartWrapper.cpp (+3/-3)
- Christopher Townsend (community): Approve
-
Diff: 228 lines (+53/-65)5 files modifieddebian/control (+1/-4)
services/CMakeLists.txt (+0/-3)
services/panel-service.c (+48/-54)
tests/CMakeLists.txt (+1/-1)
unity-shared/UpstartWrapper.cpp (+3/-3)
description: | updated |
tags: | added: ups |
Changed in unity: | |
importance: | Undecided → Medium |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
milestone: | none → 7.3.1 |
status: | New → In Progress |
Changed in unity (Ubuntu): | |
status: | Confirmed → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
Changed in unity: | |
status: | In Progress → Fix Committed |
Changed in unity (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in unity (Ubuntu Trusty): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Stephen M. Webb (bregma) |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
tags: | added: rls-w-incoming |
So, for some reason I had unity-greeter- session- broadcast installed. This has a user session dbus rule:
start on dbus BUS=system SIGNAL=StartUrl INTERFACE= com.canonical. Unity.Greeter. Broadcast OBJPATH= /com/canonical/ Unity/Greeter/ Broadcast
which is the only dbus rule for my user session. When I removed unity-greeter- session- broadcast, I can no longer see all the dbus messages in upstart-monitor, and init --user doesn't seem to leak any memory.