VM crash when running analysis server tests with debugger attached

When I run pkg/analysis_server/test/test_all.dart with a debugger (through VS Code) using the latest nightly SDK build and analyzer code at the same version I see this VM crash. I couldn’t repro outside of VS Code, though the obvious difference is there’s no debugger attached (that may or may not be the cause, it could just be intermittent).

If there’s a way I can get more useful information, let me know!

Dart SDK version: 2.12.0-edge.9978a246c10c6c6297bc8ac52fd34d3423f6071c (be) (Mon Jan 18 12:15:49 2021 +0000) on “macos_x64”

/Users/danny/Dev/Dart SDKs/nightly-2021-01-18/bin/dart –enable-vm-service=0 –pause_isolates_on_start=true –write-service-info=file:///var/folders/b1/ftm2whhj4mb3_c4nfjhq23z00000gn/T/dart-vm-service-d0bf.json -DSILENT_OBSERVATORY=true –enable-asserts test/test_all.dart

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x159702168
version=2.12.0-edge.9978a246c10c6c6297bc8ac52fd34d3423f6071c (be) (Mon Jan 18 12:15:49 2021 +0000) on "macos_x64"
pid=14410, thread=9483, isolate_group=main(0x7fe14a008c00), isolate=main(0x7fe14a008200)
isolate_instructions=10d671aa0, vm_instructions=10d671aa0
  pc 0x000000010d965787 fp 0x0000700009782d90 dart::StackTraceUtils::UnwindAwaiterChain(dart::Zone*, dart::GrowableObjectArray const&, dart::GrowableObjectArray const&, dart::CallerClosureFinder*, dart::ClosurePtr)+0x337
  pc 0x000000010d965490 fp 0x0000700009782e10 dart::StackTraceUtils::UnwindAwaiterChain(dart::Zone*, dart::GrowableObjectArray const&, dart::GrowableObjectArray const&, dart::CallerClosureFinder*, dart::ClosurePtr)+0x40
  pc 0x000000010d9659ef fp 0x0000700009783020 dart::StackTraceUtils::CollectFramesLazy(dart::Thread*, dart::GrowableObjectArray const&, dart::GrowableObjectArray const&, int, std::__2::function<void (dart::StackFrame*)>*, bool*)+0x22f

  pc 0x000000010d797433 fp 0x0000700009783060 dart::GetStackTraceForException()+0x93
  pc 0x000000010d85778c fp 0x00007000097830d0 dart::NativeEntry::BootstrapNativeCallWrapper(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*))+0xac
  pc 0x000000010fc022f4 fp 0x0000700009783110 Unknown symbol
  pc 0x000000014d82f7e0 fp 0x0000700009783140 Unknown symbol
  pc 0x000000015242e622 fp 0x0000700009783188 Unknown symbol
  pc 0x0000000152cd1c7d fp 0x00007000097831e0 Unknown symbol
  pc 0x0000000150c3cb80 fp 0x0000700009783250 Unknown symbol
  pc 0x0000000156a7a3a8 fp 0x0000700009783290 Unknown symbol
  pc 0x00000001578c5c3a fp 0x00007000097833d0 Unknown symbol
  pc 0x000000014b080201 fp 0x0000700009783478 Unknown symbol
  pc 0x00000001578a6cac fp 0x00007000097834e0 Unknown symbol
  pc 0x000000014b0ae5eb fp 0x0000700009783590 Unknown symbol
  pc 0x00000001578d645b fp 0x0000700009783700 Unknown symbol
  pc 0x000000014b0ae5eb fp 0x00007000097837b0 Unknown symbol
  pc 0x0000000152ca7d38 fp 0x00007000097837e8 Unknown symbol
  pc 0x000000014b080201 fp 0x0000700009783890 Unknown symbol
  pc 0x000000014cc512e2 fp 0x0000700009783990 Unknown symbol
  pc 0x000000014d5ac3a1 fp 0x00007000097839f0 Unknown symbol
  pc 0x0000000152cde951 fp 0x0000700009783a78 Unknown symbol
  pc 0x0000000152ca28fe fp 0x0000700009783ad0 Unknown symbol
  pc 0x00000001524341f8 fp 0x0000700009783b60 Unknown symbol
  pc 0x0000000152c94196 fp 0x0000700009783bd8 Unknown symbol
  pc 0x000000015dac1d01 fp 0x0000700009783c38 Unknown symbol
  pc 0x000000014d5cfe23 fp 0x0000700009783c88 Unknown symbol
  pc 0x0000000152cab2fd fp 0x0000700009783cb8 Unknown symbol
  pc 0x00000001578c58c5 fp 0x0000700009783e00 Unknown symbol

  pc 0x000000014b0ae5eb fp 0x0000700009783eb0 Unknown symbol
  pc 0x0000000152ca7d38 fp 0x0000700009783ee8 Unknown symbol
  pc 0x000000014b080201 fp 0x0000700009783f90 Unknown symbol
  pc 0x000000014cc512e2 fp 0x0000700009784090 Unknown symbol
  pc 0x000000014d5ac3a1 fp 0x00007000097840f0 Unknown symbol
  pc 0x0000000152cde951 fp 0x0000700009784178 Unknown symbol
  pc 0x0000000152ca28fe fp 0x00007000097841d0 Unknown symbol
  pc 0x00000001524341f8 fp 0x0000700009784260 Unknown symbol
  pc 0x0000000152c94196 fp 0x00007000097842d8 Unknown symbol
  pc 0x000000015dac1d01 fp 0x0000700009784338 Unknown symbol
  pc 0x000000014d5cfe23 fp 0x0000700009784388 Unknown symbol
  pc 0x0000000152cd9b76 fp 0x00007000097843c0 Unknown symbol
  pc 0x000000014b080201 fp 0x0000700009784468 Unknown symbol
  pc 0x000000014cc512e2 fp 0x0000700009784568 Unknown symbol
  pc 0x000000014b0ada11 fp 0x00007000097845b0 Unknown symbol
  pc 0x0000000150c12d52 fp 0x0000700009784640 Unknown symbol
  pc 0x0000000150c2b63b fp 0x0000700009784690 Unknown symbol
  pc 0x0000000150c473b1 fp 0x0000700009784738 Unknown symbol
  pc 0x0000000150c6ac26 fp 0x0000700009784770 Unknown symbol
  pc 0x0000000167bdb27c fp 0x00007000097847d0 Unknown symbol
  pc 0x000000016186e5d3 fp 0x00007000097847f8 Unknown symbol
  pc 0x000000014b0ad715 fp 0x00007000097848e0 Unknown symbol
  pc 0x000000015247a491 fp 0x0000700009784918 Unknown symbol
  pc 0x0000000150c35dc6 fp 0x0000700009784948 Unknown symbol
  pc 0x000000014b0ae5eb fp 0x00007000097849f8 Unknown symbol
  pc 0x0000000150c1e6fc fp 0x0000700009784a30 Unknown symbol
  pc 0x000000010fc0265f fp 0x0000700009784aa8 Unknown symbol
  pc 0x000000010d7fb68f fp 0x0000700009784b40 dart::DartEntry::InvokeCode(dart::Code const&, dart::Array const&, dart::Array const&, dart::Thread*)+0x11f
  pc 0x000000010d7fb4b7 fp 0x0000700009784ba0 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x147
  pc 0x000000010d7fdc64 fp 0x0000700009784bf0 dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)+0x1d4
  pc 0x000000010d828818 fp 0x0000700009784de0 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0x4b8
  pc 0x000000010d855b16 fp 0x0000700009784e50 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x126

  pc 0x000000010d8561fa fp 0x0000700009784eb0 dart::MessageHandler::TaskCallback()+0x1da
  pc 0x000000010d9740ae fp 0x0000700009784f30 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x14e
  pc 0x000000010d9745ad fp 0x0000700009784f60 dart::ThreadPool::Worker::Main(unsigned long)+0x5d
  pc 0x000000010d8de208 fp 0x0000700009784fb0 dart::OSThread::GetMaxStackSize()+0xb8
  pc 0x00007fff696b0109 fp 0x0000700009784fd0 _pthread_start+0x94
  pc 0x00007fff696abb8b fp 0x0000700009784ff0 thread_start+0xf
