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: NullReferenceException in exception stack trace retrieval #40307

Closed
akoeplinger opened this issue Aug 4, 2020 · 4 comments
Closed

WASM: NullReferenceException in exception stack trace retrieval #40307

akoeplinger opened this issue Aug 4, 2020 · 4 comments
Assignees
Labels
arch-wasm WebAssembly architecture tenet-reliability Reliability/stability related issue (stress, load problems, etc.)
Milestone

Comments

@akoeplinger
Copy link
Member

This shows up like this in tests:

System.NullReferenceException : Object reference not set to an instance of an object.
    at System.Diagnostics.StackFrame..ctor(MonoStackFrame monoStackFrame, Boolean needFileInfo)
    at System.Diagnostics.StackTrace.InitializeForException(Exception e, Int32 skipFrames, Boolean needFileInfo)
    at System.Diagnostics.StackTrace..ctor(Exception e, Boolean fNeedFileInfo)
    at System.Exception.GetStackTrace(Boolean needFileInfo)
    at System.Exception.get_StackTrace()
    at System.Exception.ToString()
    ...

or like this:

System.NullReferenceException: Object reference not set to an instance of an object.
    at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
    at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
    at System.Exception.CaptureDispatchState()
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo..ctor(Exception exception)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(Exception source)
    ...

The common thing is that both of these call the StackTrace.get_trace() icall.

I was only able to reproduce this one time after a few hours of running System.Linq.Tests.Parallel tests locally and we hit this only ten times on all PRs in the last ten days so it seems quite rare.

/cc @vargaz

@akoeplinger akoeplinger added arch-wasm WebAssembly architecture area-CoreLib-mono labels Aug 4, 2020
@akoeplinger akoeplinger added this to the 5.0.0 milestone Aug 4, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Aug 4, 2020
@akoeplinger akoeplinger removed the untriaged New issue has not been triaged by the area owner label Aug 4, 2020
@v-haren
Copy link

v-haren commented Aug 5, 2020

failed again in job: runtime 20200804.72

failed test: System.Xml.Tests.TCNamespaceHandling.NS_Handling_19a(utils: XmlWriterUtils { Async = False, WriterType = UTF8Writer }, nsHandling: OmitDuplicates, prefix: "xmlns", name: "lang", isAttr: False)

Error message

System.NullReferenceException : Object reference not set to an instance of an object.


Stack trace
   at System.Diagnostics.StackFrame..ctor(MonoStackFrame monoStackFrame, Boolean needFileInfo)
   at System.Diagnostics.StackTrace.InitializeForException(Exception e, Int32 skipFrames, Boolean needFileInfo)
   at System.Diagnostics.StackTrace..ctor(Exception e, Boolean fNeedFileInfo)
   at System.Exception.GetStackTrace(Boolean needFileInfo)
   at System.Exception.get_StackTrace()
   at System.Exception.ToString()
   at OLEDB.Test.ModuleCore.CError.Write(Object value)
   at OLEDB.Test.ModuleCore.CError.WriteLine(Object value)
   at System.Xml.Tests.TCNamespaceHandling.NS_Handling_19a(XmlWriterUtils utils, NamespaceHandling nsHandling, String prefix, String name, Boolean isAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

@marklio marklio added the tenet-reliability Reliability/stability related issue (stress, load problems, etc.) label Aug 6, 2020
@SamMonoRT
Copy link
Member

@vargaz @BrzVlad - can this be closed now that #40384 is merged ?

@BrzVlad
Copy link
Member

BrzVlad commented Aug 10, 2020

While it's hard to be 100% sure, let's close this as I remember testing the fix for a few hours without failures.

@BrzVlad BrzVlad closed this as completed Aug 10, 2020
@akoeplinger
Copy link
Member Author

I ran a Kusto query on test failures and didn't find any matches after the fix was merged 👍

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture tenet-reliability Reliability/stability related issue (stress, load problems, etc.)
Projects
None yet
Development

No branches or pull requests

7 participants