-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[wasm][debugger] Avoiding assert on mono runtime #62601
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
Conversation
|
Tagging subscribers to this area: @thaystg Issue DetailsIt was passing id = 0 and asserting on mono runtime when trying to evaluate something in a Class that has the assembly loaded, but doesn't have any breakpoint added.
|
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsIt was passing id = 0 and asserting on mono runtime when trying to evaluate something in a Class that has the assembly loaded, but doesn't have any breakpoint added.
|
| { | ||
| if (debugId != -1) | ||
| return debugId; | ||
| debugId = await sdbAgent.GetAssemblyId(Name, token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to throw here if debugId <= 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean after GetAssemblyId?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do it, but in my backport version of this PR I will not add the throw to avoid any side effect on net6, does it make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I changed my mind, I don't think we will get any side effect on net 6, because this is called from FindStaticTypeId and this has a try catch in the caller.
|
|
||
| public void SetDebugId(int id) | ||
| { | ||
| debugId = id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this throw if debugId != -1 && debugId != id to avoid reseting the id by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea to throw an exception but I added an if to set only if (debugId <= 0 && debugId != id)
| }); | ||
|
|
||
| [Fact] | ||
| public async Task EvaluateStaticAttributeInAssemblyNotRelatedButLoaded() => await CheckInspectLocalsAtBreakpointSite( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideas: Maybe add another test that tries to test the same thing, but by enumerating members of a local, or a field?
And maybe one where a previous frame is in that other assembly, and then check members on that frame?
Co-authored-by: Ankit Jain <[email protected]>
Removing unused fields in another test case.
|
/backport to release/6.0 |
|
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1579681367 |
|
@thaystg backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Avoiding assert on mono runtime
Using index info to reconstruct a base tree...
M src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs
M src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs
M src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs
M src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs
Auto-merging src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs
Auto-merging src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs
CONFLICT (content): Merge conflict in src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs
Auto-merging src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs
CONFLICT (content): Merge conflict in src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Avoiding assert on mono runtime
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
It was passing id = 0 and asserting on mono runtime when trying to evaluate something in a Class that has the assembly loaded, but doesn't have any breakpoint added.
Fix https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1427671?src=WorkItemMention&src-action=artifact_link