-- End of DumpStackTrace
[exit     : sp(0) fp(0x700009783110) pc(0)]
[dart     : sp(0x700009783120) fp(0x700009783140) pc(0x14d82f7e0) dart:core_StackTrace_get_current ]
[dart     : sp(0x700009783150) fp(0x700009783188) pc(0x15242e622) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__registerUnaryCallback@258444339 ]
[dart     : sp(0x700009783198) fp(0x7000097831e0) pc(0x152cd1c7d) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__registerUnaryCallback@258444339__registerUnaryCallback@258444339 ]
[dart     : sp(0x7000097831f0) fp(0x700009783250) pc(0x150c3cb80) *dart:async_::__asyncThenWrapperHelper@4048458 ]
[dart     : sp(0x700009783260) fp(0x700009783290) pc(0x156a7a3a8) package:analysis_server/src/services/correction/dart/inline_invocation.dart_InlineInvocation_compute ]
[dart     : sp(0x7000097832a0) fp(0x7000097833d0) pc(0x1578c5c3a) *package:analysis_server/src/services/correction/assist_internal.dart_AssistProcessor__addFromProducers@1604135768__async_op_compute__async_op ]
[dart     : sp(0x7000097833e0) fp(0x700009783478) pc(0x14b080201) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x700009783488) fp(0x7000097834e0) pc(0x1578a6cac) *package:analysis_server/src/services/correction/assist_internal.dart_AssistProcessor__addFromProducers@1604135768__async_op_compute ]
[dart     : sp(0x7000097834f0) fp(0x700009783590) pc(0x14b0ae5eb) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x7000097835a0) fp(0x700009783700) pc(0x1578d645b) *package:analysis_server/src/services/correction/assist_internal.dart_AssistProcessor__addFromProducers@1604135768__async_op ]
[dart     : sp(0x700009783710) fp(0x7000097837b0) pc(0x14b0ae5eb) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x7000097837c0) fp(0x7000097837e8) pc(0x152ca7d38) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__registerUnaryCallback@258444339_<anonymous closure>_<anonymous closure> ]
[dart     : sp(0x7000097837f8) fp(0x700009783890) pc(0x14b080201) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x7000097838a0) fp(0x700009783990) pc(0x14cc512e2) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__run@258444339 ]
[dart     : sp(0x7000097839a0) fp(0x7000097839f0) pc(0x14d5ac3a1) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__registerUnaryCallback@258444339_<anonymous closure> ]
[dart     : sp(0x700009783a00) fp(0x700009783a78) pc(0x152cde951) *dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x700009783a88) fp(0x700009783ad0) pc(0x152ca28fe) *dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x700009783ae0) fp(0x700009783b60) pc(0x1524341f8) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x700009783b70) fp(0x700009783bd8) pc(0x152c94196) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x700009783be8) fp(0x700009783c38) pc(0x15dac1d01) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x700009783c48) fp(0x700009783c88) pc(0x14d5cfe23) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x700009783c98) fp(0x700009783cb8) pc(0x152cab2fd) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x700009783cc8) fp(0x700009783e00) pc(0x1578c58c5) *package:analysis_server/src/services/correction/assist_internal.dart_AssistProcessor__addFromProducers@1604135768__async_op_compute__async_op ]
[dart     : sp(0x700009783e10) fp(0x700009783eb0) pc(0x14b0ae5eb) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x700009783ec0) fp(0x700009783ee8) pc(0x152ca7d38) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__registerUnaryCallback@258444339_<anonymous closure>_<anonymous closure> ]
[dart     : sp(0x700009783ef8) fp(0x700009783f90) pc(0x14b080201) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x700009783fa0) fp(0x700009784090) pc(0x14cc512e2) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__run@258444339 ]
[dart     : sp(0x7000097840a0) fp(0x7000097840f0) pc(0x14d5ac3a1) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__registerUnaryCallback@258444339_<anonymous closure> ]
[dart     : sp(0x700009784100) fp(0x700009784178) pc(0x152cde951) *dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x700009784188) fp(0x7000097841d0) pc(0x152ca28fe) *dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000097841e0) fp(0x700009784260) pc(0x1524341f8) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x700009784270) fp(0x7000097842d8) pc(0x152c94196) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000097842e8) fp(0x700009784338) pc(0x15dac1d01) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x700009784348) fp(0x700009784388) pc(0x14d5cfe23) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x700009784398) fp(0x7000097843c0) pc(0x152cd9b76) *dart:async__Future@4048458__asyncCompleteWithValue@4048458_<anonymous closure> ]
[dart     : sp(0x7000097843d0) fp(0x700009784468) pc(0x14b080201) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x700009784478) fp(0x700009784568) pc(0x14cc512e2) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__run@258444339 ]
[dart     : sp(0x700009784578) fp(0x7000097845b0) pc(0x14b0ada11) *package:stack_trace/src/stack_zone_specification.dart_StackZoneSpecification__registerCallback@258444339_<anonymous closure> ]
[dart     : sp(0x7000097845c0) fp(0x700009784640) pc(0x150c12d52) *dart:async_::__rootRun@4048458 ]
[dart     : sp(0x700009784650) fp(0x700009784690) pc(0x150c2b63b) *dart:async_::__rootRun@4048458__rootRun@4048458 ]
[dart     : sp(0x7000097846a0) fp(0x700009784738) pc(0x150c473b1) *dart:async__CustomZone@4048458_runGuarded ]
[dart     : sp(0x700009784748) fp(0x700009784770) pc(0x150c6ac26) *dart:async__CustomZone@4048458_bindCallbackGuarded_<anonymous closure> ]

