Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky crash: ../../runtime/vm/object.cc: 15808: error: expected: ICData::CachedEmptyICDataArray(num_args, is_tracking_exactness()) == entries() #48787

Closed
alexmarkov opened this issue Apr 11, 2022 · 1 comment
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening

Comments

@alexmarkov
Copy link
Contributor

language_2/vm/lazy_deopt_with_exception_concurrent_test sometimes fails with a crash in app_jitk-linux-debug-x64 configuration. On my machine it crashed 3 times out of 100 runs.

Repro:

tools/test.py --repeat 100 -n app_jitk-linux-debug-x64 language_2/vm/lazy_deopt_with_exception_concurrent_test

Log from the bot:

/==============================================================================================\
| language_2/vm/lazy_deopt_with_exception_concurrent_test broke (Pass -> Crash, expected Pass) |
\==============================================================================================/

--- Command "app_jit" (took 03.000513s):
DART_CONFIGURATION=DebugX64 out/DebugX64/dart --snapshot=/b/s/w/ir/cache/builder/sdk/out/DebugX64/generated_compilations/app_jitk-linux-debug-x64/tests_language_2_vm_lazy_deopt_with_exception_concurrent_test/out.jitsnapshot --snapshot-kind=app-jit --optimization-counter-threshold=10 --no-background-compilation -Dtest_runner.configuration=app_jitk-linux-debug-x64 --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/tests/language_2/vm/lazy_deopt_with_exception_concurrent_test.dart

exit code:
-6

stdout:
Info: Compiling without sound null safety

stderr:
../../runtime/vm/object.cc: 15808: error: expected: ICData::CachedEmptyICDataArray(num_args, is_tracking_exactness()) == entries()
version=2.18.0-edge.b566ba1fdb1aad65960a380fb9111edeb6f4d144 (be) (Fri Apr 8 15:57:48 2022 +0000) on "linux_x64"
pid=10323, thread=10361, isolate_group=main(0x55f5bbe13000), isolate=entry(0x55f5bc3d8000)
isolate_instructions=55f5b9f083a0, vm_instructions=55f5b9f083a0
  pc 0x000055f5ba310dcc fp 0x00007f78e03fd6e0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x000055f5b9f08554 fp 0x00007f78e03fd7c0 dart::Assert::Fail(char const*, ...) const+0x84
  pc 0x000055f5ba282e3f fp 0x00007f78e03fd840 dart::ICData::AssertInvariantsAreSatisfied() const+0x69f
  pc 0x000055f5ba28151e fp 0x00007f78e03fd860 dart::ICData::NumberOfChecks() const+0xe
  pc 0x000055f5ba6d7074 fp 0x00007f78e03fd930 dart::CallTargets::CreateHelper(dart::Zone*, dart::ICData const&)+0x44
  pc 0x000055f5ba6e5592 fp 0x00007f78e03fd9d0 dart::CallTargets::CreateAndExpand(dart::Zone*, dart::ICData const&)+0x82
  pc 0x000055f5ba6e9921 fp 0x00007f78e03fda10 dart::InstanceCallInstr::Targets()+0x101
  pc 0x000055f5ba80523c fp 0x00007f78e03fda50 dart::JitCallSpecializer::VisitInstanceCall(dart::InstanceCallInstr*)+0x1c
  pc 0x000055f5ba6dbb29 fp 0x00007f78e03fdaa0 dart::FlowGraphVisitor::VisitBlocks()+0x99
  pc 0x000055f5ba7938f0 fp 0x00007f78e03fdab0 out/DebugX64/dart+0x290e8f0
  pc 0x000055f5ba7930d0 fp 0x00007f78e03fdb90 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x120
  pc 0x000055f5ba793586 fp 0x00007f78e03fdbb0 dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0x26
  pc 0x000055f5ba3eb8b5 fp 0x00007f78e03fe330 dart::CompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)+0x835
  pc 0x000055f5ba3ec836 fp 0x00007f78e03fe580 out/DebugX64/dart+0x2567836
  pc 0x000055f5ba3ed3d1 fp 0x00007f78e03fe610 dart::Compiler::CompileOptimizedFunction(dart::Thread*, dart::Function const&, long)+0x121
  pc 0x000055f5ba383f5a fp 0x00007f78e03fe6b0 dart::DRT_OptimizeInvokedFunction(dart::NativeArguments)+0x24a
  pc 0x00007f78e9382942 fp 0x00007f78e03fe6f0 Unknown symbol
  pc 0x00007f78e9382ced fp 0x00007f78e03fe728 Unknown symbol
  pc 0x00007f78e2f3b84b fp 0x00007f78e03fe7b8 Unknown symbol
  pc 0x00007f78e2f45007 fp 0x00007f78e03fe800 Unknown symbol
  pc 0x00007f78e9382dca fp 0x00007f78e03fe870 Unknown symbol
  pc 0x000055f5ba16221b fp 0x00007f78e03fe900 dart::DartEntry::InvokeCode(dart::Code const&, unsigned long, dart::Array const&, dart::Array const&, dart::Thread*)+0x12b
  pc 0x000055f5ba161dee fp 0x00007f78e03fe970 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x16e
  pc 0x000055f5ba2681a0 fp 0x00007f78e03fea00 dart::Library::Invoke(dart::String const&, dart::Array const&, dart::Array const&, bool, bool) const+0x210
  pc 0x000055f5ba84da25 fp 0x00007f78e03feb00 Dart_Invoke+0x555
  pc 0x000055f5ba080d7f fp 0x00007f78e03feb30 dart::bin::DartUtils::SetupPackageConfig(char const*)+0x7f
  pc 0x000055f5b9eded65 fp 0x00007f78e03feb90 out/DebugX64/dart+0x2059d65
  pc 0x000055f5b9ede330 fp 0x00007f78e03febf0 out/DebugX64/dart+0x2059330
  pc 0x000055f5ba0c0c64 fp 0x00007f78e03fec30 out/DebugX64/dart+0x223bc64
  pc 0x000055f5ba3d090b fp 0x00007f78e03fecd0 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x1fb
  pc 0x000055f5ba3d12b7 fp 0x00007f78e03fed20 dart::ThreadPool::Worker::Main(unsigned long)+0x157
  pc 0x000055f5ba30a014 fp 0x00007f78e03fee70 out/DebugX64/dart+0x2485014
