Skip to content

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

Closed

Description

@ilonatommy

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

Activity

  1. added
    arch-wasm
    blocking-clean-ci
    Known Build Error
    os-browser
    on Feb 7, 2024
  2. ghost added
    untriaged
    on Feb 7, 2024
  3. self-assigned this
    on Feb 7, 2024
  4. added this to the 9.0.0 milestone on Feb 7, 2024
  5. ghost removed
    untriaged
    on Feb 7, 2024
  6. mkhamoyan commented on Feb 23, 2024

    @mkhamoyan
    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 ---
    
  7. pavelsavara commented on Mar 10, 2024

    @pavelsavara
    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.

  8. lewing commented on Mar 18, 2024

    @lewing
    Member

    @pavelsavara do we think this one has been resolved?

  9. 4 remaining items

  10. locked and limited conversation to collaborators on Apr 21, 2024
  11. mkhamoyan commented on Aug 7, 2024

    @mkhamoyan
    Contributor

    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 ---
    
  12. mkhamoyan commented on Aug 8, 2024

    @mkhamoyan
    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.

  13. added
    disabled-test
    on Aug 8, 2024
  14. modified the milestones: 9.0.0, 10.0.0 on Aug 8, 2024
  15. pavelsavara commented on Aug 8, 2024

    @pavelsavara
    Member

    disabled in #106114

  16. removed
    in-pr
    on Aug 26, 2024
  17. removed
    blocking-clean-ci
    on Sep 11, 2024
  18. jeffschwMSFT commented on Sep 11, 2024

    @jeffschwMSFT
    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
  19. modified the milestones: 10.0.0, Future on Feb 19, 2025
  20. removed
    Known Build Error
    on Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-VM-threading-monodisabled-testos-browser

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions