sitter created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. sitter requested review of this revision.
REVISION SUMMARY When kcrash is set to auto restart Unique service processes we have potential for a race. Because KCrash will want to ideally restart through kdeinit it only closes the crashed process' sockets after it issues the restart. Depending on timing the new process may then attempt to register its service name while the crashed process is still holding the name. As a result the new process will not actually start because it'll fail to claim the name. To mitigate this problem, service registration now will wait for a bit iff the service name cannot be registered and it cannot successfully hand over to the registered instance (e.g. the instance is defunct for whatever reason and not responding to dbus calls). Alas, this continues to have some race potential. The problem ultimately is that we do not know why the service name is already registered and also cannot ask the service since its not responding to calls. To further restrict the potential of a race the wait time is increased substantially when the environment variable KCRASH_AUTO_RESTARTED is set. REPOSITORY R271 KDBusAddons BRANCH master REVISION DETAIL https://phabricator.kde.org/D20078 AFFECTED FILES autotests/CMakeLists.txt autotests/deadservicetest.cpp autotests/kdbussimpleservice.cpp src/kdbusservice.cpp To: sitter Cc: kde-frameworks-devel, michaelh, ngraham, bruns