dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.03k stars 1.55k forks source link

Failures on [vm] Avoid deadlocks when launching subprocesses...[infra] Make `test.py --build` fail fast. #48846

Open alexmarkov opened 2 years ago

alexmarkov commented 2 years ago

There are new test failures on [vm] Avoid deadlocks when launching subprocesses...[infra] Make test.py --build fail fast..

The tests

vm/dart_2/regress_b_216834909_test Crash (expected Pass)

are failing on configurations

dartkp-mac-release-simarm64

Log:

--- Command "vm_compile_to_kernel" (took 20.000311s):
DART_CONFIGURATION=ReleaseSIMARM64 /opt/s/w/ir/pkg/vm/tool/gen_kernel --aot --platform=xcodebuild/ReleaseSIMARM64/vm_platform_strong.dill -o /opt/s/w/ir/xcodebuild/ReleaseSIMARM64/generated_compilations/dartkp-mac-release-simarm64/runtime_tests_vm_dart_2_regress_b_216834909_test/out.dill /opt/s/w/ir/runtime/tests/vm/dart_2/regress_b_216834909_test.dart -Dtest_runner.configuration=dartkp-mac-release-simarm64 --packages=/opt/s/w/ir/.packages -Ddart.vm.product=false

exit code:
0

--- Command "precompiler" (took 03.000585s):
DART_CONFIGURATION=ReleaseSIMARM64 xcodebuild/ReleaseSIMARM64/gen_snapshot --snapshot-kind=app-aot-elf --elf=/opt/s/w/ir/xcodebuild/ReleaseSIMARM64/generated_compilations/dartkp-mac-release-simarm64/runtime_tests_vm_dart_2_regress_b_216834909_test/out.aotsnapshot --loading-unit-manifest=/opt/s/w/ir/xcodebuild/ReleaseSIMARM64/generated_compilations/dartkp-mac-release-simarm64/runtime_tests_vm_dart_2_regress_b_216834909_test/ignored.json -Dtest_runner.configuration=dartkp-mac-release-simarm64 --ignore-unrecognized-flags --packages=/opt/s/w/ir/.packages /opt/s/w/ir/xcodebuild/ReleaseSIMARM64/generated_compilations/dartkp-mac-release-simarm64/runtime_tests_vm_dart_2_regress_b_216834909_test/out.dill

exit code:
0

--- Command "remove_kernel_file" (took 13ms):
DART_CONFIGURATION=ReleaseSIMARM64 rm /opt/s/w/ir/xcodebuild/ReleaseSIMARM64/generated_compilations/dartkp-mac-release-simarm64/runtime_tests_vm_dart_2_regress_b_216834909_test/out.dill

exit code:
0

--- Command "vm" (took 52ms):
DART_CONFIGURATION=ReleaseSIMARM64 xcodebuild/ReleaseSIMARM64/dart_precompiled_runtime -Dtest_runner.configuration=dartkp-mac-release-simarm64 --ignore-unrecognized-flags --packages=/opt/s/w/ir/.packages /opt/s/w/ir/xcodebuild/ReleaseSIMARM64/generated_compilations/dartkp-mac-release-simarm64/runtime_tests_vm_dart_2_regress_b_216834909_test/out.aotsnapshot

exit code:
-6

stderr:
Simulator hit Unimplemented instruction: at 0x108a6b570, last_pc=0x10511afc0

