nodejs / build

Better build and test infra for Node.
505 stars 165 forks source link

node-test-commit-linux-as-shared-lib build is failing #3619

Open richardlau opened 8 months ago

richardlau commented 8 months ago

node-test-commit-linux-as-shared-lib has been broken since 5 Jan 2024.

It looks to be a fairly consistent compilation failure in turboshaft in V8.

e.g. https://ci.nodejs.org/job/node-test-commit-linux-as-shared-lib/nodes=ubuntu1804-64/2087/console ```console 07:13:47 ccache g++-8 -o /home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o ../deps/v8/src/compiler/turboshaft/assembler.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DNODE_OPENSSL_HAS_QUIC' '-DICU_NO_USER_DATA_OVERRIDE' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_THREADS' '-DV8_TARGET_ARCH_X64' '-DV8_HAVE_TARGET_OS' '-DV8_TARGET_OS_LINUX' '-DV8_EMBEDDER_STRING="-node.12"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION' '-DV8_SHORT_BUILTIN_CALLS' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ATOMIC_OBJECT_FIELD_WRITES' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DV8_SHARED_RO_HEAP' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_USE_ZLIB' '-DV8_ENABLE_TURBOFAN' '-DV8_ENABLE_WEBASSEMBLY' '-DV8_ENABLE_JAVASCRIPT_PROMISE_HOOKS' '-DV8_ALLOCATION_FOLDING' '-DV8_ALLOCATION_SITE_TRACKING' '-DV8_ADVANCED_BIGINT_ALGORITHMS' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../deps/v8/include -I/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj/gen/generate-bytecode-output-root -I/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj/gen -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -pthread -Wno-unused-parameter -fPIC -Wno-return-type -flax-vector-conversions -Wno-invalid-offsetof -fno-strict-aliasing -m64 -m64 -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++17 -MMD -MF /home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/.deps//home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o.d.raw -c 07:14:03 In file included from ../deps/v8/src/compiler/turboshaft/builtin-call-descriptors.h:12, 07:14:03 from ../deps/v8/src/compiler/turboshaft/assembler.h:26, 07:14:03 from ../deps/v8/src/compiler/turboshaft/assembler.cc:5: 07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h: In member function ‘auto v8::internal::compiler::turboshaft::ExternInternalizeOp::options() const’: 07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h:6181:44: error: cannot deduce template arguments for ‘tuple’ from () 07:14:03 auto options() const { return std::tuple(); } 07:14:03 ^ 07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h: In member function ‘auto v8::internal::compiler::turboshaft::ExternExternalizeOp::options() const’: 07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h:6202:44: error: cannot deduce template arguments for ‘tuple’ from () 07:14:03 auto options() const { return std::tuple(); } 07:14:03 ^ 07:14:03 tools/v8_gypfiles/v8_turboshaft.target.mk:205: recipe for target '/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o' failed 07:14:03 make[2]: *** [/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o] Error 1 07:14:03 make[2]: *** Waiting for unfinished jobs.... ```
targos commented 8 months ago

I think we should change it to run on Ubuntu 22.04. It's using outdated GCC.

richardlau commented 8 months ago

I suspect it's the V8 update from https://github.com/nodejs/node/pull/50115 and the job still building on Ubuntu 18.04 with gcc 8.

I've moved the job to build on ubuntu-2204 (with gcc 11). Test CI: https://ci.nodejs.org/job/node-test-commit-linux-as-shared-lib/2108/nodes=ubuntu2204-64/

richardlau commented 8 months ago

I'm also wondering if we still need this separate job -- it runs:

NODE_TEST_DIR=${HOME}/node-tmp FLAKY_TESTS=$FLAKY_TESTS_MODE CONFIG_FLAGS="--shared" $MAKE run-ci -j $JOBS

e.g.

NODE_TEST_DIR=/home/iojs/node-tmp FLAKY_TESTS=run CONFIG_FLAGS=--shared make run-ci -j 2

which is more or less what the ubuntu2204_sharedlibs_shared_x64 builds from node-test-commit-linux-containered are doing:

NODE_TEST_DIR=${HOME}/node-tmp \
 FLAKY_TESTS=$FLAKY_TESTS_MODE \
 CONFIG_FLAGS="$CONFIG_FLAGS --shared" \
 make run-ci -j $JOBS # --output-sync=target

e.g.

+ NODE_TEST_DIR=/home/iojs/node-tmp
+ FLAKY_TESTS=dontcare
+ CONFIG_FLAGS=' --shared'
+ make run-ci -j 4

where the main difference between the two is treatment of flaky tests.

shipujin commented 7 months ago

node-test-commit-linux-as-shared-lib has been broken since 5 Jan 2024.

It looks to be a fairly consistent compilation failure in turboshaft in V8.

e.g. https://ci.nodejs.org/job/node-test-commit-linux-as-shared-lib/nodes=ubuntu1804-64/2087/console

07:13:47   ccache g++-8 -o /home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o ../deps/v8/src/compiler/turboshaft/assembler.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DNODE_OPENSSL_HAS_QUIC' '-DICU_NO_USER_DATA_OVERRIDE' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_THREADS' '-DV8_TARGET_ARCH_X64' '-DV8_HAVE_TARGET_OS' '-DV8_TARGET_OS_LINUX' '-DV8_EMBEDDER_STRING="-node.12"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION' '-DV8_SHORT_BUILTIN_CALLS' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ATOMIC_OBJECT_FIELD_WRITES' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DV8_SHARED_RO_HEAP' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_USE_ZLIB' '-DV8_ENABLE_TURBOFAN' '-DV8_ENABLE_WEBASSEMBLY' '-DV8_ENABLE_JAVASCRIPT_PROMISE_HOOKS' '-DV8_ALLOCATION_FOLDING' '-DV8_ALLOCATION_SITE_TRACKING' '-DV8_ADVANCED_BIGINT_ALGORITHMS' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../deps/v8/include -I/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj/gen/generate-bytecode-output-root -I/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj/gen -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common  -pthread -Wno-unused-parameter -fPIC -Wno-return-type -flax-vector-conversions -Wno-invalid-offsetof -fno-strict-aliasing -m64 -m64 -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++17 -MMD -MF /home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/.deps//home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o.d.raw   -c
07:14:03 In file included from ../deps/v8/src/compiler/turboshaft/builtin-call-descriptors.h:12,
07:14:03                  from ../deps/v8/src/compiler/turboshaft/assembler.h:26,
07:14:03                  from ../deps/v8/src/compiler/turboshaft/assembler.cc:5:
07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h: In member function ‘auto v8::internal::compiler::turboshaft::ExternInternalizeOp::options() const’:
07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h:6181:44: error: cannot deduce template arguments for ‘tuple’ from ()
07:14:03    auto options() const { return std::tuple(); }
07:14:03                                             ^
07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h: In member function ‘auto v8::internal::compiler::turboshaft::ExternExternalizeOp::options() const’:
07:14:03 ../deps/v8/src/compiler/turboshaft/operations.h:6202:44: error: cannot deduce template arguments for ‘tuple’ from ()
07:14:03    auto options() const { return std::tuple(); }
07:14:03                                             ^
07:14:03 tools/v8_gypfiles/v8_turboshaft.target.mk:205: recipe for target '/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o' failed
07:14:03 make[2]: *** [/home/iojs/build/workspace/node-test-commit-linux-as-shared-lib/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/assembler.o] Error 1
07:14:03 make[2]: *** Waiting for unfinished jobs....

fix patch

--- a/deps/v8/src/compiler/turboshaft/operations.h
+++ b/deps/v8/src/compiler/turboshaft/operations.h
@@ -6178,7 +6178,7 @@ struct ExternInternalizeOp : FixedArityOperationT<1, ExternInternalizeOp> {                                                                 

   void Validate(const Graph& graph) const {}

-  auto options() const { return std::tuple(); }
+  auto options() const { return std::tuple{}; }
 };

 struct ExternExternalizeOp : FixedArityOperationT<1, ExternExternalizeOp> {
@@ -6199,7 +6199,7 @@ struct ExternExternalizeOp : FixedArityOperationT<1, ExternExternalizeOp> {                                                                 

   void Validate(const Graph& graph) const {}

-  auto options() const { return std::tuple(); }
+  auto options() const { return std::tuple{}; }
 };
targos commented 7 months ago

It seems fixed now that we run on ubuntu2204-64

richardlau commented 7 months ago

Yes, the job is fixed -- I still question whether we need to maintain this separate job when we more or less cover what it is testing in one of the node-test-commit-linux-containered variants (*_sharedlibs_shared_x64).

targos commented 7 months ago

_sharedlibs_shared_x64 seems effective to catch regressions. I've been fighting with it in https://github.com/nodejs/node/pull/51362 😄

richardlau commented 3 months ago

I've disabled the job for now. Let's see if anyone complains, otherwise we can delete it (and save a bit of disk space on the ubuntu2204-x64 machines as it would be one less workspace).