diff options
author | Dan McGee <dan@archlinux.org> | 2010-08-04 14:03:53 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-08-04 14:06:49 +0200 |
commit | efba7e8ba08a15684d5f5cc24bf813ee53b13a47 (patch) | |
tree | 33137d0fd458b6715dfdf19d33d338c7c55cbf62 /devel | |
parent | 8e1b9a8424eb96df27f13ef61846f884e113a431 (diff) | |
download | archweb-efba7e8ba08a15684d5f5cc24bf813ee53b13a47.tar.gz archweb-efba7e8ba08a15684d5f5cc24bf813ee53b13a47.tar.xz |
reporead: Add ability to generate traceback via signal
Every once in a while we see this command hanging on the main server but it
isn't making any system calls, so it is hard to tell where it is getting
stuck. Add a signal handler on SIGQUIT that will listen and print a
traceback when signaled.
This is the easiest thing to implement; future additions may need to be able
to hook up to a remote debugger (e.g. pdb) if this doesn't work.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/management/commands/reporead.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 21021b3..598c019 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -82,6 +82,10 @@ class Command(BaseCommand): elif v == 2: logger.level = DEBUG + import signal,traceback + signal.signal(signal.SIGQUIT, + lambda sig, stack: traceback.print_stack(stack)) + return read_repo(arch, file, options) |