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

[MSBuildDeviceIntegration] Handle Debugger errors #7864

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

dellis1972
Copy link
Contributor

We occasionally see the following errors on CI.

Unhandled error launching soft debugger
System.AggregateException: One or more errors occurred. (DWP Handshake failed.)
 ---> System.IO.IOException: DWP Handshake failed.
   at Mono.Debugger.Soft.Connection.Connect() in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:line 1361
   at Mono.Debugger.Soft.VirtualMachine.connect() in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:line 381
   at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError) in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs:line 353
   at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternalAsync(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep) in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs:line 309
   --- End of inner exception stack trace ---

What is supposed to happen is the test shoud be retried. However according to the NUnit docs (1) the Retry attribute won't work if an unhandled exception occurs. So lets handle them, this way the Retry ca do its job and re-try the test.

[1] https://docs.nunit.org/articles/nunit/writing-tests/attributes/retry.html

@dellis1972 dellis1972 requested a review from jonpryor as a code owner March 8, 2023 13:29
@dellis1972 dellis1972 requested a review from grendello March 8, 2023 13:29
@dellis1972 dellis1972 force-pushed the debuggererrors branch 4 times, most recently from 1119bb2 to f18c4e7 Compare March 14, 2023 10:22
We occasionally see the following errors on CI.

```
Unhandled error launching soft debugger
System.AggregateException: One or more errors occurred. (DWP Handshake failed.)
 ---> System.IO.IOException: DWP Handshake failed.
   at Mono.Debugger.Soft.Connection.Connect() in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:line 1361
   at Mono.Debugger.Soft.VirtualMachine.connect() in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:line 381
   at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError) in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs:line 353
   at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternalAsync(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep) in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs:line 309
   --- End of inner exception stack trace ---
```

What is supposed to happen is the test shoud be retried. However
according to the NUnit docs (1) the `Retry` attribute won't work if
an unhandled exception occurs. So lets handle them, this way the `Retry`
ca do its job and re-try the test.

[1] https://docs.nunit.org/articles/nunit/writing-tests/attributes/retry.html
@jonpryor jonpryor merged commit d174b9b into dotnet:main Mar 14, 2023
@dellis1972 dellis1972 deleted the debuggererrors branch March 14, 2023 23:21
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 15, 2023
* main:
  [AOT] provide libc and libm stubs so NDK is not required (dotnet#7475)
  [MSBuildDeviceIntegration] Handle Debugger errors (dotnet#7864)
  [ci] Remove separate SmokeTests jobs. (dotnet#7872)
  Bump to dotnet/installer@cddf8e6 8.0.100-preview.3.23163.4 (dotnet#7885)
  [Actions] Do not double quote the commit message (dotnet#7887)
  [Actions] Ensure that the commit message is valid json. (dotnet#7884)
  [github] Use ".NET Android", not "Android for .NET" (dotnet#7882)
  Bump `$(AndroidNet7Version)` (dotnet#7883)
  [ci] Install fewer Android SDK platforms on test agents. (dotnet#7874)
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 15, 2023
* main:
  [AOT] provide libc and libm stubs so NDK is not required (dotnet#7475)
  [MSBuildDeviceIntegration] Handle Debugger errors (dotnet#7864)
  [ci] Remove separate SmokeTests jobs. (dotnet#7872)
  Bump to dotnet/installer@cddf8e6 8.0.100-preview.3.23163.4 (dotnet#7885)
  [Actions] Do not double quote the commit message (dotnet#7887)
  [Actions] Ensure that the commit message is valid json. (dotnet#7884)
  [github] Use ".NET Android", not "Android for .NET" (dotnet#7882)
  Bump `$(AndroidNet7Version)` (dotnet#7883)
  [ci] Install fewer Android SDK platforms on test agents. (dotnet#7874)
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 15, 2023
* main:
  [AOT] provide libc and libm stubs so NDK is not required (dotnet#7475)
  [MSBuildDeviceIntegration] Handle Debugger errors (dotnet#7864)
  [ci] Remove separate SmokeTests jobs. (dotnet#7872)
  Bump to dotnet/installer@cddf8e6 8.0.100-preview.3.23163.4 (dotnet#7885)
  [Actions] Do not double quote the commit message (dotnet#7887)
  [Actions] Ensure that the commit message is valid json. (dotnet#7884)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants