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

dart vm crash in scavenger #34435

Open
aam opened this Issue Sep 11, 2018 · 7 comments

Comments

Projects
None yet
6 participants
@aam
Contributor

aam commented Sep 11, 2018

Crashed when trying to build local engine with 858d65e revision of dart sdk.

 ~/projects/flutter/test_root6/flutter/engine/src  ‹master*› 
╰─➤  flutter/tools/gn --runtime-mode=debug --unoptimized --dart-debug && ninja -C out/host_debug_unopt && flutter/tools/gn --runtime-mode=debug --android  --unoptimized --dart-debug --android-cpu x86 && ninja -C out/android_debug_unopt_x86
gn gen --check in out/host_debug_unopt
Generating Xcode projects took 201ms
Done. Made 454 targets from 168 files in 1790ms
ninja: Entering directory `out/host_debug_unopt'
[3161/3170] ACTION //third_party/dart/utils/analysis_server:analysis_server(//build/toolchain/mac:clang_x64)
FAILED: gen/analysis_server.dart.snapshot 
python ../../third_party/dart/build/gn_run_binary.py compiled_action dart --deterministic --packages=$FH/engine/src/third_party/dart/.packages --snapshot=gen/analysis_server.dart.snapshot --snapshot-depfile=$FH/engine/src/out/host_debug_unopt/gen/analysis_server.dart.snapshot.d --snapshot-kind=app-jit $FH/engine/src/third_party/dart/pkg/analysis_server/bin/server.dart --train-using=$FH/engine/src/third_party/dart/pkg/analyzer_cli --sdk=$FH/engine/src/third_party/dart/sdk/
Command failed: ./dart --deterministic --packages=$FH/engine/src/third_party/dart/.packages --snapshot=gen/analysis_server.dart.snapshot --snapshot-depfile=$FH/engine/src/out/host_debug_unopt/gen/analysis_server.dart.snapshot.d --snapshot-kind=app-jit $FH/engine/src/third_party/dart/pkg/analysis_server/bin/server.dart --train-using=$FH/engine/src/third_party/dart/pkg/analyzer_cli --sdk=$FH/engine/src/third_party/dart/sdk/
output: Analyzing with an empty driver cache:
Analyzing $FH/engine/src/third_party/dart/pkg/analyzer_cli...
../../third_party/dart/runtime/vm/raw_object.h: 401: error: expected: IsWellFormed()
Dumping native stack trace for thread f13
  [0x00000001010be9f5] dart::Profiler::DumpStackTrace(void*)
  [0x00000001010be9f5] dart::Profiler::DumpStackTrace(void*)
  [0x00000001013e59b2] dart::Assert::Fail(char const*, ...)
  [0x0000000101397ba4] dart::ScavengerVisitor::VisitPointers(dart::RawObject**, dart::RawObject**)
  [0x0000000101170026] dart::StackFrame::VisitObjectPointers(dart::ObjectPointerVisitor*)
  [0x0000000101193a1c] dart::Thread::VisitObjectPointers(dart::ObjectPointerVisitor*, dart::ValidationPolicy)
  [0x000000010119962e] dart::ThreadRegistry::VisitObjectPointers(dart::ObjectPointerVisitor*, dart::ValidationPolicy)
  [0x0000000101395899] dart::Scavenger::IterateRoots(dart::Isolate*, dart::ScavengerVisitor*)
  [0x0000000101396dd8] dart::Scavenger::Scavenge()
  [0x0000000101382508] dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::Heap::GCReason)
  [0x00000001013806e1] dart::Heap::AllocateNew(long)
  [0x0000000100f855a5] dart::Object::Allocate(long, long, dart::Heap::Space)
  [0x0000000101005e0f] dart::Instance::New(dart::Class const&, dart::Heap::Space)
  [0x000000010112f49e] dart::DRT_AllocateObject(dart::NativeArguments)
  [0x00000001029809a7] Unknown symbol
  [0x000000010a4f9e1c] Unknown symbol
  [0x000000010ac203b9] Unknown symbol
  [0x000000010ac07994] Unknown symbol
  [0x000000010ac2a7c6] Unknown symbol
  [0x000000010ac1b081] Unknown symbol
  [0x000000010c7f78db] Unknown symbol
  [0x000000010c7ff547] Unknown symbol
  [0x000000010ac2249b] Unknown symbol
  [0x000000010af2e710] Unknown symbol
  [0x000000010c898e9f] Unknown symbol
  [0x0000000119adaafc] Unknown symbol
  [0x0000000119ada8d4] Unknown symbol
  [0x0000000119add8fb] Unknown symbol
  [0x000000010810a048] Unknown symbol
  [0x0000000108109bea] Unknown symbol
  [0x0000000108109bea] Unknown symbol
  [0x0000000108109bea] Unknown symbol
  [0x000000010af162d5] Unknown symbol
  [0x0000000119add4be] Unknown symbol
  [0x000000012c860dd4] Unknown symbol
  [0x0000000119ae9072] Unknown symbol
  [0x000000010812eaf1] Unknown symbol
  [0x000000010812e871] Unknown symbol
  [0x0000000107a98665] Unknown symbol
  [0x00000001081295ee] Unknown symbol
  [0x0000000107a98665] Unknown symbol
  [0x0000000108128cc8] Unknown symbol
  [0x0000000108128585] Unknown symbol
  [0x000000012c04035f] Unknown symbol
  [0x000000010a6ffe08] Unknown symbol
  [0x000000010a6ff9c6] Unknown symbol
  [0x000000010a6fe64b] Unknown symbol
  [0x000000010a6ff11e] Unknown symbol
  [0x000000010a6fcdc2] Unknown symbol
  [0x000000010a6fc8f2] Unknown symbol
  [0x000000010a6fc784] Unknown symbol
  [0x000000010a6fc4f2] Unknown symbol
  [0x0000000106eee01a] Unknown symbol
  [0x0000000102980e91] Unknown symbol
  [0x0000000100ef0cf7] dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)
  [0x0000000100ef3762] dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)
  [0x0000000100f3b0b5] dart::IsolateMessageHandler::HandleMessage(dart::Message*)
  [0x0000000100f794dd] dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)
  [0x0000000100f7a260] dart::MessageHandler::TaskCallback()
  [0x00000001011989df] dart::ThreadPool::Worker::Loop()
  [0x000000010119857d] dart::ThreadPool::Worker::Main(unsigned long)
  [0x000000010105c228] dart::ThreadStart(void*)
  [0x00007fff74ebf661] _pthread_body
  [0x00007fff74ebf50d] _pthread_body
  [0x00007fff74ebebf9] thread_start
-- End of DumpStackTrace

ninja: build stopped: subcommand failed.

cc @rmacnak-google

@mkustermann

This comment has been minimized.

Show comment
Hide comment
@mkustermann

mkustermann Sep 11, 2018

Member

We've started debugging this issue and think we know what causes it. It might take some time to fix this.

Member

mkustermann commented Sep 11, 2018

We've started debugging this issue and think we know what causes it. It might take some time to fix this.

@mraleph

This comment has been minimized.

Show comment
Hide comment
@mraleph

mraleph Sep 11, 2018

Contributor

To clarify: this is a bug in the register allocator - it can't properly cope with multiple entry points.

Contributor

mraleph commented Sep 11, 2018

To clarify: this is a bug in the register allocator - it can't properly cope with multiple entry points.

@aam

This comment has been minimized.

Show comment
Hide comment
@aam

aam Sep 11, 2018

Contributor

cc @aartbik who is on the dart flutter engine roll

Contributor

aam commented Sep 11, 2018

cc @aartbik who is on the dart flutter engine roll

@aartbik

This comment has been minimized.

Show comment
Hide comment
@aartbik

aartbik Sep 11, 2018

Contributor

Was this introduced by the "Integrate linter 0.1.61" change?
I had this ready for in my pending flutter roll, but it sounds like it is better if I don't include this?

Contributor

aartbik commented Sep 11, 2018

Was this introduced by the "Integrate linter 0.1.61" change?
I had this ready for in my pending flutter roll, but it sounds like it is better if I don't include this?

@aam

This comment has been minimized.

Show comment
Hide comment
@aam

aam Sep 11, 2018

Contributor

Was this introduced by the "Integrate linter 0.1.61" change?

Running a bisect points to https://dart-review.googlesource.com/74360 landed as 609d277

Contributor

aam commented Sep 11, 2018

Was this introduced by the "Integrate linter 0.1.61" change?

Running a bisect points to https://dart-review.googlesource.com/74360 landed as 609d277

@aartbik

This comment has been minimized.

Show comment
Hide comment
@aartbik

aartbik Sep 11, 2018

Contributor

@aam thanks!

Contributor

aartbik commented Sep 11, 2018

@aam thanks!

@mraleph

This comment has been minimized.

Show comment
Hide comment
@mraleph

mraleph Sep 11, 2018

Contributor

Note that the crash has nothing to do with that particular change - even if it does reproduce more reliably with it.

The original source of crash is in this change d8a4a38 - there is a bit of stuff missing from the register allocator to handle multiple entry points correctly.

Martin is working on the fix for the underlying issue.

Contributor

mraleph commented Sep 11, 2018

Note that the crash has nothing to do with that particular change - even if it does reproduce more reliably with it.

The original source of crash is in this change d8a4a38 - there is a bit of stuff missing from the register allocator to handle multiple entry points correctly.

Martin is working on the fix for the underlying issue.

dart-bot pushed a commit that referenced this issue Sep 12, 2018

[vm/compiler] Disable multiple entry-points
Implementation is missing few bits in the register allocator
and causing GC crashes.

Bug: #34435
Change-Id: I4779797351c6853b87a5fef663324973e8a64c99
Reviewed-on: https://dart-review.googlesource.com/74641
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment