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

[browser][MT] ReleaseJSOwnedObjectByGCHandle: Unexpected synchronous failure #104889

Open
maraf opened this issue Jul 15, 2024 · 2 comments
Open
Assignees
Labels
area-System.Runtime.InteropServices.JavaScript area-VM-threading-mono Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm
Milestone

Comments

@maraf
Copy link
Member

maraf commented Jul 15, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=738612
Build error leg or test failing: build_browser_wasm_linux_Release_LibraryTests_Threading

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "[MONO] ReleaseJSOwnedObjectByGCHandle: Unexpected synchronous failure",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=738612
Error message validated: [[MONO] ReleaseJSOwnedObjectByGCHandle: Unexpected synchronous failure]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/15/2024 11:56:32 AM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
@maraf maraf added area-System.Runtime.InteropServices.JavaScript Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm labels Jul 15, 2024
@maraf maraf added this to the 9.0.0 milestone Jul 15, 2024
@maraf maraf added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 15, 2024
@pavelsavara
Copy link
Member

ArgumentNullException: Value cannot be null. (Parameter 'key') probably here

https://github.com/dotnet/runtime/blob/7dd68f40ab9ae6f631d79b76f2d9b464f7ecee36/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSProxyContext.cs#L416C30-L416C50

I'm not sure why yet

[07:56:30] info: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.JSImportTest.JsImportArraySegmentOfInt32
[07:56:30] info: System.NullReferenceException : Object reference not set to an instance of an object.
[07:56:30] info:    at System.Runtime.InteropServices.JavaScript.JSMarshalerArgument.ToManaged(ArraySegment`1& )
[07:56:30] info:    at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.echo1_ArraySegmentOfInt32(ArraySegment`1 value, Boolean edit)
[07:56:30] info:    at System.Runtime.InteropServices.JavaScript.Tests.JSImportTest.JsImportArraySegmentOfInt32()
[07:56:30] info:    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[07:56:30] info:    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object , BindingFlags )

[07:56:47] warn: [0x025e3650--IO- 07:56:47.668] [MONO] Process terminated.
[07:56:47] warn: [0x025e3650--IO- 07:56:47.669] [MONO] ReleaseJSOwnedObjectByGCHandle: Unexpected synchronous failure (ManagedThreadId 4): System.ArgumentNullException: Value cannot be null. (Parameter 'key')
                    at System.Collections.Generic.Dictionary`2[[System.Object, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.IntPtr, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Remove(Object key)
                    at System.Runtime.InteropServices.JavaScript.JSProxyContext.ReleaseJSOwnedObjectByGCHandle(IntPtr )
                    at System.Runtime.InteropServices.JavaScript.JavaScriptExports.ReleaseJSOwnedObjectByGCHandle(JSMarshalerArgument* arguments_buffer)
[07:56:47] fail: 
[07:56:47] fail: "<unnamed thread>" tid=0x25e3650 this=0x2440600 , thread handle : 0x25dedb8, state : not waiting
[07:56:47] fail:   at <unknown> <0xffffffff>
[07:56:47] fail:   at (wrapper managed-to-native) System.Environment.FailFast (string,System.Exception,string) [0x00000] in <5ba192def01b42bbbaf411546e531d7c>:0
[07:56:47] fail:   at System.Environment.FailFast (string) [0x00000] in <5ba192def01b42bbbaf411546e531d7c>:0
[07:56:47] fail:   at System.Runtime.InteropServices.JavaScript.JavaScriptExports.ReleaseJSOwnedObjectByGCHandle (System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*) [0x00055] in <4b51ee87204f4122a4af4672959d537e>:0
[07:56:47] fail:   at (wrapper runtime-invoke) <Module>.runtime_invoke_direct_void_JSMarshalerArgument* (object,intptr,intptr,intptr) [0x0002d] in <4b51ee87204f4122a4af4672959d537e>:0

@pavelsavara pavelsavara removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 30, 2024
@pavelsavara
Copy link
Member

maybe GCHandle use-after-free related to #104524

@pavelsavara pavelsavara modified the milestones: 9.0.0, 10.0.0 Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime.InteropServices.JavaScript area-VM-threading-mono Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

3 participants