Fix race that starts kactivitymanagerd multiple times
ClosedPublic

Authored by davidedmundson on Nov 9 2017, 9:54 AM.

Details

Summary

During plasma startup we have multiple processes using kactivities at
once. The current code looks to see if the bus is active then launched
the executable.

If this happens at once, we end up loading, doing all the
initialisation only for all-but-one of the services to fail to register the name
and then quit.

By using DBus activation, we get that global lock in a very safe way.

This requires a change (a .service file) on the daemon, so a fallback is
provided for 5.11 support

Test Plan

Had just this change.
Killed kactivitymanagerd
Restarted plasmashell. It launched
Made workspace change. Had activities.

Diff Detail

Repository
R6 KActivities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Nov 9 2017, 9:54 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 9 2017, 9:54 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript

bootchart screenshot of the problem (courtesy of apol)

apol added a subscriber: apol.Nov 9 2017, 11:20 AM

+1 I can see the same issue in my bootchart.

src/lib/manager_p.cpp
82

pre Plasma 5.12

apol accepted this revision.Nov 20 2017, 5:03 PM
This revision is now accepted and ready to land.Nov 20 2017, 5:03 PM
This revision was automatically updated to reflect the committed changes.