D20078: RFC fix race on kcrash auto-restarts

Harald Sitter noreply at phabricator.kde.org
Wed Mar 27 12:52:54 GMT 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190327/aa85ebb1/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list