Skip to content

[wasm][tests][aot] Tests failing due to stacktrace not supported #50957

Open

Description

@radical

Tests failing due to stacktrace APIs not being supported. The relevant tests are disabled.

-- System.Diagnostics.Tests
Logs

[19:39:33] fail: [FAIL] System.Diagnostics.Tests.StackFrameExtensionsTests.HasMethod_Invoke_ReturnsExpected(stackFrame: <null>
[19:39:33] info: , expected: True)
[19:39:33] info: Assert.Equal() Failure
[19:39:33] info: Expected: True
[19:39:33] info: Actual:   False
[19:39:33] info: 
[19:39:33] info: , expected: False)
[19:39:33] info: )
[19:39:33] info: )
[19:39:33] info: )
[19:39:33] info: )
[19:39:33] info: )
[19:39:33] info: )
[19:39:33] info: , expected: False)
[19:39:33] info: , expected: True)
[19:39:33] info: , expected: False)
[19:39:33] fail: [FAIL] System.Diagnostics.Tests.StackFrameExtensionsTests.HasILOffset_Invoke_ReturnsExpected(stackFrame: <null>
[19:39:33] info: , expected: True)
[19:39:33] info: Assert.Equal() Failure
[19:39:33] info: Expected: True
[19:39:33] info: Actual:   False
[19:39:33] info: 
[19:39:33] info: , expected: False)
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_Bool_ThrownException_GetFramesReturnsExpected(fNeedFileInfo: True)
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_Bool_ThrownException_GetFramesReturnsExpected(fNeedFileInfo: False)
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_SkipFrames(skipFrames: 0)
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_SkipFrames(skipFrames: 1)
[19:39:34] info: Assert.Equal() Failure
[19:39:34] info: Expected: -1
[19:39:34] info: Actual:   0
[19:39:34] info: 
[19:39:34] info: )
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_Default
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_ThrownException_GetFramesReturnsExpected
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_FNeedFileInfo(fNeedFileInfo: True)
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_FNeedFileInfo(fNeedFileInfo: False)
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_SkipFrames_FNeedFileInfo(skipFrames: 0, fNeedFileInfo: True)
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_SkipFrames_FNeedFileInfo(skipFrames: 1, fNeedFileInfo: True)
[19:39:34] info: Assert.Equal() Failure
[19:39:34] info: Expected: -1
[19:39:34] info: Actual:   0
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_SkipFrames_FNeedFileInfo(skipFrames: 0, fNeedFileInfo: False)
[19:39:34] info: Assert.True() Failure
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackTraceTests.Ctor_SkipFrames_FNeedFileInfo(skipFrames: 1, fNeedFileInfo: False)
[19:39:34] info: Assert.Equal() Failure
[19:39:34] info: Expected: -1
[19:39:34] info: Actual:   0
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackFrameTests.SkipFrames_CallMethod_ReturnsExpected
[19:39:34] info: Assert.Equal() Failure
[19:39:34] info: Expected: Void SkipFrames_CallMethod_ReturnsExpected()
[19:39:34] info: Actual:   (null)
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackFrameTests.Ctor_Default
[19:39:34] info: Expected GetILOffset() -1 for <null>
[19:39:34] info:  to be greater or equal to zero.
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackFrameTests.Ctor_FNeedFileInfo(fNeedFileInfo: True)
[19:39:34] info: Expected GetILOffset() -1 for <null>
[19:39:34] info:  to be greater or equal to zero.
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackFrameTests.Ctor_FNeedFileInfo(fNeedFileInfo: False)
[19:39:34] info: Expected GetILOffset() -1 for <null>
[19:39:34] info:  to be greater or equal to zero.
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackFrameTests.Ctor_Filename_LineNumber(fileName: null, lineNumber: -1)
[19:39:34] info: Expected GetILOffset() -1 for <null>
[19:39:34] info:  to be greater or equal to zero.
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackFrameTests.Ctor_Filename_LineNumber(fileName: "", lineNumber: 0)
[19:39:34] info: Expected GetILOffset() -1 for <null>
[19:39:34] info:  to be greater or equal to zero.
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False
[19:39:34] info: 
[19:39:34] fail: [FAIL] System.Diagnostics.Tests.StackFrameTests.Ctor_Filename_LineNumber(fileName: "FileName", lineNumber: 1)
[19:39:34] info: Expected GetILOffset() -1 for <null>
[19:39:34] info:  to be greater or equal to zero.
[19:39:34] info: Expected: True
[19:39:34] info: Actual:   False

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Apr 8, 2021
  2. added this to the 6.0.0 milestone on Apr 9, 2021
  3. self-assigned this
    on May 5, 2021
  4. BrzVlad commented on May 7, 2021

    @BrzVlad
    Member

    I don't see how it would be possible to implement this, unless we would be manually linking frames with each call, which sounds like a bad idea.

  5. lewing commented on May 7, 2021

    @lewing
    Member

    yeah I think we should probably just skip these with platform detection on AOT

  6. radical commented on May 7, 2021

    @radical
    MemberAuthor

    Only the failing tests, or the entire library?

  7. lewing commented on May 7, 2021

    @lewing
    Member

    Don't skip the library. Leave them active issue for now. We may want to consider an AOT analyzer for cases like this too. Thoughts @marek-safar

  8. removed
    untriagedNew issue has not been triaged by the area owner
    on May 7, 2021
  9. changed the title [-][wasm][tests][aot] System.Diagnostics.StackTrace[/-] [+][wasm][tests][aot] Stacktrace not supported: `System.Diagnostics.StackTrace`[/+] on Jun 15, 2021
  10. changed the title [-][wasm][tests][aot] Stacktrace not supported: `System.Diagnostics.StackTrace`[/-] [+][wasm][tests][aot] Tests failing due to stacktrace not supported[/+] on Jun 16, 2021
  11. radical commented on Jun 16, 2021

    @radical
    MemberAuthor

    Merging #51676 with this.

    Instead of the crash, we have one test failure now:
    
    [22:22:31] fail: [FAIL] System.Tests.EnvironmentStackTrace.StackTraceDoesNotStartWithInternalFrame
    [22:22:31] info: System.NullReferenceException : Object reference not set to an instance of an object.
    [22:22:31] info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
    
  12. BrzVlad commented on Jun 29, 2021

    @BrzVlad
    Member

    Having stack traces on wasm is a bit complicated and I think we should revisit this for .net 7. @lewing Any thoughts on moving the milestone ?

  13. modified the milestones: 6.0.0, 7.0.0 on Jul 16, 2021
  14. SamMonoRT commented on Jul 16, 2021

    @SamMonoRT
    Member

    Moving to 7.0.0

  15. ilonatommy commented on Jun 15, 2022

    @ilonatommy
    Member

    @BrzVlad, did you hit into any blocker in the part of #63399 targeting prev 2?

  16. BrzVlad commented on Jun 15, 2022

    @BrzVlad
    Member

    @BrzVlad, did you hit into any blocker in the part of #63399 targeting prev 2?

    That approach was abandoned. I'm not sure what is the best way to support stack traces with wasm code, maybe there will be some additions to the spec that will allow to implement this more easily.

  17. modified the milestones: 7.0.0, Future on Jun 15, 2022
  18. lewing commented on Jun 16, 2022

    @lewing
    Member

    we're getting enough diagnostic info from the current stacks that this isn't urgent, we'll go over it again when planning for 8

  19. pavelsavara commented on Apr 22, 2026

    @pavelsavara
    Member

    For coreCLR this may be solved by enabling <StackTraceLineNumberSupport>true</StackTraceLineNumberSupport> for the tests.

  20. added
    disabled-testThe test is disabled in source code against the issue
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions