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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

added experimental backtrace API #19552

Closed
wants to merge 2 commits into from
Closed

Conversation

jsteemann
Copy link
Contributor

Scope & Purpose

Experimental backtrace API for the threads in an arangod process.

By sending the arangod process a SIGUSR1 signal, it will make all its threads log a backtrace. It does so by enumerating the list of current threads via reading the fds in /proc/<pid>/task and using the tgkill syscall to deliver a SIGUSR2 signal to each thread. When a thread receives a SIGUSR2 signal, it will log its own backtrace to the log.

This functionality is currently only available on Linux. it is highly experimental and may not work in some environments (e.g. libmusl builds).

  • 馃挬 Bugfix
  • 馃崟 New feature
  • 馃敟 Performance improvement
  • 馃敤 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 馃摉 CHANGELOG entry made
  • 馃摎 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.11: -
    • Backport for 3.10: -
    • Backport for 3.9: -

Related Information

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

by sending the arangod process a SIGUSR1 signal, it will make all its
threads log a backtrace. it does so by enumerating the list of current
threads via reading the fds in `/proc/<pid>/task` and using the `tgkill`
syscall to deliver a SIGUSR2 signal to each thread.
when a thread receives a SIGUSR2 signal, it will log its own backtrace
to the log.

this functionality is currently only available on Linux. it is highly
experimental and may not work in some environments (e.g. libmusl
builds).
@jsteemann jsteemann added this to the devel milestone Aug 9, 2023
@cla-bot cla-bot bot added the cla-signed label Aug 9, 2023
Copy link
Contributor

@dothebart dothebart left a comment

Choose a reason for hiding this comment

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

I like!

@jsteemann jsteemann marked this pull request as ready for review August 9, 2023 14:23
Copy link
Contributor

@MBkkt MBkkt left a comment

Choose a reason for hiding this comment

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

@jsteemann jsteemann marked this pull request as draft December 19, 2023 23:01
@jsteemann
Copy link
Contributor Author

Closing this PR in favor of proper safer tools such as eu-stack.

@jsteemann jsteemann closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants