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

[mt][browser] HttpClient_CancelInDifferentThread failing with operation cancelled #98101

Open
ilonatommy opened this issue Feb 7, 2024 · 8 comments · Fixed by #100029
Open
Assignees
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono disabled-test The test is disabled in source code against the issue Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm
Milestone

Comments

@ilonatommy
Copy link
Member

ilonatommy commented Feb 7, 2024

Error Blob

{
  "ErrorMessage": "[FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Reproduction Steps

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=557097
Log

[12:49:20] fail: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: JSWebWorker, executor2: NewThread)
[12:49:20] info: System.OperationCanceledException : The operation was canceled.
[12:49:20] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerTestBase.<ActionsInDifferentThreads>d__8`1[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[12:49:20] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_ActionInDifferentThread(String url, Executor executor1, Executor executor2, Func`2 e2Job)
[12:49:20] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(Executor executor1, Executor executor2)
[12:49:20] info: --- End of stack trace from previous location ---

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
@ilonatommy ilonatommy added arch-wasm WebAssembly architecture blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' area-VM-threading-mono Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm labels Feb 7, 2024
@ghost
Copy link

ghost commented Feb 7, 2024

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Error Blob

{
  "ErrorMessage": "[FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": true
}

Reproduction Steps

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=556841
Log

[12:49:20] fail: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: JSWebWorker, executor2: NewThread)
[12:49:20] info: System.OperationCanceledException : The operation was canceled.
[12:49:20] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerTestBase.<ActionsInDifferentThreads>d__8`1[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[12:49:20] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_ActionInDifferentThread(String url, Executor executor1, Executor executor2, Func`2 e2Job)
[12:49:20] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(Executor executor1, Executor executor2)
[12:49:20] info: --- End of stack trace from previous location ---
Author: ilonatommy
Assignees: -
Labels:

arch-wasm, blocking-clean-ci, area-VM-threading-mono, Known Build Error, os-browser

Milestone: -

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 7, 2024
@pavelsavara pavelsavara self-assigned this Feb 7, 2024
@pavelsavara pavelsavara added this to the 9.0.0 milestone Feb 7, 2024
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Feb 7, 2024
@mkhamoyan
Copy link
Contributor

After #98291

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=575688

Log

[14:04:32] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: JSWebWorker, executor2: NewThread)
[14:04:32] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 1188 NativeThreadId: 118751296
[14:04:37] info: Unexpected test case HttpClient_ActionInDifferentThread timeout after 00:00:05.0510000 ManagedThreadId:3
[14:04:37] info: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: JSWebWorker, executor2: NewThread)
[14:04:37] info: System.OperationCanceledException : The operation was canceled.
[14:04:37] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerTestBase.<ActionsInDifferentThreads>d__8`1[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[14:04:37] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_ActionInDifferentThread(String url, Executor executor1, Executor executor2, Func`2 e2Job)
[14:04:37] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(Executor executor1, Executor executor2)
[14:04:37] info: --- End of stack trace from previous location ---

@pavelsavara
Copy link
Member

Another Log

[19:43:57] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: JSWebWorker, executor2: ThreadPool)
[19:43:57] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 9 NativeThreadId: 56186504
[19:44:02] info: Unexpected test case HttpClient_ActionInDifferentThread timeout after 00:00:05.0530000 ManagedThreadId:10
[19:44:02] info: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: JSWebWorker, executor2: ThreadPool)
[19:44:02] info: System.OperationCanceledException : The operation was canceled.
[19:44:02] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerTestBase.<ActionsInDifferentThreads>d__8`1[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[19:44:02] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_ActionInDifferentThread(String url, Executor executor1, Executor executor2, Func`2 e2Job)
[19:44:02] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(Executor executor1, Executor executor2)
[19:44:02] info: --- End of stack trace from previous location ---

We can see that this is that the first/test cancelation was not delivered and that only timeout cancelation of the killing JSWebWorker 5 seconds later helped.

@lewing
Copy link
Member

lewing commented Mar 18, 2024

@pavelsavara do we think this one has been resolved?

@pavelsavara pavelsavara reopened this Mar 20, 2024
@dotnet-policy-service dotnet-policy-service bot added in-pr There is an active PR which will close this issue when it is merged labels Mar 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2024
@mkhamoyan mkhamoyan reopened this Aug 7, 2024
@mkhamoyan
Copy link
Contributor

mkhamoyan commented Aug 7, 2024

Reopening as this started hitting again see log

[00:19:43] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: ThreadPool, executor2: NewThread)
[00:19:48] info: Unexpected test case HttpClient_ActionInDifferentThread timeout after 00:00:05 ManagedThreadId:10
[00:19:53] info: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: ThreadPool, executor2: NewThread)
[00:19:53] info: System.OperationCanceledException : The operation was canceled.
[00:19:53] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerTestBase.<ActionsInDifferentThreads>d__9`1[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[00:19:53] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_ActionInDifferentThread(String url, Executor executor1, Executor executor2, Func`2 e2Job)
[00:19:53] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(Executor executor1, Executor executor2)
[00:19:53] info: --- End of stack trace from previous location ---

@mkhamoyan
Copy link
Contributor

This started occurring more frequently.

[05:45:09] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: Main, executor2: Main)
[05:45:09] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 1 NativeThreadId: 13312336
[05:45:09] info: [PASS] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread
[05:45:09] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: Main, executor2: ThreadPool)
[05:45:09] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 5 NativeThreadId: 51890608
[05:45:09] info: [PASS] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread
[05:45:09] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: Main, executor2: NewThread)
[05:45:09] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 13 NativeThreadId: 101384192
[05:45:09] info: [PASS] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread
[05:45:09] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: Main, executor2: JSWebWorker)
[05:45:09] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 14 NativeThreadId: 101384192
[05:45:09] info: [0x060b0000-jsww 05:45:09.303] MONO_WASM: forceDisposeProxies done: 1 imports, 0 exports, 0 GCHandles, 0 JSHandles.
[05:45:09] info: [PASS] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread
[05:45:09] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: ThreadPool, executor2: Main)
[05:45:09] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 1 NativeThreadId: 13312336
[05:45:09] info: [PASS] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread
[05:45:09] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: ThreadPool, executor2: ThreadPool)
[05:45:09] info: HttpClient_CancelInDifferentThread: ManagedThreadId: 5 NativeThreadId: 51890608
[05:45:09] info: [PASS] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread
[05:45:09] info: [STRT] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: ThreadPool, executor2: NewThread)
[05:45:14] info: Unexpected test case HttpClient_ActionInDifferentThread timeout after 00:00:05.0010000 ManagedThreadId:9
[05:45:19] info: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(executor1: ThreadPool, executor2: NewThread)
[05:45:19] info: System.OperationCanceledException : The operation was canceled.
[05:45:19] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerTestBase.<ActionsInDifferentThreads>d__9`1[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[05:45:19] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_ActionInDifferentThread(String url, Executor executor1, Executor executor2, Func`2 e2Job)
[05:45:19] info:    at System.Runtime.InteropServices.JavaScript.Tests.WebWorkerHttpTest.HttpClient_CancelInDifferentThread(Executor executor1, Executor executor2)
[05:45:19] info: --- End of stack trace from previous location ---

Checking the logs, it works fine initially but fails on the second round with executor2: NewThread, consistently with NewThread.

@pavelsavara pavelsavara added the disabled-test The test is disabled in source code against the issue label Aug 8, 2024
@pavelsavara pavelsavara modified the milestones: 9.0.0, 10.0.0 Aug 8, 2024
@pavelsavara
Copy link
Member

disabled in #106114

@ilonatommy ilonatommy removed the in-pr There is an active PR which will close this issue when it is merged label Aug 26, 2024
@jeffschwMSFT jeffschwMSFT removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Sep 11, 2024
@jeffschwMSFT
Copy link
Member

removing 'blocking-clean-ci' as it has not failed in 30 days

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono disabled-test The test is disabled in source code against the issue Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants