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

pkg/dds/test/dap/integration/debug_exceptions_test went from flaky -> RuntimeError on unittest-asserts-release-win-arm64 #55685

Open
derekxu16 opened this issue May 10, 2024 · 5 comments
Assignees
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. dds-dap DDS issues related to the Debug Adapter Protocol (DAP) implementation gardening

Comments

@derekxu16
Copy link
Member

The tests

pkg/dds/test/dap/integration/debug_exceptions_test RuntimeError (expected Pass)

are failing on configurations

unittest-asserts-release-win-arm64

https://dart-ci.appspot.com/log/pkg-win-release-arm64/unittest-asserts-release-win-arm64/1503/pkg/dds/test/dap/integration/debug_exceptions_test

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

I see two errors in the logs. The first is a SocketException:

00:02 �[32m+0�[0m�[31m -1�[0m: debug mode does not pause on exceptions if mode not set �[1m�[31m[E]�[0m�[0m

  SocketException: Write failed (OS Error: The pipe is being closed.

  , errno = 232), port = 0

  dart:io-patch/socket_patch.dart 1246:34       _NativeSocket.write
  dart:io-patch/socket_patch.dart 2004:15       _RawSocket.write
  dart:io-patch/socket_patch.dart 2481:18       _Socket._write
  dart:io-patch/socket_patch.dart 2216:28       _SocketStreamConsumer.write
  dart:io-patch/socket_patch.dart 2168:11       _SocketStreamConsumer.addStream.<fn>
  dart:async/zone.dart 1407:47                  _rootRunUnary
  dart:async/zone.dart 1308:19                  _CustomZone.runUnary
  dart:async/zone.dart 1217:7                   _CustomZone.runUnaryGuarded
  dart:async/stream_impl.dart 365:11            _BufferingStreamSubscription._sendData
  dart:async/stream_impl.dart 541:14            _DelayedData.perform
  dart:async/stream_impl.dart 646:11            _PendingEvents.handleNext
  dart:async/stream_impl.dart 617:7             _PendingEvents.schedule.<fn>
  dart:async/zone.dart 1391:47                  _rootRun
  dart:async/zone.dart 1301:19                  _CustomZone.run
  dart:async/zone.dart 1209:7                   _CustomZone.runGuarded
  dart:async/zone.dart 1249:23                  _CustomZone.bindCallbackGuarded.<fn>
  dart:async/zone.dart 1399:13                  _rootRun
  dart:async/zone.dart 1301:19                  _CustomZone.run
  dart:async/zone.dart 1209:7                   _CustomZone.runGuarded
  dart:async/zone.dart 1249:23                  _CustomZone.bindCallbackGuarded.<fn>
  dart:async/schedule_microtask.dart 40:21      _microtaskLoop
  dart:async/schedule_microtask.dart 49:5       _startMicrotaskLoop
  dart:isolate-patch/isolate_patch.dart 118:13  _runPendingImmediateCallback
  dart:isolate-patch/isolate_patch.dart 185:5   _RawReceivePort._handleMessage

The second is a drive letter capitalization mismatch:

00:14 �[32m+5�[0m�[31m -1�[0m: debug mode pauses on uncaught exceptions when mode=Unhandled (supportUris: false, sendFileUris: false)�[0m

Request "terminate" has taken longer than 10s

00:14 �[32m+5�[0m�[31m -2�[0m: debug mode parses line/column information from stack traces �[1m�[31m[E]�[0m�[0m

  Expected: 'c:\\opt\\s\\w\\ir\\x\\t\\dart-sdk-dap-test5e2fb1cf\\app19a5c4a8\\test_file.dart'
    Actual: 'C:\\opt\\s\\w\\ir\\x\\t\\dart-sdk-dap-test5e2fb1cf\\app19a5c4a8\\test_file.dart'
     Which: is different.
            Expected: c:\\opt\\s ...
              Actual: C:\\opt\\s ...
                      ^
             Differ at offset 0
  

  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\dds\test\dap\integration\debug_exceptions_test.dart 91:7  main.<fn>.<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>
@derekxu16 derekxu16 added gardening dds-dap DDS issues related to the Debug Adapter Protocol (DAP) implementation labels May 10, 2024
@derekxu16
Copy link
Member Author

cc @bkonyi and @DanTup

@mraleph mraleph added the area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. label May 11, 2024
@DanTup
Copy link
Collaborator

DanTup commented May 13, 2024

https://dart-review.googlesource.com/c/sdk/+/365804 should fix the drive letter mismatch (oddly that test hasn't changed in 2yrs.. not sure if the drive letter casing is somehow different on some bots for temp directory?).

Hard to tell what the other failure is - @derekxu16 is there a way to tell how frequently it's failing? We could enable verbose output on the bots temporarily to try to get a better idea of what's happening?

@derekxu16
Copy link
Member Author

We have a flakiness dashboard. Unfortunately you have to log in with an @google.com account to access it, but here's a screenshot showing the run results of pkg/dds/test/dap/integration/debug_exceptions_test on Windows:

Screenshot 2024-05-13 at 9 29 54 AM

I don't know how many of these failures were caused by SocketExceptions specifically, but the test is failing frequently.

@DanTup
Copy link
Collaborator

DanTup commented May 13, 2024

I guess many of those failures could be the drive letter issue. Let's land the fix above and then review the stats.. if there are still failures and that wasn't a one-off, I'll open a change to add verbose output and we can go from there.

(I'll ping back here a little after that fix lands)

@DanTup DanTup self-assigned this May 13, 2024
copybara-service bot pushed a commit that referenced this issue May 13, 2024
DAP always normalises drive letters to uppercase and any tests that verify paths should do the same, otherwise tests may fail on bots where the temporary directory (where we create the test projects) happens to be created with a lowercase drive letter.

See #55685

Change-Id: I799faf4b80f3befa55ffca6bb99d28fff19101c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365804
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
@DanTup
Copy link
Collaborator

DanTup commented May 21, 2024

A fix for the second issue (drive casing) has landed. I believe the first issue is the same as #55313 - let me know if we should close this as a dupe, or it's better to keep this open until that's also fixed (I don't know how the flaky test approval works if it might be tied to this?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. dds-dap DDS issues related to the Debug Adapter Protocol (DAP) implementation gardening
Projects
None yet
Development

No branches or pull requests

3 participants