[Gammaray-commits] [KDAB/GammaRay] cc2d85: Minor: Improve error reporting

Kevin Funk kevin.funk at kdab.com
Thu Mar 6 17:32:00 CET 2014


  Branch: refs/heads/2.0
  Home:   https://github.com/KDAB/GammaRay
  Commit: cc2d85edb63158457c74bdfbb4b793fcca84aad6
      https://github.com/KDAB/GammaRay/commit/cc2d85edb63158457c74bdfbb4b793fcca84aad6
  Author: Kevin Funk <kevin.funk at kdab.com>
  Date:   2014-03-06 (Thu, 06 Mar 2014)

  Changed paths:
    M launcher/launcher.cpp

  Log Message:
  -----------
  Minor: Improve error reporting


  Commit: d92d8f55e8e249a32370dba5178460c5c895374e
      https://github.com/KDAB/GammaRay/commit/d92d8f55e8e249a32370dba5178460c5c895374e
  Author: Kevin Funk <kevin.funk at kdab.com>
  Date:   2014-03-06 (Thu, 06 Mar 2014)

  Changed paths:
    M launcher/launcher.cpp

  Log Message:
  -----------
  Free SHM as soon as we dont need it anymore

If gammaray-client hangs (for whatever reason), it's parent process, the
launcher is still alive and doesn't release the SHM segment it owns. The
same happens when the launcher application crashes -- the SHM segment is
not released.

Each QSHM holds a QSystemSemaphore, and number of accessible semaphores
on a Unix system is very limited (128 is the upper limit).

If you've finally reached this limit, you can't create more SHM segments
and hence cannot start a GammaRay instance anymore.
You end up with this message:

void GammaRay::Launcher::sendProbeSettings() Failed to obtain shared
memory for probe settings: "QSharedMemoryPrivate::initKey: unable to set
key on lock" - error code (QSharedMemory::SharedMemoryError): 7


Compare: https://github.com/KDAB/GammaRay/compare/24e791c2441f...d92d8f55e8e2


More information about the Gammaray-commits mailing list