[C++] Dump threads on signal
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
This may be wishful thinking but in Java there is a signal handler for SIGQUIT which dumps the equivalent of GDB's "thread apply all bt" to standard out (maybe err).
This is incredibly useful for debugging deadlocks. For example, in the R builds we may be introducing a timeout (ARROW-12143) and if the build times out during a test run we could use this utility to dump what it was trying to do. Otherwise I'm not sure github actions allows ptrace so the gdb route is off the table.
It's also easy enough that users (who might be intimidated by being asked for a core file or attaching gdb) can usually handle it.
Technically speaking, I have no idea if it is possible.
**Reporter**: [Weston Pace](https://issues.apache.org/jira/browse/ARROW-12167) / @westonpace
**Note**: *This issue was originally created as [ARROW-12167](https://issues.apache.org/jira/browse/ARROW-12167). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
No implementation file or test is identified. Start by locating any existing C++ signal-handling or thread-diagnostic entry point, then review the SIGQUIT requirement and the constraints around printing all thread stacks in R builds and GitHub Actions. Done means a usable signal-triggered dump comparable to GDB's "thread apply all bt".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100