Diagnostic patch: add stack trace on SIGQUIT

Eygene Ryabinkin rea at codelabs.ru
Mon Jan 28 19:53:19 UTC 2013


Today at the morning I had faced a weird lockup that most likely was
due to some locking problem: python was waiting in the 'usem' state.
I had no tools to trace the threading state, so I had left this issue
for later investigations, though it isn't reliably reproducible for me.

After some thinking, I had came up with the patch that prints the call
stack for all active threads on SIGQUIT (and tries to dump core, as usual
for SIGQUIT),
  http://codelabs.ru/patches/offlineimap/2013-stack-trace-dump-on-SIGQUIT.diff

This patch isn't the universal tool in its current form, since if the
main thread is busy with waiting for some event, it won't respond to
the signal immediately.  However, if it is not blocked, handler will
print the proper trace that can be useful for own analysis and for
sending such diagnostics to other developers.

Opinions?
-- 
rea



More information about the OfflineIMAP-project mailing list