0x108a6b570    e5894855               unknown
sim> ../../runtime/vm/simulator_arm64.cc: 479: error: ReadLine failed
version=2.18.0-edge.d2126a3d5b05889e52d99c1cbf00e96d4eafd017 (be) (Wed Apr 20 13:55:59 2022 +0000) on "macos_simarm64"
pid=9445, thread=8967, isolate_group=main(0x7f94ba01a000), isolate=main(0x7f94ba013000)
isolate_instructions=10505aa50, vm_instructions=105056000
  pc 0x00000001043b66f4 fp 0x00007000038923d0 dart::Profiler::DumpStackTrace(void*)+0x64
  pc 0x00000001041adcc4 fp 0x00007000038924b0 dart::Assert::Fail(char const*, ...) const+0x84
  pc 0x00000001044104b5 fp 0x0000700003892890 dart::SimulatorDebugger::Debug()+0xe95
  pc 0x0000000104412188 fp 0x0000700003892950 dart::Simulator::UnimplementedInstruction(dart::Instr*)+0x48
  pc 0x000000010441177c fp 0x0000700003892a30 dart::Simulator::InstructionDecode(dart::Instr*)+0x28c
  pc 0x000000010441999b fp 0x0000700003892b10 dart::Simulator::Execute()+0x11b
  pc 0x0000000104419cb4 fp 0x0000700003892bd0 dart::Simulator::Call(long long, long long, long long, long long, long long, bool, bool)+0x274
  pc 0x00000001042f07d0 fp 0x0000700003892c80 dart::DartEntry::InvokeCode(dart::Code const&, unsigned long, dart::Array const&, dart::Array const&, dart::Thread*)+0x120
  pc 0x00000001042f0672 fp 0x0000700003892cc0 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0xb2
  pc 0x00000001042f28b2 fp 0x0000700003892d10 dart::DartLibraryCalls::HandleMessage(long long, dart::Instance const&)+0x132
  pc 0x0000000104310e32 fp 0x0000700003892df0 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0x322
  pc 0x000000010431db0d fp 0x0000700003892e60 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x12d
  pc 0x000000010431e21f fp 0x0000700003892eb0 dart::MessageHandler::TaskCallback()+0x1df
  pc 0x000000010442a677 fp 0x0000700003892f30 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x147
  pc 0x000000010442aade fp 0x0000700003892f60 dart::ThreadPool::Worker::Main(unsigned long)+0x6e
  pc 0x00000001043b387f fp 0x0000700003892fb0 dart::ThreadStart(void*)+0x9f
  pc 0x00007fff70fac109 fp 0x0000700003892fd0 _pthread_start+0x94
  pc 0x00007fff70fa7b8b fp 0x0000700003892ff0 thread_start+0xf
-- End of DumpStackTrace
  pc 0x0000000000000000 fp 0x00007f94bb5ffd18 sp 0x0000000000000000 [Optimized] 2191802368
  pc 0x000000010511af6c fp 0x00007f94bb5ffd28 sp 0x00007f94bb5ffd28 [Optimized] FfiTrampoline
  pc 0x000000010511acfc fp 0x00007f94bb5ffd90 sp 0x00007f94bb5ffd38 [Optimized] main
  pc 0x000000010511b3f0 fp 0x00007f94bb5ffdc8 sp 0x00007f94bb5ffda0 [Optimized] main
  pc 0x000000010511b438 fp 0x00007f94bb5ffde0 sp 0x00007f94bb5ffdd8 [Optimized] main
  pc 0x000000010511dcac fp 0x00007f94bb5ffe50 sp 0x00007f94bb5ffdf0 [Optimized] _Closure@0150898.dyn:call
  pc 0x0000000105069bb8 fp 0x00007f94bb5ffe80 sp 0x00007f94bb5ffe60 [Optimized] _delayEntrypointInvocation@1026248.<anonymous closure>
  pc 0x000000010511dcac fp 0x00007f94bb5ffef0 sp 0x00007f94bb5ffe90 [Optimized] _Closure@0150898.dyn:call
  pc 0x00000001050c041c fp 0x00007f94bb5fff18 sp 0x00007f94bb5fff00 [Optimized] _RawReceivePortImpl@1026248._handleMessage@1026248
  pc 0x0000000105058328 fp 0x00007f94bb5ffff0 sp 0x00007f94bb5fff28 [Stub] InvokeDartCode

--- Re-run this test:
python3 tools/test.py -n dartkp-mac-release-simarm64 vm/dart_2/regress_b_216834909_test

https://dart-ci.appspot.com/log/vm-kernel-precomp-mac-release-simarm64/dartkp-mac-release-simarm64/13240/vm/dart_2/regress_b_216834909_test

The test was added in d2126a3d5b05889e52d99c1cbf00e96d4eafd017 and started crashing on vm-kernel-precomp-mac-release-simarm64. @mraleph Could you please take a look?

alexmarkov commented 2 years ago

This test also failed on dartkp-linux-debug-simarm-crossword and dartkp-linux-release-simarm-crossword configurations:

