Skip to content

s390x: illegal instruction in unit tests #47064

Closed
@AdamMajer

Description

Version

19.6.0

Platform

No response

Subsystem

v8

What steps will reproduce the bug?

No response

How often does it reproduce? Is there a required condition?

Every time

What is the expected behavior?

No errors

What do you see instead?

Compiling with mostly default options results in some unit tests failures in file system tests. All these ended up with <Builtins_MulHandler+868> on z13 while running just fine on z15 machine.

For example, when executing test/parallel/test-fs-cp.mjs or test/parallel/test-fs-stat-bigint.js

I've then added --v8-enable-object-print --v8-non-optimized-debug --v8-with-dchecks to the configure and rebuilt. During the build, the following error popped up

Program terminated with signal SIGILL, Illegal instruction.
#0  0x000002aa411276a8 in Builtins_MulHandler () at ../../deps/v8/src/builtins/cast.tq:72
72      ../../deps/v8/src/builtins/cast.tq: No such file or directory.
[Current thread is 1 (Thread 0x3ffa92f2840 (LWP 19049))]
(gdb) bt
#0  0x000002aa411276a8 in Builtins_MulHandler () at ../../deps/v8/src/builtins/cast.tq:72
#1  0x000002aa40f20d86 in Builtins_InterpreterEntryTrampoline () at ../../deps/v8/src/builtins/torque-internal.tq:236
PC not saved

which points to,

@export
macro IsHeapNumber(o: HeapObject): bool {
return Is(o);
}

And additionally adding --v8-enable-short-builtin-calls to the configure, I get an error in the macro assembler for s390 where unreachable code is apparently reached.

#
# Fatal error in ../deps/v8/src/codegen/s390/macro-assembler-s390.cc, line 500
# unreachable code
#
#
#
#FailureMessage Object: 0x3ffcf8fbbf0
 1: 0x2aa3ca2386a  [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 2: 0x2aa3db0125e V8_Fatal(char const*, int, char const*, ...) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 3: 0x2aa3d612d38 v8::internal::TurboAssembler::Call(v8::internal::Handle<v8::internal::Code>, v8::internal::RelocInfo::Mode, v8::internal::Condition) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 4: 0x2aa3d72d8f6 v8::internal::baseline::BaselineCompiler::Prologue() [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 5: 0x2aa3d734a42 v8::internal::baseline::BaselineCompiler::GenerateCode() [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 6: 0x2aa3d735624 v8::internal::GenerateBaselineCode(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 7: 0x2aa3ccc70dc v8::internal::Compiler::CompileSharedWithBaseline(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 8: 0x2aa3ccc99a2 v8::internal::Compiler::CompileBaseline(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
 9: 0x2aa3d719d3c v8::internal::baseline::BaselineBatchCompiler::EnqueueFunction(v8::internal::Handle<v8::internal::JSFunction>) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
10: 0x2aa3cdfc9f6 v8::internal::TieringManager::OnInterruptTick(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::CodeKind) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
11: 0x2aa3d950cc4  [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
12: 0x2aa3d95166c v8::internal::Runtime_BytecodeBudgetInterrupt_Ignition(int, unsigned long*, v8::internal::Isolate*) [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]
13: 0x2aa3c7cc610  [/home/abuild/rpmbuild/BUILD/node-v19.6.0/out/Release/node_mksnapshot]

Additional information

Looking at the logs, the failures in the unit tests started with 19.3.0 and 19.1.0 was last version where everything worked. This seems to point to v8 update then as possible culprit.

#45230

Metadata

Assignees

No one assigned

    Labels

    s390Issues and PRs related to the s390 architecture.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions