mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
src: disable abseil deadlock detection
Abseil deadlock detection is reporting false positives in tests. Disable it for now. PR-URL: https://github.com/nodejs/node/pull/57582 Refs: https://github.com/nodejs/node-v8/issues/301 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
parent
3db54912fa
commit
78af51cfe6
4 changed files with 17 additions and 0 deletions
2
node.gyp
2
node.gyp
|
@ -834,6 +834,7 @@
|
|||
'deps/googletest/googletest.gyp:gtest_prod',
|
||||
'deps/histogram/histogram.gyp:histogram',
|
||||
'deps/nbytes/nbytes.gyp:nbytes',
|
||||
'tools/v8_gypfiles/abseil.gyp:abseil',
|
||||
'node_js2c#host',
|
||||
],
|
||||
|
||||
|
@ -1159,6 +1160,7 @@
|
|||
'deps/googletest/googletest.gyp:gtest_main',
|
||||
'deps/histogram/histogram.gyp:histogram',
|
||||
'deps/nbytes/nbytes.gyp:nbytes',
|
||||
'tools/v8_gypfiles/abseil.gyp:abseil',
|
||||
],
|
||||
|
||||
'includes': [
|
||||
|
|
|
@ -119,6 +119,8 @@
|
|||
#include <unistd.h> // STDIN_FILENO, STDERR_FILENO
|
||||
#endif
|
||||
|
||||
#include "absl/synchronization/mutex.h"
|
||||
|
||||
// ========== global C++ headers ==========
|
||||
|
||||
#include <cerrno>
|
||||
|
@ -1211,6 +1213,11 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
|
|||
|
||||
if (!(flags & ProcessInitializationFlags::kNoInitializeV8)) {
|
||||
V8::Initialize();
|
||||
|
||||
// Disable absl deadlock detection in V8 as it reports false-positive cases.
|
||||
// TODO(legendecas): Replace this global disablement with case suppressions.
|
||||
// https://github.com/nodejs/node-v8/issues/301
|
||||
absl::SetMutexDeadlockDetectionMode(absl::OnDeadlockCycle::kIgnore);
|
||||
}
|
||||
|
||||
if (!(flags & ProcessInitializationFlags::kNoInitializeCppgc)) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "node_test_fixture.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "cppgc/platform.h"
|
||||
|
||||
ArrayBufferUniquePtr NodeZeroIsolateTestFixture::allocator{nullptr, nullptr};
|
||||
|
@ -31,6 +32,11 @@ void NodeTestEnvironment::SetUp() {
|
|||
v8::V8::SetFlagsFromString("--no-freeze-flags-after-init");
|
||||
|
||||
v8::V8::Initialize();
|
||||
|
||||
// Disable absl deadlock detection in V8 as it reports false-positive cases.
|
||||
// TODO(legendecas): Replace this global disablement with case suppressions.
|
||||
// https://github.com/nodejs/node-v8/issues/301
|
||||
absl::SetMutexDeadlockDetectionMode(absl::OnDeadlockCycle::kIgnore);
|
||||
}
|
||||
|
||||
void NodeTestEnvironment::TearDown() {
|
||||
|
|
|
@ -277,6 +277,8 @@
|
|||
'<(ABSEIL_ROOT)/absl/synchronization/internal/waiter.h',
|
||||
'<(ABSEIL_ROOT)/absl/synchronization/internal/waiter_base.h',
|
||||
'<(ABSEIL_ROOT)/absl/synchronization/internal/waiter_base.cc',
|
||||
'<(ABSEIL_ROOT)/absl/synchronization/internal/win32_waiter.h',
|
||||
'<(ABSEIL_ROOT)/absl/synchronization/internal/win32_waiter.cc',
|
||||
'<(ABSEIL_ROOT)/absl/synchronization/mutex.h',
|
||||
'<(ABSEIL_ROOT)/absl/synchronization/mutex.cc',
|
||||
'<(ABSEIL_ROOT)/absl/time/civil_time.h',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue