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

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

Open
radical opened this issue Apr 8, 2021 · 11 comments
Open

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

radical opened this issue Apr 8, 2021 · 11 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono wasm-aot-test WebAssembly AOT Test
Milestone

Comments

@radical
Copy link
Member

radical commented Apr 8, 2021

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
@radical radical added arch-wasm WebAssembly architecture area-Codegen-AOT-mono wasm-aot-test WebAssembly AOT Test labels Apr 8, 2021
@ghost
Copy link

ghost commented Apr 8, 2021

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

Issue Details

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
Author: radical
Assignees: -
Labels:

arch-wasm, area-Codegen-AOT-mono, wasm-aot-test

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 8, 2021
@SamMonoRT SamMonoRT added this to the 6.0.0 milestone Apr 9, 2021
@BrzVlad BrzVlad self-assigned this May 5, 2021
@BrzVlad
Copy link
Member

BrzVlad commented May 7, 2021

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.

@lewing
Copy link
Member

lewing commented May 7, 2021

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

@radical
Copy link
Member Author

radical commented May 7, 2021

Only the failing tests, or the entire library?

@lewing
Copy link
Member

lewing commented May 7, 2021

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

@lewing lewing removed the untriaged New issue has not been triaged by the area owner label May 7, 2021
@radical radical changed the title [wasm][tests][aot] System.Diagnostics.StackTrace [wasm][tests][aot] Stacktrace not supported: System.Diagnostics.StackTrace Jun 15, 2021
@radical radical changed the title [wasm][tests][aot] Stacktrace not supported: System.Diagnostics.StackTrace [wasm][tests][aot] Tests failing due to stacktrace not supported Jun 16, 2021
@radical
Copy link
Member Author

radical commented Jun 16, 2021

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 )

@BrzVlad
Copy link
Member

BrzVlad commented Jun 29, 2021

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 ?

@SamMonoRT SamMonoRT modified the milestones: 6.0.0, 7.0.0 Jul 16, 2021
@SamMonoRT
Copy link
Member

Moving to 7.0.0

@ilonatommy
Copy link
Member

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

@BrzVlad
Copy link
Member

BrzVlad commented Jun 15, 2022

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

@lewing lewing removed this from the 7.0.0 milestone Jun 15, 2022
@lewing lewing added this to the Future milestone Jun 15, 2022
@lewing
Copy link
Member

lewing commented Jun 16, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono wasm-aot-test WebAssembly AOT Test
Projects
None yet
Development

No branches or pull requests

5 participants