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

New crashes after "[vm] Re-land use of multiple entrypoints for closure calls" landed #34287

Closed
mkustermann opened this issue Aug 28, 2018 · 1 comment
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

During my gardening shift I've debugged a flaky crash which has been happening for some time now. After bisecting it it looks like

2beb05b vm Re-land use of multiple entrypoints for closure calls

has caused it.

From this log

FAILED: dartk-vm debug_x64 service/rewind_test
Expected: Pass
Actual: RuntimeError
--- Command "vm" (took 21.000412s):
DART_CONFIGURATION=DebugX64 out/DebugX64/dart --no-background-compilation --error_on_bad_type --error_on_bad_override --no-sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart
exit code:
255
stdout:
** Launching SERVICE_TEST_TESTEE=true out/DebugX64/dart -DDART_SERVICE_USE_AUTH=false --profiler --trace-rewind --no-prune-dead-locals --enable-inlining-annotations --no-background-compilation --optimization-counter-threshold=10 --no-background-compilation --error_on_bad_type --error_on_bad_override --no-sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages --enable-vm-service:0 /b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart
>testee>out> Observatory listening on http://127.0.0.1:41918/
** Signaled to run test queries on http://127.0.0.1:41918/
>testee>out> 
Loading VM...
Done loading VM
Running rewind_test.dart [1/22]
Paused with PauseBreakpoint
Running rewind_test.dart [2/22]
Checking we are at line 35
Program is stopped at line: 35
Running rewind_test.dart [3/22]
Running rewind_test.dart [4/22]
Running rewind_test.dart [5/22]
global is Instance(100)
>testee>err> Rewinding to frame 1
>testee>err> -------------------------
>testee>err> All frames...
>testee>err> 
>testee>err> #0000 [exit     : sp(0) fp(0x7fbed32bdc58) pc(0)]
>testee>err> #0001 [stub     : sp(0x7fbed32bdc68) fp(0x7fbed32bdc80) pc(0x7fbed9b01f2e)]
>testee>err> #0002 [dart     : sp(0x7fbed32bdc90) fp(0x7fbed32bdce0) pc(0x7fbec8d92508) file:///b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart_::_b3 ]
>testee>err> #0003 [dart     : sp(0x7fbed32bdcf0) fp(0x7fbed32bdd10) pc(0x7fbec8d92e2a) *file:///b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart_::_test ]
>testee>err> #0004 [dart     : sp(0x7fbed32bdd20) fp(0x7fbed32bdd50) pc(0x7fbec8d91c52) file:///b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart_::_test_test ]
>testee>err> #0005 [dart     : sp(0x7fbed32bdd60) fp(0x7fbed32bdd88) pc(0x7fbec8d91a33) dart:core__Closure@0150898_call ]
>testee>err> #0006 [dart     : sp(0x7fbed32bdd98) fp(0x7fbed32bde18) pc(0x7fbec8d90afb) file:///b/s/w/ir/runtime/observatory/tests/service/test_helper.dart__ServiceTesteeRunner@21486814_run__async_op ]
>testee>err> #0007 [dart     : sp(0x7fbed32bde28) fp(0x7fbed32bde98) pc(0x7fbec8d81e05) dart:async_Future_Future.microtask_<anonymous closure> ]
>testee>err> #0008 [dart     : sp(0x7fbed32bdea8) fp(0x7fbed32bded8) pc(0x7fbec8d81aa9) dart:async_::__microtaskLoop@7048458 ]
>testee>err> #0009 [dart     : sp(0x7fbed32bdee8) fp(0x7fbed32bdf18) pc(0x7fbec8d815c9) dart:async_::__startMicrotaskLoop@7048458 ]
>testee>err> #0010 [dart     : sp(0x7fbed32bdf28) fp(0x7fbed32bdf58) pc(0x7fbec8d81472) dart:async_::__startMicrotaskLoop@7048458__startMicrotaskLoop@7048458 ]
>testee>err> #0011 [dart     : sp(0x7fbed32bdf68) fp(0x7fbed32bdf98) pc(0x7fbec8d8121a) dart:isolate_::__runPendingImmediateCallback@1026248 ]
>testee>err> #0012 [dart     : sp(0x7fbed32bdfa8) fp(0x7fbed32bdfc0) pc(0x7fbed37fb331) dart:isolate__RawReceivePortImpl@1026248__handleMessage@1026248 ]
>testee>err> #0013 [entry    : sp(0x7fbed32bdfd0) fp(0x7fbed32be030) pc(0x7fbed9b00e91)]
Running rewind_test.dart [6/22]
>testee>err> ===============================
>testee>err> Deoptimizing frame for rewind:
>testee>err>     deopt_pc(0x7fbec8d92e2a) sp(0x7fbed32bdcf0) fp(0x7fbed32bdd10)
>testee>err> ===============================
>testee>err> Post deopt, jumping to frame 0
>testee>err> -------------------------
>testee>err> All frames...
>testee>err> 
>testee>err> #0000 [exit     : sp(0) fp(0x7fbed32bdc60) pc(0)]
>testee>err> #0001 [stub     : sp(0x7fbed32bdc70) fp(0x7fbed32bdc80) pc(0x7fbed9b002c6)]
>testee>err> #0002 [dart     : sp(0x7fbed32bdc90) fp(0x7fbed32bdcb0) pc(0x7fbec8d91ff6) file:///b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart_::_b2 ]
>testee>err> #0003 [dart     : sp(0x7fbed32bdcc0) fp(0x7fbed32bdce0) pc(0x7fbec8d91ef6) file:///b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart_::_b1 ]
>testee>err> #0004 [dart     : sp(0x7fbed32bdcf0) fp(0x7fbed32bdd10) pc(0x7fbec8d91dbe) file:///b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart_::_test ]
>testee>err> #0005 [dart     : sp(0x7fbed32bdd20) fp(0x7fbed32bdd50) pc(0x7fbec8d91c52) file:///b/s/w/ir/runtime/observatory/tests/service/rewind_test.dart_::_test_test ]
>testee>err> #0006 [dart     : sp(0x7fbed32bdd60) fp(0x7fbed32bdd88) pc(0x7fbec8d91a33) dart:core__Closure@0150898_call ]
>testee>err> #0007 [dart     : sp(0x7fbed32bdd98) fp(0x7fbed32bde18) pc(0x7fbec8d90afb) file:///b/s/w/ir/runtime/observatory/tests/service/test_helper.dart__ServiceTesteeRunner@21486814_run__async_op ]
>testee>err> #0008 [dart     : sp(0x7fbed32bde28) fp(0x7fbed32bde98) pc(0x7fbec8d81e05) dart:async_Future_Future.microtask_<anonymous closure> ]
>testee>err> #0009 [dart     : sp(0x7fbed32bdea8) fp(0x7fbed32bded8) pc(0x7fbec8d81aa9) dart:async_::__microtaskLoop@7048458 ]
>testee>err> #0010 [dart     : sp(0x7fbed32bdee8) fp(0x7fbed32bdf18) pc(0x7fbec8d815c9) dart:async_::__startMicrotaskLoop@7048458 ]
>testee>err> #0011 [dart     : sp(0x7fbed32bdf28) fp(0x7fbed32bdf58) pc(0x7fbec8d81472) dart:async_::__startMicrotaskLoop@7048458__startMicrotaskLoop@7048458 ]
>testee>err> #0012 [dart     : sp(0x7fbed32bdf68) fp(0x7fbed32bdf98) pc(0x7fbec8d8121a) dart:isolate_::__runPendingImmediateCallback@1026248 ]
>testee>err> #0013 [dart     : sp(0x7fbed32bdfa8) fp(0x7fbed32bdfc0) pc(0x7fbed37fb331) dart:isolate__RawReceivePortImpl@1026248__handleMessage@1026248 ]
>testee>err> #0014 [entry    : sp(0x7fbed32bdfd0) fp(0x7fbed32be030) pc(0x7fbed9b00e91)]
>testee>err> ===============================
>testee>err> Rewinding to unoptimized frame:
>testee>err>     rewind_pc(0x7fbec8d91fe0) sp(0x7fbed32bdc90) fp(0x7fbed32bdcb0)
>testee>err> ===============================
>testee>err> ../../runtime/vm/raw_object.h: 369: error: expected: IsWellFormed()
>testee>err> Dumping native stack trace for thread 2b62
>testee>err>   [0x0000556415e6845f] dart::Profiler::DumpStackTrace(void*)
>testee>err>   [0x0000556415e6845f] dart::Profiler::DumpStackTrace(void*)
>testee>err>   [0x0000556416122032] dart::Assert::Fail(char const*, ...)
>testee>err>   [0x00005564160e01b6] Unknown symbol
>testee>err>   [0x00005564160dfe7b] Unknown symbol
>testee>err>   [0x0000556415f085b0] dart::StackFrame::VisitObjectPointers(dart::ObjectPointerVisitor*)
>testee>err>   [0x0000556415f284ec] dart::Thread::VisitObjectPointers(dart::ObjectPointerVisitor*, dart::ValidationPolicy)
>testee>err>   [0x0000556415f2d8fe] dart::ThreadRegistry::VisitObjectPointers(dart::ObjectPointerVisitor*, dart::ValidationPolicy)
>testee>err>   [0x00005564160de2fa] dart::Scavenger::IterateRoots(dart::Isolate*, dart::ScavengerVisitor*)
>testee>err>   [0x00005564160df607] dart::Scavenger::Scavenge()
>testee>err>   [0x00005564160cd671] dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::Heap::GCReason)
>testee>err>   [0x00005564160cba51] dart::Heap::AllocateNew(long)
>testee>err>   [0x0000556415d3e5c0] dart::Object::Allocate(long, long, dart::Heap::Space)
>testee>err>   [0x0000556415d8e881] dart::TypedData::New(long, long, dart::Heap::Space)
>testee>err>   [0x0000556415c256cf] dart::BootstrapNatives::DN_TypedData_Uint8Array_new(_Dart_NativeArguments*)
>testee>err>   [0x00007fbed9b00b06] Unknown symbol
>testee>err>   [0x00007fbed26aa701] Unknown symbol
>testee>err>   [0x00007fbece315a1b] Unknown symbol
>testee>err>   [0x00007fbece324834] Unknown symbol
>testee>err>   [0x00007fbece306a91] Unknown symbol
>testee>err>   [0x00007fbece3122c5] Unknown symbol
>testee>err>   [0x00007fbec8aea79e] Unknown symbol
>testee>err>   [0x00007fbece5108d5] Unknown symbol
>testee>err>   [0x00007fbed13bc093] Unknown symbol
>testee>err>   [0x00007fbece539c29] Unknown symbol
>testee>err>   [0x00007fbece316c00] Unknown symbol
>testee>err>   [0x00007fbec8aea79e] Unknown symbol
>testee>err>   [0x00007fbece5108d5] Unknown symbol
>testee>err>   [0x00007fbed13bc093] Unknown symbol
>testee>err>   [0x00007fbece539c29] Unknown symbol
>testee>err>   [0x00007fbece31d5b6] Unknown symbol
>testee>err>   [0x00007fbece324126] Unknown symbol
>testee>err>   [0x00007fbece53fef4] Unknown symbol
>testee>err>   [0x00007fbecde002c2] Unknown symbol
>testee>err>   [0x00007fbece53fc44] Unknown symbol
>testee>err>   [0x00007fbed269354f] Unknown symbol
>testee>err>   [0x00007fbed9b00e91] Unknown symbol
>testee>err>   [0x0000556415cc6bb5] dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)
>testee>err>   [0x0000556415cc9952] dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)
>testee>err>   [0x0000556415cf7c66] dart::IsolateMessageHandler::HandleMessage(dart::Message*)
>testee>err>   [0x0000556415d33f1d] dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)
>testee>err>   [0x0000556415d34d60] dart::MessageHandler::TaskCallback()
>testee>err>   [0x0000556415f2cd71] dart::ThreadPool::Worker::Loop()
>testee>err>   [0x0000556415f2c84c] dart::ThreadPool::Worker::Main(unsigned long)
>testee>err>   [0x0000556415e092d5] Unknown symbol
>testee>err> -- End of DumpStackTrace
** Killing script
Unexpected exception in service tests: NetworkRpcException(Canceling request: WebSocket closed(id: 24 method: getIsolate params: {isolateId: isolates/776604338}))
null
stderr:
Unhandled exception:
NetworkRpcException(Canceling request: WebSocket closed(id: 24 method: getIsolate params: {isolateId: isolates/776604338}))
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3      _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
--- Re-run this test:
python tools/test.py -m debug -n dartk-linux-debug-x64 --output-directory /b/s/w/ioVDCHr_ service/rewind_test

Should we revert this?

/cc @sjindel-google @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 28, 2018
@sjindel-google sjindel-google self-assigned this Aug 29, 2018
@mkustermann
Copy link
Member Author

This is probably the same issue as #34435 . So I'll close this issue in favor of the other one.

dart-bot pushed a commit that referenced this issue Oct 15, 2018
Similar to how we treat catch entry instructions, this cl adds new
function and osr entry instructions. The [FunctionEntry] and
[OsrEntry] - just like [CatchBlockEntry] - have now their own initial
definitions. The [GraphEntry] has only initial definitions for
constants.

Explicit phis are inserted for all parameter / special parameter
instructions if necessary.

Future work is:

  a) Minimize parallel moves due to the phis on parameters
  b) Cleanup frame setup: Move it entirely into FunctionEntry/CatchEntry
    (instead of the split version we have now)

Fixes #34435
Fixes #34287

Change-Id: Iefa0280a709716f748d6fb0523b8d0f4d8de1fec
Reviewed-on: https://dart-review.googlesource.com/c/74782
Commit-Queue: Martin Kustermann <[email protected]>
Reviewed-by: Vyacheslav Egorov <[email protected]>
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

2 participants