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

Debugger crashed in App-jit mode #36642

Closed
zichangg opened this issue Apr 15, 2019 · 0 comments
Closed

Debugger crashed in App-jit mode #36642

zichangg opened this issue Apr 15, 2019 · 0 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@zichangg
Copy link
Contributor

Debugger will try to check source of script, which does not exist in App-jit mode.
Object.cc:9445

Reproduce the problem:
First, correct the line number from 24,26 to 23,25 and comment out 'deferred library'.
out/ReleaseX64/dart --snapshot=/tmp/out.jitsnapshot --snapshot-kind=app-jit --ignore-unrecognized-flags runtime/observatory/tests/service/add_breakpoint_rpc_test.dart
out/ReleaseX64/dart /tmp/out.jitsnapshot

Result:
`** Launching SERVICE_TEST_TESTEE=true out/ReleaseX64/dart --pause-isolates-on-start --profiler --enable-vm-service:0 /tmp/out.jitsnapshot
** Signaled to run test queries on http://127.0.0.1:43145/

testee>out> Observatory listening on http://127.0.0.1:43145/
Loading VM...
Done loading VM
Running out.jitsnapshot [1/3]
Paused with PauseStart
Running out.jitsnapshot [2/3]
testee>err>
testee>err> ===== CRASH =====
testee>err> si_signo=Segmentation fault(11), si_code=1, si_addr=0xd14000511dc
testee>err> version=2.2.1-edge.79974bb02605d0cc16c8a8bda8de23920a890649 (Mon Apr 15 16:50:14 2019 +0000) on "linux_x64"
testee>err> thread=81956, isolate=main(0x559726d98900)
testee>err> pc 0x0000559724b0a7ec fp 0x00007fb24df3ad30 dart::Script::GetTokenLocation(dart::TokenPosition, long*, long*, long*) const
testee>err> pc 0x0000559724a7226d fp 0x00007fb24df3ae40 dart::Debugger::ResolveBreakpointPos(dart::Function const&, dart::TokenPosition, dart::TokenPosition, long)
testee>err> pc 0x0000559724a762b7 fp 0x00007fb24df3afd0 dart::Debugger::NotifyCompilation(dart::Function const&)
testee>err> pc 0x0000559724d44e3e fp 0x00007fb24df3b660 dart::CompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)
testee>err> pc 0x0000559724d459b1 fp 0x00007fb24df3c0c0 out/ReleaseX64/dart+0x18419b1
testee>err> pc 0x0000559724d452f7 fp 0x00007fb24df3c160 dart::Compiler::CompileFunction(dart::Thread*, dart::Function const&)
testee>err> pc 0x0000559724d42fac fp 0x00007fb24df3ca60 dart::DRT_CompileFunction(dart::NativeArguments)
testee>err> pc 0x00007fb24e041108 fp 0x00007fb24df3caa8 Unknown symbol
testee>err> pc 0x00007fb24e041184 fp 0x00007fb24df3cad8 Unknown symbol
testee>err> pc 0x00007fb2503d3f59 fp 0x00007fb24df3cb10 Unknown symbol
testee>err> pc 0x00007fb2503f9db4 fp 0x00007fb24df3cb48 Unknown symbol
testee>err> pc 0x00007fb24954ecf1 fp 0x00007fb24df3cb88 Unknown symbol
testee>err> pc 0x00007fb24954e8d4 fp 0x00007fb24df3cbc8 Unknown symbol
testee>err> pc 0x00007fb24954e23c fp 0x00007fb24df3cc60 Unknown symbol
testee>err> pc 0x00007fb2503d3f59 fp 0x00007fb24df3cc98 Unknown symbol
testee>err> pc 0x00007fb2503f9db4 fp 0x00007fb24df3ccd0 Unknown symbol
testee>err> pc 0x00007fb24954d9da fp 0x00007fb24df3cd70 Unknown symbol
testee>err> pc 0x00007fb2504b5546 fp 0x00007fb24df3ce20 Unknown symbol
testee>err> pc 0x00007fb2503d3f59 fp 0x00007fb24df3ce58 Unknown symbol
testee>err> pc 0x00007fb2503f9db4 fp 0x00007fb24df3ce90 Unknown symbol
testee>err> pc 0x00007fb2504b65a4 fp 0x00007fb24df3cfa0 Unknown symbol
testee>err> pc 0x00007fb250508c72 fp 0x00007fb24df3cfe8 Unknown symbol
testee>err> pc 0x00007fb250508e80 fp 0x00007fb24df3d030 Unknown symbol
testee>err> pc 0x00007fb2503cb09c fp 0x00007fb24df3d070 Unknown symbol
testee>err> pc 0x00007fb2505595e6 fp 0x00007fb24df3d0c0 Unknown symbol
testee>err> pc 0x00007fb2503cb09c fp 0x00007fb24df3d100 Unknown symbol
testee>err> pc 0x00007fb25056fe33 fp 0x00007fb24df3d138 Unknown symbol
testee>err> pc 0x00007fb24e0415cc fp 0x00007fb24df3d1a8 Unknown symbol
testee>err> pc 0x0000559724a62661 fp 0x00007fb24df3d250 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)
testee>err> pc 0x0000559724a65b26 fp 0x00007fb24df3d2b0 dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)
testee>err> pc 0x0000559724a97a1e fp 0x00007fb24df3dd00 dart::IsolateMessageHandler::HandleMessage(dart::Message*)
testee>err> pc 0x0000559724aca1ae fp 0x00007fb24df3dd50 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)
testee>err> pc 0x0000559724aca7f6 fp 0x00007fb24df3ddb0 dart::MessageHandler::TaskCallback()
testee>err> pc 0x0000559724bfb547 fp 0x00007fb24df3dde0 dart::ThreadPool::Worker::Loop()
testee>err> pc 0x0000559724bfb402 fp 0x00007fb24df3de20 dart::ThreadPool::Worker::Main(unsigned long)
testee>err> pc 0x0000559724b68539 fp 0x00007fb24df3ded0 out/ReleaseX64/dart+0x1664539
testee>err> -- End of DumpStackTrace
** Killing script
Unexpected exception in service tests: Testee exited with -6
#0 _ServiceTesteeLauncher.launch.. (file:///usr/local/google/home/zichangguo/dart-sdk/sdk/runtime/observatory/tests/service/test_helper.dart:256:11)
#1 _rootRunUnary (dart:async/zone.dart:1132:38)
#2 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#3 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#4 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#5 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#6 Future._completeWithValue (dart:async/future_impl.dart:483:5)
#7 Future._asyncComplete. (dart:async/future_impl.dart:513:7)
#8 _rootRun (dart:async/zone.dart:1124:13)
#9 _CustomZone.run (dart:async/zone.dart:1021:19)
#10 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#11 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#12 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#13 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#14 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

Unhandled exception:
Testee exited with -6
#0 _ServiceTesteeLauncher.launch.. (file:///usr/local/google/home/zichangguo/dart-sdk/sdk/runtime/observatory/tests/service/test_helper.dart:256:11)
#1 _rootRunUnary (dart:async/zone.dart:1132:38)
#2 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#3 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#4 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#5 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#6 Future._completeWithValue (dart:async/future_impl.dart:483:5)
#7 Future._asyncComplete. (dart:async/future_impl.dart:513:7)
#8 _rootRun (dart:async/zone.dart:1124:13)
#9 _CustomZone.run (dart:async/zone.dart:1021:19)
#10 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#11 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#12 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#13 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#14 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
`

Possible affected tests:
runtime/observatory/tests/service/add_breakpoint_rpc_tests.dart
runtime/observatory/tests/service/add_breakpoint_rpc_kernel_tests.dart
runtime/observatory/tests/service/column_breakpoint_test.dart

@zichangg zichangg added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Apr 15, 2019
@zichangg zichangg self-assigned this Apr 15, 2019
dart-bot pushed a commit that referenced this issue May 2, 2019
When resolving column breakpoint, debugger will lookup the character in the source of script to make sure the column has been specified within the range of a valid identifier.
With this CL, column breakpoint will be resolved previous safepoint position, if requested column falls within [saftpoint, next_safepoint/end of line(smaller one)]. For example, setting column breakpoint on left bracket of a function call might be resolved to function call now. Setting on the end of line will resolved to previous safepoint.

BUG: #36642
Change-Id: I16427772fde4c653da7629e3340282ef1d9046eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100404
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
@zichangg zichangg closed this as completed May 3, 2019
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