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.28k stars 1.58k forks source link

vm/cc/DartAPI_InvokeVMServiceMethod_Loop flaky crashes #59573

Closed rmacnak-google closed 1 day ago

rmacnak-google commented 1 day ago

vm/cc/DartAPI_InvokeVMServiceMethod_Loop is flaky crashing on

vm-linux-debug-ia32 vm-reload-rollback-linux-debug-x64 vm-reload-linux-debug-x64 vm-win-release-arm64 vm-linux-release-arm64 vm-reload-linux-release-x64 vm-linux-debug-x64 vm-reload-rollback-linux-release-x64 vm-linux-release-ia32 vm-win-release-x64 vm-win-debug-x64 vm-linux-release-simarm vm-linux-debug-simriscv64 vm-linux-release-x64

log

mraleph commented 1 day ago

Duplicate of https://github.com/dart-lang/sdk/issues/57096

mraleph commented 1 day ago

See also my comment here: https://dart-review.googlesource.com/c/sdk/+/395521/comment/ff4233b5_e8b2cc1d/

tldr: based on the disassembly around the crash location I think it is crashing because it invocation of Dart_InvokeVMServiceMethod is racing with the Dart VM shutdown. I think the actual crash might be caused by my refactoring of native ports (because I think the crash is somewhere around Dart_CloseNativePort).