-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[C++][CI] Enable libSegFault for C++ tests #32399
Comments
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou: class TrapOnTimeoutGuard {
public:
explicit TrapOnTimeoutGuard(double seconds) {
auto fut = finished_;
bg_thread_ = std::thread([fut, seconds]() {
if (!fut.Wait(seconds)) {
psnip_trap();
}
});
}
~TrapOnTimeoutGuard() {
finished_.MarkFinished();
bg_thread_.join();
}
private:
Future<> finished_ = Future<>::Make();
std::thread bg_thread_;
}; cc @westonpace |
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou:
|
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou: |
Even if it's ugly, this is more or less what GDB itself does to suspend all threads when pausing execution: a single thread in the tracee receives SIGTRAP or SIGINT, to which GDB then responds by sending SIGSTOP to all the other threads. I'm not sure it's possible to do better |
Antoine Pitrou / @pitrou: I'll add that pthread_kill() expects a POSIX thread id but |
Ben Kietzman / @bkietz: |
Antoine Pitrou / @pitrou: |
Ben Kietzman / @bkietz:
|
Automatic traceback generation using gdb on CI was done in PR #43937, closing |
Adding libSegFault.so could make it easier to diagnose CI failures. It will print a backtrace on segfault.
This will give a backtrace like this on segfault:
Caveats:
Reporter: David Li / @lidavidm
Note: This issue was originally created as ARROW-17093. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: