runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[mt][browser] `HttpClient_CancelInDifferentThread` failing with operation cancelled

Open ilonatommy opened this issue 1 year ago • 1 comments

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

Build Definition Test Pull Request
560714 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#97537
559500 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#97738
559347 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#97487
558439 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#97213
558384 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#98151
557841 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#98077
557097 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#98102
556841 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#98083
556006 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#97959
555488 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#97970
555445 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#98037

Summary

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

ilonatommy avatar Feb 07 '24 14:02 ilonatommy

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 avatar Feb 07 '24 14:02 ghost

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 ---

mkhamoyan avatar Feb 23 '24 10:02 mkhamoyan

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.

pavelsavara avatar Mar 10 '24 14:03 pavelsavara

@pavelsavara do we think this one has been resolved?

lewing avatar Mar 18 '24 20:03 lewing

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 avatar Aug 07 '24 08:08 mkhamoyan

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.

mkhamoyan avatar Aug 08 '24 08:08 mkhamoyan

disabled in https://github.com/dotnet/runtime/pull/106114

pavelsavara avatar Aug 08 '24 09:08 pavelsavara