[dart     : sp(0x700009784780) fp(0x7000097847d0) pc(0x167bdb27c) *dart:async_::__startMicrotaskLoop@4048458 ]
[dart     : sp(0x7000097847e0) fp(0x7000097847f8) pc(0x16186e5d3) *dart:async_::__startMicrotaskLoop@4048458__startMicrotaskLoop@4048458 ]
[dart     : sp(0x700009784808) fp(0x7000097848e0) pc(0x14b0ad715) *dart:isolate__Timer@1026248__runTimers@1026248 ]
[dart     : sp(0x7000097848f0) fp(0x700009784918) pc(0x15247a491) *dart:isolate__Timer@1026248__handleMessage@1026248 ]
[dart     : sp(0x700009784928) fp(0x700009784948) pc(0x150c35dc6) *dart:isolate__Timer@1026248__handleMessage@1026248__handleMessage@1026248 ]
[dart     : sp(0x700009784958) fp(0x7000097849f8) pc(0x14b0ae5eb) *dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x700009784a08) fp(0x700009784a30) pc(0x150c1e6fc) *dart:isolate__RawReceivePortImpl@1026248__handleMessage@1026248 ]
[entry    : sp(0x700009784a40) fp(0x700009784aa8) pc(0x10fc0265f)]

Exited (sigabrt)

1 possible answer(s) on “VM crash when running analysis server tests with debugger attached

  1. This was a difficult one to track down, but mraleph helped track down a pointer that was being eaten by the GC.

    The causing CL has of course already been rolled back, but I’ve fixed the issue and verified that it no longer reproduces in the reland, so I’ll call it resolve here.
    Thanks!