Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: call debug stacktrace on SIGUSR1 #2012

Merged
merged 10 commits into from
Oct 20, 2023
Merged

chore: call debug stacktrace on SIGUSR1 #2012

merged 10 commits into from
Oct 20, 2023

Conversation

kostasrim
Copy link
Contributor

@kostasrim kostasrim commented Oct 11, 2023

  • add macro to install a signal handler that prints the contents of debug stacktrace on SIGUSR1
  • add this on regTests

@kostasrim kostasrim self-assigned this Oct 11, 2023
@kostasrim kostasrim force-pushed the add_debug_stacktrace branch from cee013c to 0f7ddf5 Compare October 11, 2023 17:01
@kostasrim kostasrim marked this pull request as ready for review October 13, 2023 13:48
@kostasrim kostasrim requested review from romange and dranikpg October 18, 2023 12:28
@kostasrim kostasrim changed the title chore: call debug stacktrace on sigkill chore: call debug stacktrace on SIGUSR1 Oct 18, 2023
dranikpg
dranikpg previously approved these changes Oct 18, 2023
Comment on lines +159 to +161
# Even worse, on SIGTERM and SIGKILL none of the handlers registered via sigaction
# are guranteed to run
time.sleep(5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it becomes an issue we can just send sigusr unconditionally, however it'll pollute the logs where deadlocking is not an issue

@@ -44,6 +42,13 @@ add_library(dragonfly_lib engine_shard_set.cc channel_store.cc command_registry.
cluster/cluster_family.cc acl/user.cc acl/user_registry.cc acl/acl_family.cc
acl/validator.cc acl/helpers.cc)

cxx_link(dfly_transaction dfly_core strings_lib TRDP::fast_float)

option(PRINT_STACKTRACES_ON_SIGNAL "Enables DF to print all fiber stacktraces on SIGKILL" OFF)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not SIGKILL

@kostasrim kostasrim merged commit 1d02e12 into main Oct 20, 2023
10 checks passed
@kostasrim kostasrim deleted the add_debug_stacktrace branch October 20, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants