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

source_report_libraries_already_compiled_test flakily crashes #53990

Closed
bkonyi opened this issue Nov 8, 2023 · 3 comments
Closed

source_report_libraries_already_compiled_test flakily crashes #53990

bkonyi opened this issue Nov 8, 2023 · 3 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. cherry-pick-candidate Candidates to be cherry-picked gardening vm-service The VM Service Protocol, both the specification and its implementation

Comments

@bkonyi
Copy link
Contributor

bkonyi commented Nov 8, 2023

This test is experiencing runtime errors ~75% of the time.

/==============================================================================================================\
| pkg/vm_service/test/source_report_libraries_already_compiled_test failed again (RuntimeError, expected Pass) |
\==============================================================================================================/

--- Command "vm" (took 26.000675s):
DART_CONFIGURATION=DebugX64 CHROME_PATH=/b/s/w/ir/cache/builder/sdk/third_party/browsers/chrome/chrome/google-chrome out/DebugX64/dart-sdk/bin/dart --enable_asserts --sound-null-safety -Dtest_runner.configuration=unittest-asserts-debug-linux-x64 --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.dart_tool/package_config.json /b/s/w/ir/cache/builder/sdk/pkg/vm_service/test/source_report_libraries_already_compiled_test.dart

exit code:
255

stdout:
00:00 �[32m+0�[0m: source_report_libraries_already_compiled_test.dart�[0m

** Launching SERVICE_TEST_TESTEE=true out/DebugX64/dart-sdk/bin/dart --disable-dart-dev --disable-service-auth-codes --profiler --enable_asserts --sound-null-safety -Dtest_runner.configuration=unittest-asserts-debug-linux-x64 --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.dart_tool/package_config.json --enable-vm-service:0 /b/s/w/ir/cache/builder/sdk/pkg/vm_service/test/source_report_libraries_already_compiled_test.dart

>testee>out> The Dart VM service is listening on http://127.0.0.1:45431//
** Signaled to run test queries on http://127.0.0.1:45431//

>testee>out> 
>testee>out> hit
>testee>out> hit
Done loading VM

source_report_libraries_already_compiled_test.dart [1/5]

source_report_libraries_already_compiled_test.dart [2/5]

>testee>err> 
>testee>err> ===== CRASH =====
>testee>err> si_signo=Segmentation fault(11), si_code=2, si_addr=0x7f53e7d3a000
>testee>err> version=3.3.0-edge.b9b7de14e0b2871a8a6f2f2a0d0c1d236b8c4fe1 (be) (Wed Nov 8 13:48:59 2023 +0000) on "linux_x64"
>testee>err> pid=302162, thread=302264, isolate_group=main(0x556c326e9820), isolate=main(0x556c326ecab0)
>testee>err> os=linux, arch=x64, comp=no, sim=no
>testee>err> isolate_instructions=556c310d1980, vm_instructions=556c310d1980
>testee>err> fp=7f53b4efc270, sp=7f53b4efc100, pc=556c3154e750
>testee>err>   pc 0x0000556c3154e750 fp 0x00007f53b4efc270 dart::GetSourceReport+0x520
>testee>err>   pc 0x0000556c315445d8 fp 0x00007f53b4efca80 dart::Service::InvokeMethod+0x4d8
>testee>err>   pc 0x0000556c3154504a fp 0x00007f53b4efcab0 dart::Service::HandleIsolateMessage+0x1a
>testee>err>   pc 0x0000556c3134dc63 fp 0x00007f53b4efd240 dart::IsolateMessageHandler::HandleMessage+0x273
>testee>err>   pc 0x0000556c3138bcc5 fp 0x00007f53b4efd2d0 dart::MessageHandler::HandleMessages+0x1d5
>testee>err>   pc 0x0000556c3138c369 fp 0x00007f53b4efd330 dart::MessageHandler::HandleOOBMessages+0x99
>testee>err>   pc 0x0000556c31a412cd fp 0x00007f53b4efd3c0 Dart_HandleServiceMessages+0x13d
>testee>err>   pc 0x0000556c31354b3d fp 0x00007f53b4efd410 dart::Isolate::PauseEventHandler+0xad
>testee>err>   pc 0x0000556c3131b73a fp 0x00007f53b4efd5c0 dart::Debugger::Pause+0xaa
>testee>err>   pc 0x0000556c313286ea fp 0x00007f53b4efd710 dart::Debugger::SignalPausedEvent+0xaa
>testee>err>   pc 0x0000556c31328a70 fp 0x00007f53b4efd770 dart::Debugger::PauseStepping+0x240
>testee>err>   pc 0x0000556c3152dada fp 0x00007f53b4efdea0 dart::DRT_SingleStepHandler+0x15a
>testee>err>   pc 0x00007f53e7b82ff2 fp 0x00007f53b4efdee8 Unknown symbol
>testee>err>   pc 0x00007f53e7b834f1 fp 0x00007f53b4efdf08 Unknown symbol
>testee>err>   pc 0x00007f53e6eac5d0 fp 0x00007f53b4efdf30 Unknown symbol
>testee>err>   pc 0x00007f53e6eac456 fp 0x00007f53b4efdf58 Unknown symbol
>testee>err>   pc 0x00007f53e6eabc15 fp 0x00007f53b4efdfe0 Unknown symbol
>testee>err>   pc 0x00007f53e6ea9198 fp 0x00007f53b4efe0b0 Unknown symbol
>testee>err>   pc 0x00007f53e6ea59b5 fp 0x00007f53b4efe118 Unknown symbol
>testee>err>   pc 0x00007f53e6ea583b fp 0x00007f53b4efe168 Unknown symbol
>testee>err>   pc 0x00007f53e6ea4926 fp 0x00007f53b4efe1d0 Unknown symbol
>testee>err>   pc 0x00007f53e6ea4bbc fp 0x00007f53b4efe218 Unknown symbol
>testee>err>   pc 0x00007f53e6ea4926 fp 0x00007f53b4efe280 Unknown symbol
>testee>err>   pc 0x00007f53e6ea3959 fp 0x00007f53b4efe2d8 Unknown symbol
>testee>err>   pc 0x00007f53e7b83474 fp 0x00007f53b4efe350 Unknown symbol
>testee>err>   pc 0x0000556c31315d1f fp 0x00007f53b4efe3c0 dart::DartEntry::InvokeFunction+0x12f
>testee>err>   pc 0x0000556c313188f5 fp 0x00007f53b4efe420 dart::DartLibraryCalls::HandleMessage+0xf5
>testee>err>   pc 0x0000556c3134dd6d fp 0x00007f53b4efebb0 dart::IsolateMessageHandler::HandleMessage+0x37d
>testee>err>   pc 0x0000556c3138bcc5 fp 0x00007f53b4efec40 dart::MessageHandler::HandleMessages+0x1d5
>testee>err>   pc 0x0000556c3138c967 fp 0x00007f53b4efecc0 dart::MessageHandler::TaskCallback+0x307
>testee>err>   pc 0x0000556c31584700 fp 0x00007f53b4efed50 dart::ThreadPool::WorkerLoop+0x180
>testee>err>   pc 0x0000556c3158502b fp 0x00007f53b4efeda0 dart::ThreadPool::Worker::Main+0x12b
>testee>err>   pc 0x0000556c314b6003 fp 0x00007f53b4efeef0 dart::ThreadStart+0x103
>testee>err> -- End of DumpStackTrace
>testee>err>   pc 0x0000000000000000 fp 0x00007f53b4efdee8 sp 0x0000000000000000 [Stub] CallToRuntime
>testee>err>   pc 0x00007f53e7b834f1 fp 0x00007f53b4efdf08 sp 0x00007f53b4efdef8 [Stub] DebugStepCheck
>testee>err>   pc 0x00007f53e6eac5d0 fp 0x00007f53b4efdf30 sp 0x00007f53b4efdf18 [Unoptimized] testFunction
>testee>err>   pc 0x00007f53e6eac456 fp 0x00007f53b4efdf58 sp 0x00007f53b4efdf40 [Unoptimized] testFunction
>testee>err>   pc 0x00007f53e6eabc15 fp 0x00007f53b4efdfe0 sp 0x00007f53b4efdf68 [Unoptimized] _ServiceTesteeRunner@22484714.run
>testee>err>   pc 0x00007f53e6ea9198 fp 0x00007f53b4efe0b0 sp 0x00007f53b4efdff0 [Unoptimized] runIsolateTests
>testee>err>   pc 0x00007f53e6ea59b5 fp 0x00007f53b4efe118 sp 0x00007f53b4efe0c0 [Unoptimized] main
>testee>err>   pc 0x00007f53e6ea583b fp 0x00007f53b4efe168 sp 0x00007f53b4efe128 [Unoptimized] main
>testee>err>   pc 0x00007f53e6ea4926 fp 0x00007f53b4efe1d0 sp 0x00007f53b4efe178 [Unoptimized] _Closure@0150898.dyn:call
>testee>err>   pc 0x00007f53e6ea4bbc fp 0x00007f53b4efe218 sp 0x00007f53b4efe1e0 [Unoptimized] _delayEntrypointInvocation@1026248.<anonymous closure>
>testee>err>   pc 0x00007f53e6ea4926 fp 0x00007f53b4efe280 sp 0x00007f53b4efe228 [Unoptimized] _Closure@0150898.dyn:call
>testee>err>   pc 0x00007f53e6ea3959 fp 0x00007f53b4efe2d8 sp 0x00007f53b4efe290 [Unoptimized] _RawReceivePort@1026248._handleMessage@1026248
>testee>err>   pc 0x00007f53e7b83474 fp 0x00007f53b4efe350 sp 0x00007f53b4efe2e8 [Stub] InvokeDartCode

stderr:
Unhandled exception:
Testee exited with unexpected exitCode: -6
#0      _ServiceTesterRunner.run (file:///b/s/w/ir/cache/builder/sdk/pkg/vm_service/test/common/test_helper.dart:330:9)
<asynchronous suspension>
#1      runIsolateTests (file:///b/s/w/ir/cache/builder/sdk/pkg/vm_service/test/common/test_helper.dart:397:5)
<asynchronous suspension>
#2      main (file:///b/s/w/ir/cache/builder/sdk/pkg/vm_service/test/source_report_libraries_already_compiled_test.dart:90:42)
<asynchronous suspension>

--- Re-run this test:
python3 tools/test.py -n unittest-asserts-debug-linux-x64 pkg/vm_service/test/source_report_libraries_already_compiled_test

See full logs here.

@bkonyi bkonyi added area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. gardening vm-service The VM Service Protocol, both the specification and its implementation labels Nov 8, 2023
@derekxu16
Copy link
Member

This test just went from Pass -> RuntimeError on unittest-asserts-release-win-arm64, but because of an expectation failure and not a crash.

00:04 �[32m+0�[0m�[31m -1�[0m: source_report_libraries_already_compiled_test.dart �[1m�[31m[E]�[0m�[0m

  Expected: equals [15, 16, 28, 30, 31, 36] unordered
    Actual: Set:[]
     Which: has too few elements (0 < 6)
  

  package:matcher/src/expect/expect.dart 149:31                                fail
  package:matcher/src/expect/expect.dart 144:3                                 _expect
  package:matcher/src/expect/expect.dart 56:3                                  expect
  pkg\vm_service\test\source_report_libraries_already_compiled_test.dart 86:7  librariesAlreadyCompiledTest.<fn>
  ===== asynchronous gap ===========================
  pkg\vm_service\test\common\test_helper.dart 312:13                           _ServiceTesterRunner.run.<fn>
  ===== asynchronous gap ===========================
  package:test_api/src/backend/declarer.dart 215:9                             Declarer.test.<fn>.<fn>
  ===== asynchronous gap ===========================
  package:test_api/src/backend/declarer.dart 213:7                             Declarer.test.<fn>
  ===== asynchronous gap ===========================
  package:test_api/src/backend/invoker.dart 258:9                              Invoker._waitForOutstandingCallbacks.<fn>

https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-win-release-arm64/81/overview

@derekxu16 derekxu16 changed the title source_report_libraries_already_compiled_test flakily crashes on unittest-asserts-debug-linux-x64 source_report_libraries_already_compiled_test flakily crashes Nov 13, 2023
@liamappelbe
Copy link
Contributor

@a-siva Can we get a cherry-pick on this?

@a-siva a-siva added the cherry-pick-candidate Candidates to be cherry-picked label Nov 14, 2023
@a-siva
Copy link
Contributor

a-siva commented Nov 15, 2023

flutter/flutter#124145 is the related Flutter issue

copybara-service bot pushed a commit that referenced this issue Nov 20, 2023
Changed the definition of `end` to point 1 past the end of the element,
rather than the end of the element, which avoids the need for buggy
look-ahead style lookups.

I think this must have been a long standing bug, and we just never sent
empty JSON arrays to the service until now, because I didn't change this
logic when I refactored it.

TEST=Added Service_ParseJSONArray

Bug: flutter/flutter#124145 #53990
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/335980
Cherry-pick-request: #54059
Change-Id: I995e136881d08627cc6a7f9e60a57e76db55024c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336603
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
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, FFI, and the AOT and JIT backends. cherry-pick-candidate Candidates to be cherry-picked gardening vm-service The VM Service Protocol, both the specification and its implementation
Projects
None yet
Development

No branches or pull requests

4 participants