Support stack on Geard embedded server
The Zuul server supports dumping stacktrace by sending a SIGUSR2 signal.
Move the signal registration before the fork of the Gearman embedded
server to make it support the same behavior.
Clarify the relevant documentation to mention the forked process that
supports the embedded Gearman server supports SIGUSR2. Additionally
mentioned the log bucket being used (zuul.stack_dump) which might help
fine tweaking of the logger configuration.
Change-Id: I274cc7aba0eee624aafd3b75de15d6e26bdc8d21
diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst
index 6e9fb05..8a6120d 100644
--- a/doc/source/zuul.rst
+++ b/doc/source/zuul.rst
@@ -1050,9 +1050,11 @@
./tools/zuul-changes.py --review-host=review.openstack.org \
http://zuul.openstack.org/ check 'recheck no bug'
-If you send a SIGUSR2 to the zuul-server process, Zuul will dump a stack
-trace for each running thread into its debug log. This is useful for
-tracking down deadlock or otherwise slow threads.
+If you send a SIGUSR2 to the zuul-server process, or the forked process
+that runs the Gearman daemon, Zuul will dump a stack trace for each
+running thread into its debug log. It is written under the log bucket
+``zuul.stack_dump``. This is useful for tracking down deadlock or
+otherwise slow threads.
When `yappi <https://code.google.com/p/yappi/>`_ (Yet Another Python
Profiler) is available, additional functions' and threads' stats are