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.11k stars 1.57k forks source link

New co19/LanguageFeatures/FinalizationRegistry/WeakReference tests are crashing #48364

Open ghost opened 2 years ago

ghost commented 2 years ago

Bots:

Tests:

stderr:
Simulator hit Unimplemented instruction: pc=0x285b654

0x285b654    ec835657               unknown
sim> ../../runtime/vm/simulator_arm.cc: 452: error: ReadLine failed
version=2.17.0-edge.6c494313d716e1156f577e84329c6e3bbb8d1c60 (be) (Thu Feb 10 04:29:17 2022 +0000) on "linux_simarm"
pid=15562, thread=15569, isolate_group=main(0x3c28900), isolate=main(0x3c28d80)
isolate_instructions=213e8a0, vm_instructions=213e8a0
  pc 0x02394429 fp 0xf617e7e8 dart::Profiler::DumpStackTrace(void*)+0x89
  pc 0x0283a4a4 fp 0xf617e808 Dart_DumpNativeStackTrace+0x14
  pc 0x0213e9da fp 0xf617e838 dart::Assert::Fail(char const*, ...) const+0x2a
  pc 0x02403986 fp 0xf617ebe8 dart::SimulatorDebugger::Debug()+0xbc6
  pc 0x02402db8 fp 0xf617ec18 dart::SimulatorDebugger::Stop(dart::Instr*, char const*)+0x28
  pc 0x02406f69 fp 0xf617ece8 dart::Simulator::DecodeType6(dart::Instr*)+0x3b9
  pc 0x0240b386 fp 0xf617edd8 dart::Simulator::Execute()+0x2d6
  pc 0x0240c3bb fp 0xf617ee78 dart::Simulator::Call(int, int, int, int, int, bool, bool)+0x13b
  pc 0x022a88b6 fp 0xf617eee8 dart::DartEntry::InvokeCode(dart::Code const&, unsigned int, dart::Array const&, dart::Array const&, dart::Thread*)+0x116
  pc 0x022a8722 fp 0xf617ef58 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned int)+0x122
  pc 0x022aace2 fp 0xf617efd8 dart::DartLibraryCalls::HandleMessage(long long, dart::Instance const&)+0x192
  pc 0x022d29ca fp 0xf617f0a8 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0x39a
  pc 0x022fae19 fp 0xf617f0f8 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x149
  pc 0x022fb48e fp 0xf617f148 dart::MessageHandler::TaskCallback()+0x1ce
  pc 0x022fb9a7 fp 0xf617f168 out/ReleaseSIMARM/dart+0x1efb9a7
  pc 0x0242014f fp 0xf617f1d8 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0xff
  pc 0x024205ee fp 0xf617f208 dart::ThreadPool::Worker::Main(unsigned int)+0x5e
  pc 0x0238f267 fp 0xf617f2d8 out/ReleaseSIMARM/dart+0x1f8f267
  pc 0xf7f5a3bd fp 0xf617f3a8 /lib/i386-linux-gnu/libpthread.so.0+0x63bd
-- End of DumpStackTrace
  pc 0x00000000 fp 0x04b3de24 sp 0x00000000 [Optimized] -70762496
  pc 0xf742e624 fp 0x04b3de44 sp 0x04b3de2c [Optimized] FfiTrampoline
  pc 0xf742d7ac fp 0x04b3de8c sp 0x04b3de4c [Unoptimized] _CallocAllocator@21435018.allocate
  pc 0xf742ceec fp 0x04b3deb8 sp 0x04b3de94 [Unoptimized] main
  pc 0xf742cdc4 fp 0x04b3decc sp 0x04b3dec0 [Unoptimized] main
  pc 0xf742ccd4 fp 0x04b3defc sp 0x04b3ded4 [Unoptimized] _Closure@0150898.dyn:call
  pc 0xf742b5e8 fp 0x04b3df18 sp 0x04b3df04 [Unoptimized] _delayEntrypointInvocation@1026248.<anonymous closure>
  pc 0xf742b2d4 fp 0x04b3df4c sp 0x04b3df20 [Unoptimized] _Closure@0150898.dyn:call
  pc 0xf742a814 fp 0x04b3df74 sp 0x04b3df54 [Unoptimized] _RawReceivePortImpl@1026248._handleMessage@1026248
  pc 0xf7882338 fp 0x04b3dff4 sp 0x04b3df7c [Stub] InvokeDartCode

Introduced in https://dart.googlesource.com/sdk/+/a4da39f702a532b65764ad51a28f2eae43dcbc64

athomas commented 2 years ago

@dcharkes Is this a test issue, by design or an implementation bug?

dcharkes commented 2 years ago

simarm is accounted for:

Precompiled windows, I'll have to debug what's going on:

dartkp-strong-win-release-x64
dartkp-weak-asserts-win-release-x64
dcharkes commented 2 years ago

Ah no wait, Windows precompiled, that is the FFI-linking issue:

These are all known failures with FFI. And these tests use FFI.

dcharkes commented 2 years ago

All the tests that use triggerGC (which uses FFI and the Dart API) should be skipped on:

sgrekhov commented 2 years ago

@athomas I moved all of the tests that use triggerGC (and FFI) to a separate directory and going to skip this directory in a .status files. But we need a roll first. Please do a new roll

sgrekhov commented 2 years ago

@dcharkes what about simarm64c, simriscv32 and simriscv64. Shall these tests be skipped on these architectures as well?