Commit dd666a66 authored by Michael Achenbach's avatar Michael Achenbach Committed by V8 LUCI CQ

Revert "[d8] Dump stack trace on d8 tests timeouts on posix systems"

This reverts commit 5592bad9.

Reason for revert:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/45109/overview

Original change's description:
> [d8] Dump stack trace on d8 tests timeouts on posix systems
>
> - Add a SIGTERM handler in d8 that dupms the stack trace
> - Send SIGTERM before SIGKILL in the test runner
>
> Bug: v8:13115
> Change-Id: I75285f33caabab61ff6ae83c1fbc6faf45cf595a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791906
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82173}

Bug: v8:13115
Change-Id: I29f72d67036f76f93043f06841e4236864623bbe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805885Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82176}
parent 229687ba
...@@ -70,10 +70,6 @@ ...@@ -70,10 +70,6 @@
#include "src/utils/utils.h" #include "src/utils/utils.h"
#include "src/web-snapshot/web-snapshot.h" #include "src/web-snapshot/web-snapshot.h"
#if V8_OS_POSIX
#include <signal.h>
#endif // V8_OS_POSIX
#ifdef V8_FUZZILLI #ifdef V8_FUZZILLI
#include "src/d8/cov.h" #include "src/d8/cov.h"
#endif // V8_FUZZILLI #endif // V8_FUZZILLI
...@@ -5519,33 +5515,9 @@ bool HasFlagThatRequiresSharedIsolate() { ...@@ -5519,33 +5515,9 @@ bool HasFlagThatRequiresSharedIsolate() {
return i::FLAG_shared_string_table || i::FLAG_harmony_struct; return i::FLAG_shared_string_table || i::FLAG_harmony_struct;
} }
#ifdef V8_OS_POSIX
void d8_sigterm_handler(int signal) {
// Dump stacktraces when terminating d8 instances with SIGTERM.
// SIGKILL is not intercepted.
if (signal == SIGTERM) {
FATAL("d8: Received SIGTERM signal (likely due to a TIMEOUT)\n");
} else {
UNREACHABLE();
}
}
#endif // V8_OS_POSIX
void d8_install_sigterm_handler() {
#ifdef V8_OS_POSIX
struct sigaction sa;
sa.sa_handler = d8_sigterm_handler;
sigemptyset(&sa.sa_mask);
if (sigaction(SIGTERM, &sa, NULL) == -1) {
FATAL("Could not install SIGTERM handler");
}
#endif // V8_OS_POSIX
}
} // namespace } // namespace
int Shell::Main(int argc, char* argv[]) { int Shell::Main(int argc, char* argv[]) {
d8_install_sigterm_handler();
v8::base::EnsureConsoleOutput(); v8::base::EnsureConsoleOutput();
if (!SetOptions(argc, argv)) return 1; if (!SetOptions(argc, argv)) return 1;
......
...@@ -200,11 +200,6 @@ class PosixCommand(BaseCommand): ...@@ -200,11 +200,6 @@ class PosixCommand(BaseCommand):
def _kill_process(self, process): def _kill_process(self, process):
# Kill the whole process group (PID == GPID after setsid). # Kill the whole process group (PID == GPID after setsid).
# First try a soft term to allow some feedback
os.killpg(process.pid, signal.SIGTERM)
# Give the process some time to cleanly terminate.
time.sleep(0.1)
# Forcefully kill processes.
os.killpg(process.pid, signal.SIGKILL) os.killpg(process.pid, signal.SIGKILL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment