From: Tony Asleson <tasleson@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - lvmdbusd: Add SIGUSR2 to dump flight recorder
Date: Mon, 19 Sep 2022 15:57:53 +0000 (GMT) [thread overview]
Message-ID: <20220919155753.566063858C56@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b3d8366ff21ee69380ab5fbca48204212a64a0cd
Commit: b3d8366ff21ee69380ab5fbca48204212a64a0cd
Parent: 05f7fa5a8536d37b6a711ac0baab5bfd105bb0cc
Author: Tony Asleson <tasleson@redhat.com>
AuthorDate: Tue Aug 9 17:44:10 2022 -0500
Committer: Tony Asleson <tasleson@redhat.com>
CommitterDate: Fri Sep 16 10:49:36 2022 -0500
lvmdbusd: Add SIGUSR2 to dump flight recorder
---
daemons/lvmdbusd/main.py | 1 +
daemons/lvmdbusd/utils.py | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/daemons/lvmdbusd/main.py b/daemons/lvmdbusd/main.py
index 7b455052e..5e6f72cdc 100644
--- a/daemons/lvmdbusd/main.py
+++ b/daemons/lvmdbusd/main.py
@@ -77,6 +77,7 @@ def install_signal_handlers():
signal_add(GLib.PRIORITY_HIGH, signal.SIGHUP, utils.handler, signal.SIGHUP)
signal_add(GLib.PRIORITY_HIGH, signal.SIGINT, utils.handler, signal.SIGINT)
signal_add(GLib.PRIORITY_HIGH, signal.SIGUSR1, utils.handler, signal.SIGUSR1)
+ signal_add(GLib.PRIORITY_HIGH, signal.SIGUSR2, utils.handler, signal.SIGUSR2)
else:
log_error("GLib.unix_signal_[add|add_full] are NOT available!")
diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py
index d24a34935..a10fa7864 100644
--- a/daemons/lvmdbusd/utils.py
+++ b/daemons/lvmdbusd/utils.py
@@ -346,8 +346,12 @@ def dump_threads_stackframe():
# noinspection PyUnusedLocal
def handler(signum):
try:
+ # signal 10
if signum == signal.SIGUSR1:
dump_threads_stackframe()
+ # signal 12
+ elif signum == signal.SIGUSR2:
+ cfg.blackbox.dump()
else:
cfg.run.value = 0
log_debug('Exiting daemon with signal %d' % signum)
reply other threads:[~2022-09-19 15:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220919155753.566063858C56@sourceware.org \
--to=tasleson@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.