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] NRE in System.Runtime.InteropServices.JavaScript.Runtime.SetupJSContinuation, for System.Xml.Linq.xNodeBuilder.Tests #53614

Closed
radical opened this issue Jun 2, 2021 · 10 comments · Fixed by #56538
Assignees
Milestone

Comments

@radical
Copy link
Member

radical commented Jun 2, 2021

PR: #53557
Build: https://dev.azure.com/dnceng/public/_build/results?buildId=1166367&view=logs&jobId=108d2c4a-8a62-5a58-8dad-8e1042acc93c&j=108d2c4a-8a62-5a58-8dad-8e1042acc93c&t=568f884b-cc12-5fd3-e7fe-790b5ac403f4
Test log: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-53557-merge-f508128941754676b8/System.Xml.Linq.xNodeBuilder.Tests/console.14abc845.log?sv=2019-07-07&se=2021-06-21T23%3A56%3A15Z&sr=c&sp=rl&sig=LF0p6D8awZ1HOuwt79yvT8cmtp4%2FQhoKfPQ22FLswvI%3D

[00:08:46] warn: /__w/1/s/src/mono/mono/utils/memfuncs.c:360 <disabled>
[00:08:46] info: {"method":"console.error","payload":{},"arguments":[{}]}
[00:08:46] fail: Error: System.NullReferenceException: Object reference not set to an instance of an object.
                    at System.Runtime.InteropServices.JavaScript.Runtime.<>c__DisplayClass27_0.<SetupJSContinuation>g__Complete|0()
                    at System.Runtime.InteropServices.JavaScript.Runtime.SetupJSContinuation(Task task, JSObject continuationObj)
                     at Object._convert_exception_for_method_call (http://127.0.0.1:41301/dotnet.js:1:196628)
                     at Object._handle_exception_for_call (http://127.0.0.1:41301/dotnet.js:1:198597)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:41301/dotnet.js:1:198918)
                     at Object._call_method_with_converted_args (http://127.0.0.1:41301/dotnet.js:1:199992)
                     at Object.call_method (http://127.0.0.1:41301/dotnet.js:1:198387)
                     at Object._unbox_task_rooted (http://127.0.0.1:41301/dotnet.js:1:177443)
                     at Object._unbox_mono_obj_rooted_with_known_nonprimitive_type (http://127.0.0.1:41301/dotnet.js:1:178374)
                     at Object._unbox_mono_obj_root (http://127.0.0.1:41301/dotnet.js:1:179611)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:41301/dotnet.js:1:199038)
                     at Object._call_method_with_converted_args (http://127.0.0.1:41301/dotnet.js:1:199992)

The error went away on a rebuild though. Opening this issue, in case this is seen again.

cc @kg

@ghost
Copy link

ghost commented Jun 2, 2021

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

Issue Details

PR: #53557
Build: https://dev.azure.com/dnceng/public/_build/results?buildId=1166367&view=logs&jobId=108d2c4a-8a62-5a58-8dad-8e1042acc93c&j=108d2c4a-8a62-5a58-8dad-8e1042acc93c&t=568f884b-cc12-5fd3-e7fe-790b5ac403f4
Test log: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-53557-merge-f508128941754676b8/System.Xml.Linq.xNodeBuilder.Tests/console.14abc845.log?sv=2019-07-07&se=2021-06-21T23%3A56%3A15Z&sr=c&sp=rl&sig=LF0p6D8awZ1HOuwt79yvT8cmtp4%2FQhoKfPQ22FLswvI%3D

[00:08:46] warn: /__w/1/s/src/mono/mono/utils/memfuncs.c:360 <disabled>
[00:08:46] info: {"method":"console.error","payload":{},"arguments":[{}]}
[00:08:46] fail: Error: System.NullReferenceException: Object reference not set to an instance of an object.
                    at System.Runtime.InteropServices.JavaScript.Runtime.<>c__DisplayClass27_0.<SetupJSContinuation>g__Complete|0()
                    at System.Runtime.InteropServices.JavaScript.Runtime.SetupJSContinuation(Task task, JSObject continuationObj)
                     at Object._convert_exception_for_method_call (http://127.0.0.1:41301/dotnet.js:1:196628)
                     at Object._handle_exception_for_call (http://127.0.0.1:41301/dotnet.js:1:198597)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:41301/dotnet.js:1:198918)
                     at Object._call_method_with_converted_args (http://127.0.0.1:41301/dotnet.js:1:199992)
                     at Object.call_method (http://127.0.0.1:41301/dotnet.js:1:198387)
                     at Object._unbox_task_rooted (http://127.0.0.1:41301/dotnet.js:1:177443)
                     at Object._unbox_mono_obj_rooted_with_known_nonprimitive_type (http://127.0.0.1:41301/dotnet.js:1:178374)
                     at Object._unbox_mono_obj_root (http://127.0.0.1:41301/dotnet.js:1:179611)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:41301/dotnet.js:1:199038)
                     at Object._call_method_with_converted_args (http://127.0.0.1:41301/dotnet.js:1:199992)

The error went away on a rebuild though. Opening this issue, in case this is seen again.

cc @kg

Author: radical
Assignees: -
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jun 2, 2021
@lewing lewing added this to the 6.0.0 milestone Jun 2, 2021
@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Jun 2, 2021
@lewing lewing assigned lewing and kg and unassigned lewing Jun 2, 2021
@kg
Copy link
Member

kg commented Jun 5, 2021

Does this seem like a regression? Or just an existing bug we weren't noticing?

@lewing
Copy link
Member

lewing commented Jun 5, 2021

My first check around continuations would be GC.

@kg
Copy link
Member

kg commented Jun 5, 2021

Yeah, it's quite likely this is a GC issue, but also the arguments to this function are marked as non-nullable when they're nullable, so it's possible a null is making its way in from the JS side. The code doesn't handle that.

@kg
Copy link
Member

kg commented Jun 8, 2021

I spent a while trying to reproduce this but can't get it to fail, it must rely on something about the CI hardware. I'll have to just audit and rework the code.

@radical
Copy link
Member Author

radical commented Jun 24, 2021

Happened again on main rolling build - https://dev.azure.com/dnceng/public/_build/results?buildId=1204077&view=logs&j=108d2c4a-8a62-5a58-8dad-8e1042acc93c&t=568f884b-cc12-5fd3-e7fe-790b5ac403f4

[15:43:33] info: Initializing.....
[15:43:34] info: {"method":"console.error","payload":{},"arguments":[{}]}
[15:43:34] fail: Error: System.NullReferenceException: Object reference not set to an instance of an object.
                    at System.Runtime.InteropServices.JavaScript.Runtime.<>c__DisplayClass27_0.<SetupJSContinuation>g__Complete|0()
                    at System.Runtime.InteropServices.JavaScript.Runtime.SetupJSContinuation(Task task, JSObject continuationObj)
                     at Object._convert_exception_for_method_call (http://127.0.0.1:36893/dotnet.js:1:171681)
                     at Object._handle_exception_for_call (http://127.0.0.1:36893/dotnet.js:1:173650)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:36893/dotnet.js:1:173971)
                     at Object._call_method_with_converted_args (http://127.0.0.1:36893/dotnet.js:1:175045)
                     at Object.call_method (http://127.0.0.1:36893/dotnet.js:1:173440)
                     at Object._unbox_task_rooted (http://127.0.0.1:36893/dotnet.js:1:152548)
                     at Object._unbox_mono_obj_rooted_with_known_nonprimitive_type (http://127.0.0.1:36893/dotnet.js:1:153434)
                     at Object._unbox_mono_obj_root (http://127.0.0.1:36893/dotnet.js:1:154670)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:36893/dotnet.js:1:174091)
                     at Object._call_method_with_converted_args (http://127.0.0.1:36893/dotnet.js:1:175045)

@lewing
Copy link
Member

lewing commented Jun 24, 2021

[15:43:34] info: {"method":"console.error","payload":{},"arguments":[{}]}

🤕

@lewing
Copy link
Member

lewing commented Jun 28, 2021

Happened here too #54186

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Aug 4, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 7, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants