Skip to content

[wasm][R2R] StateMachineAsync profiler callstack identities do not resolve #134145

Closed

Description

@lewing

Description

Three state-machine (V1) async-profiler tests cannot resolve their managed callstack identities in WebAssembly ReadyToRun execution:

  • StateMachineAsync_SingleThread_ChainEventsAndCallstack
  • StateMachineAsync_ValueTask_SingleThread_ChainEventsAndCallstack
  • StateMachineAsync_PoolingValueTask_SingleThread_ChainEventsAndCallstack

These were originally tracked together with runtime-async (V2) diagnostic identities in #133626. Merged #133768 fixes the V2 ResumeInfo.DiagnosticIP implementation, but isolated A/B validation showed that all three V1 cases still fail because they use a different identity provider.

Reproduction Steps

Build matched browser CoreCLR products and run the three existing methods with aggressive trimming and ReadyToRun enabled:

export PATH="/opt/homebrew/opt/python@3.13/libexec/bin:/opt/homebrew/bin:$PATH"
export DOTNET_WASM_TOOL_CACHE_DIR="$PWD/.dotnet/wasm-tools"
export XHARNESS_COMMAND=test-browser

./build.sh clr+libs+host+packs -os browser -c Release \
  /p:AotHostArchitecture=arm64 /p:AotHostOS=osx

./dotnet.sh build /t:Test \
  src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/System.Threading.Tasks.Tests.csproj \
  /p:TargetOS=browser /p:TargetArchitecture=wasm \
  /p:RuntimeFlavor=CoreCLR /p:Configuration=Release \
  /p:TestWasmReadyToRun=true /p:EnableAggressiveTrimming=true \
  /p:Scenario=WasmTestOnChrome /p:InstallChromeForTests=true \
  '/p:WasmTestAppArgs=-method System.Threading.Tasks.Tests.AsyncProfilerTests.StateMachineAsync_SingleThread_ChainEventsAndCallstack -method System.Threading.Tasks.Tests.AsyncProfilerTests.StateMachineAsync_ValueTask_SingleThread_ChainEventsAndCallstack -method System.Threading.Tasks.Tests.AsyncProfilerTests.StateMachineAsync_PoolingValueTask_SingleThread_ChainEventsAndCallstack'

Remove only these methods' temporary ActiveIssue annotations to reproduce.

Expected behavior

All state-machine profiler callstack method identities resolve, and all three existing assertions pass under both interpreter and ReadyToRun execution.

Actual behavior

In the isolated #133768 validation, the representative six-test selection produced:

The corresponding state-machine cases pass with ReadyToRun disabled while aggressive trimming remains enabled.

Regression?

Unknown whether these V1 identities ever worked under browser CoreCLR ReadyToRun. They were initially discovered during the #133193 library-test bring-up.

Known Workarounds

Use method-level ActiveIssue annotations conditioned on PlatformDetection.IsWasmReadyToRun, preserving interpreter and non-WebAssembly coverage.

Configuration

  • Browser CoreCLR, WebAssembly, Release
  • Aggressive trimming and ReadyToRun enabled
  • TestUtilities interpreted; Tasks and runtime libraries remain R2R
  • macOS arm64 build host, Chromium 153

Other information

The V1 identity path uses state-machine method resolution rather than the runtime-async CORINFO_AsyncResumeInfo.DiagnosticIP field fixed by #133768. This issue is the re-enable tracker for only these three methods; #133626 remains correctly closed for the V2 fix.

Note

This issue was generated by GitHub Copilot from isolated local A/B test evidence.

Activity

  1. dotnet-policy-service commented on Sep 17, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/crossgen-contrib
    See info in area-owners.md if you want to be subscribed.

  2. added
    arch-wasmWebAssembly architecture
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Sep 17, 2026
  3. dotnet-policy-service commented on Sep 17, 2026

    @dotnet-policy-service
    Contributor

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

  4. added this to the 12.0.0 milestone on Sep 17, 2026
  5. added
    disabled-testThe test is disabled in source code against the issue
    on Sep 17, 2026
  6. lewing commented on Sep 28, 2026

    @lewing
    MemberAuthor

    potential fix in #134754

  7. self-assigned this
    on Sep 28, 2026
  8. locked and limited conversation to collaborators on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmWebAssembly architecturearea-ReadyToRundisabled-testThe test is disabled in source code against the issue

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions