From 812733205fa6c62c6ea6ec1d4229c9d6abd60131 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Thu, 8 Nov 2012 23:06:38 +0100 Subject: [PATCH] Add notes about debug thread to development docs. --- docs/changes.rst | 2 +- docs/development.rst | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index 594b5496..a36ee180 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -88,7 +88,7 @@ backends: - Added support for search by filename to local backend. -- Added optional background thread for debuging deadlocks. When the feature is +- Added optional background thread for debugging deadlocks. When the feature is enabled via the ``--debug-thread`` or ``settings.DEBUG_THREAD`` a ``SIGUSR1`` signal will dump the traceback for all running threads. diff --git a/docs/development.rst b/docs/development.rst index 6cab7bf1..00a1d46a 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -284,6 +284,17 @@ Using this setup you can now run Mopidy with ``PROFILE=silent,spotify mopidy`` if you for instance want to test Spotify without any actual audio output. +Debugging deadlocks +=================== + +Between the numerous pykka threads and gstreamer interactions there can +sometimes be a potential for deadlocks. In an effort to make these slightly +simpler to debug ``settings.DEBUG_THREAD`` or ``--debug-thread`` +can be used to turn on an extra debug thread. This thread is not linked to +the regular program flow, and it's only task is to dump traceback showing +the other threads state when we get a ``SIGUSR1``. + + Writing documentation =====================