--- Command "vm_compile_to_kernel" (took 31.000565s):
DART_CONFIGURATION=ReleaseSIMARM /b/s/w/ir/pkg/vm/tool/gen_kernel --aot --platform=out/ReleaseSIMARM/vm_platform_strong.dill -o /b/s/w/ir/out/ReleaseSIMARM/generated_compilations/dartkp-linux-release-simarm-crossword/runtime_tests_vm_dart_2_regress_b_216834909_test/out.dill /b/s/w/ir/runtime/tests/vm/dart_2/regress_b_216834909_test.dart -Dtest_runner.configuration=dartkp-linux-release-simarm-crossword --packages=/b/s/w/ir/.packages -Ddart.vm.product=false

exit code:
0

--- Command "precompiler" (took 05.000236s):
DART_CONFIGURATION=ReleaseSIMARM out/ReleaseSIMARM_X64/gen_snapshot --snapshot-kind=app-aot-elf --elf=/b/s/w/ir/out/ReleaseSIMARM/generated_compilations/dartkp-linux-release-simarm-crossword/runtime_tests_vm_dart_2_regress_b_216834909_test/out.aotsnapshot --loading-unit-manifest=/b/s/w/ir/out/ReleaseSIMARM/generated_compilations/dartkp-linux-release-simarm-crossword/runtime_tests_vm_dart_2_regress_b_216834909_test/ignored.json -Dtest_runner.configuration=dartkp-linux-release-simarm-crossword --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/out/ReleaseSIMARM/generated_compilations/dartkp-linux-release-simarm-crossword/runtime_tests_vm_dart_2_regress_b_216834909_test/out.dill

exit code:
0

--- Command "remove_kernel_file" (took 7ms):
DART_CONFIGURATION=ReleaseSIMARM rm /b/s/w/ir/out/ReleaseSIMARM/generated_compilations/dartkp-linux-release-simarm-crossword/runtime_tests_vm_dart_2_regress_b_216834909_test/out.dill

exit code:
0

--- Command "vm" (took 01.000020s):
DART_CONFIGURATION=ReleaseSIMARM out/ReleaseSIMARM/dart_precompiled_runtime -Dtest_runner.configuration=dartkp-linux-release-simarm-crossword --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/out/ReleaseSIMARM/generated_compilations/dartkp-linux-release-simarm-crossword/runtime_tests_vm_dart_2_regress_b_216834909_test/out.aotsnapshot

exit code:
255

stderr:
Unhandled exception:
Invalid argument(s): Failed to load dynamic library 'libffi_test_functions.so': libffi_test_functions.so: cannot open shared object file: No such file or directory
#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:12)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:23)
#2      dlopenPlatformSpecific (file:///b/s/w/ir/tests/ffi/dylib_utils.dart:19)
#3      ffiTestFunctions (file:///b/s/w/ir/runtime/tests/vm/dart_2/regress_b_216834909_test.dart:22)
#4      setAtExit (file:///b/s/w/ir/runtime/tests/vm/dart_2/regress_b_216834909_test.dart)
#5      main (file:///b/s/w/ir/runtime/tests/vm/dart_2/regress_b_216834909_test.dart)
#6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192)

--- Re-run this test:
python3 tools/test.py -n dartkp-linux-release-simarm-crossword vm/dart_2/regress_b_216834909_test

https://dart-ci.appspot.com/log/vm-kernel-precomp-linux-release-simarm_x64/dartkp-linux-release-simarm-crossword/6386/vm/dart_2/regress_b_216834909_test https://dart-ci.appspot.com/log/vm-kernel-precomp-linux-debug-simarm_x64/dartkp-linux-debug-simarm-crossword/6772/vm/dart_2/regress_b_216834909_test

alexmarkov commented 2 years ago

Also fails on dartkp-android-release-arm_x64 configuration:

Stdout:
Unhandled exception:
ProcessException: No such file or directory
  Command: true 
#0      _ProcessImpl._start (dart:io-patch/process_patch.dart:401)
#1      Process.start (dart:io-patch/process_patch.dart:38)
#2      main (file:///b/swarming/w/ir/runtime/tests/vm/dart_2/regress_b_216834909_test.dart:34)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192)
ExitCode: -15
Time: 0:08:00.009125

--- Re-run this test:
python3 tools/test.py -n dartkp-android-release-arm_x64 vm/dart_2/regress_b_216834909_test

https://dart-ci.appspot.com/log/vm-kernel-precomp-android-release-arm_x64/dartkp-android-release-arm_x64/6689/vm/dart_2/regress_b_216834909_test