-- End of DumpStackTrace
  pc 0x0000000000000000 fp 0x00007f78e03fe6f0 sp 0x0000000000000000 [Stub] CallToRuntime
  pc 0x00007f78e9382ced fp 0x00007f78e03fe728 sp 0x00007f78e03fe700 [Stub] OptimizeFunction
  pc 0x00007f78e2f3b84b fp 0x00007f78e03fe7b8 sp 0x00007f78e03fe738 [Unoptimized] _Uri@0150898.resolveUri
  pc 0x00007f78e2f45007 fp 0x00007f78e03fe800 sp 0x00007f78e03fe7c8 [Optimized] _setPackagesMap@15225868
  pc 0x00007f78e9382dca fp 0x00007f78e03fe870 sp 0x00007f78e03fe810 [Stub] InvokeDartCode
=== Crash occured when compiling dart:core__SimpleUri@0150898_get_hasQuery in optimizing JIT mode in ApplyICData pass
*** BEGIN CFG
ApplyICData
==== dart:core__SimpleUri@0150898_get_hasQuery (GetterFunction)
B0[graph]:0 {
      v0 <- Constant(#null)
      v1 <- Constant(#<optimized out>)
}
B1[function entry]:2 {
      v2 <- Parameter(0)
}
    CheckStackOverflow:8(stack=0, loop=0)
    DebugStepCheck:10()
    v3 <- LoadField(v2 . _queryStart@0150898 {final}) T{_Smi}
    v5 <- InstanceCall:14( get:_fragmentStart@0150898<0>, v2 IC[1: _SimpleUri@0150898 cnt:1 trgt:'_SimpleUri@0150898.get__fragmentStart@0150898'])
    v7 <- InstanceCall:16( <<0>, v3, v5 IC[1: _Smi@0150898, _Smi@0150898 cnt:0 trgt:'_IntegerImplementation@0150898.<'])
    DebugStepCheck:18()
    Return:20(v7)
*** END CFG

--- Re-run this test:
python3 tools/test.py -n app_jitk-linux-debug-x64 language_2/vm/lazy_deopt_with_exception_concurrent_test

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8817437359832892849/+/u/test_results/ignored_flaky_test_failure_logs

This crash could be related to 70241fc.
/cc @mkustermann @aam @rmacnak-google

@alexmarkov alexmarkov added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening labels Apr 11, 2022
@mkustermann
Copy link
Member

The assertion itself is not quite correct, it accidentally reloads the ICData backing store array

=> cl/242109

@mkustermann mkustermann self-assigned this Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening
Projects
None yet
Development

No branches or pull requests

2 participants