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

Potential issue with concurrent access to Isolate::pending_deopts #34323

Closed
mkustermann opened this issue Aug 31, 2018 · 0 comments
Closed

Potential issue with concurrent access to Isolate::pending_deopts #34323

mkustermann opened this issue Aug 31, 2018 · 0 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@mkustermann
Copy link
Member

mkustermann commented Aug 31, 2018

From this buildbot log:

FAILED: dartk-vm release_x64 language_2/await_future_test
Expected: Pass
Actual: Crash
--- Command "vm" (took 06.000545s):
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/dart --hot-reload-test-mode --optimization-counter-threshold=5 --sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/tests/language_2/await_future_test.dart
exit code:
-6
stdout:
unittest-suite-wait-for-done
stderr:
tag handler failed: 'file:///b/s/w/ir/cache/builder/sdk/tests/language_2/await_future_test.dart' is not a kernel file
...
===== CRASH =====
version=2.1.0-edge.02b2deefd6009a8064ba70c1cd80e2d79dfaeed6 (Fri Aug 31 01:19:24 2018 +0000) on "linux_x64"
si_signo=Segmentation fault(11), si_code=1, si_addr=0x548
Dumping native stack trace for thread 32f3
  [0x000055993cbeb8b0] dart::Isolate::FindPendingDeopt(unsigned long) const
  [0x000055993cbeb8b0] dart::Isolate::FindPendingDeopt(unsigned long) const
  [0x000055993cdb14d4] dart::Thread::VisitObjectPointers(dart::ObjectPointerVisitor*, dart::ValidationPolicy)
  [0x000055993cdb3c54] dart::ThreadRegistry::VisitObjectPointers(dart::ObjectPointerVisitor*, dart::ValidationPolicy)
  [0x000055993cf10dca] dart::Scavenger::IterateRoots(dart::Isolate*, dart::ScavengerVisitor*)
  [0x000055993cf117e9] dart::Scavenger::Scavenge()
  [0x000055993cf11c50] dart::Scavenger::Evacuate()
  [0x000055993cf07754] dart::Heap::EvacuateNewSpace(dart::Thread*, dart::Heap::GCReason)
  [0x000055993cf0623d] dart::Heap::AllocateOld(long, dart::HeapPage::PageType)
  [0x000055993cc1c09c] dart::Object::Allocate(long, long, dart::Heap::Space)
  [0x000055993cc7e767] dart::ICData::NewDescriptor(dart::Zone*, dart::Function const&, dart::String const&, dart::Array const&, long, long, dart::ICData::RebindRule, dart::AbstractType const&)
  [0x000055993cc7ea0f] dart::ICData::New(dart::Function const&, dart::String const&, dart::Array const&, long, long, dart::ICData::RebindRule, dart::AbstractType const&)
  [0x000055993cc7d00e] dart::ICData::NewFrom(dart::ICData const&, long)
  [0x000055993ce627e2] dart::CallSpecializer::TryCreateICData(dart::InstanceCallInstr*)
  [0x000055993ce622f6] dart::CallSpecializer::ApplyClassIds()
  [0x000055993ce6dd10] Unknown symbol
  [0x000055993ce6d655] dart::CompilerPass::Run(dart::CompilerPassState*) const
  [0x000055993ce6d825] dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)
  [0x000055993cef09c2] dart::CompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)
  [0x000055993cef189a] Unknown symbol
  [0x000055993cef2877] dart::Compiler::CompileOptimizedFunction(dart::Thread*, dart::Function const&, long)
  [0x000055993cef4614] dart::BackgroundCompiler::Run()
  [0x000055993cdb37dd] dart::ThreadPool::Worker::Loop()
  [0x000055993cdb3674] dart::ThreadPool::Worker::Main(unsigned long)
  [0x000055993ccc0b69] Unknown symbol
-- End of DumpStackTrace
--- Re-run this test:
python tools/test.py -m release -n dartk-reload-linux-release-x64 language_2/await_future_test

By looking at the code of Isolate::FindPendingDeopt():

uword Isolate::FindPendingDeopt(uword fp) const {
  for (intptr_t i = 0; i < pending_deopts_->length(); i++) {
    if ((*pending_deopts_)[i].fp() == fp) {
      return (*pending_deopts_)[i].pc();
    }
  }
  FATAL("Missing pending deopt entry");
  return 0;

It seems to not hit the FATAL but rather a SEGV which might indicate there is some concurrent access of the background compiler to Isolate::pending_deopts_

/cc @mraleph

@mkustermann mkustermann added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Aug 31, 2018
@mkustermann mkustermann self-assigned this Oct 19, 2018
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.
Projects
None yet
Development

No branches or pull requests

1 participant