[mono][debugger] Insert and search seq_point in the same MonoJitMemoryManager#54757
[mono][debugger] Insert and search seq_point in the same MonoJitMemoryManager#54757
Conversation
When starting XAML Hot Reload, in transform.c the seq_point was saved using jit_mm_for_method: https://github.com/thaystg/runtime/blob/abccfadbf570033efee8ac9a6992f6f7ee51f474/src/mono/mono/mini/interp/transform.c#L9760 When trying to search was trying on get_default_jit_mm.
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Tagging subscribers to this area: @thaystg Issue DetailsFixing side effect of #48483
|
|
@thaystg will this break non-interpreted debugging now? runtime/src/mono/mono/mini/seq-points.c Lines 241 to 248 in 57bfe47 |
|
I tested and it doesnt' break, but I will add more changes in this PR. |
There was a problem hiding this comment.
Ok, for .net 6 we will use the default memory manager for the sequence points.
@thaystg please make a GH Issue to clean this up (by using jit_mm_for_method for sequence points) next release.
|
/backport to release/6.0-preview6 |
|
Started backporting to release/6.0-preview6: https://github.com/dotnet/runtime/actions/runs/972568284 |
|
@lewing backporting to release/6.0-preview6 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: [mono][debugger] Fixing side effect of #48483
Applying: Fixing everywhere that uses seq_points.
Using index info to reconstruct a base tree...
M src/mono/mono/mini/debugger-engine.c
Falling back to patching base and 3-way merge...
Auto-merging src/mono/mono/mini/debugger-engine.c
CONFLICT (content): Merge conflict in src/mono/mono/mini/debugger-engine.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Fixing everywhere that uses seq_points.
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! |
|
@lambdageek @thaystg can you give me more background on the customer scenarios that are broken without this? |
|
cc @marek-safar |
|
Anything like this would reproduce the problem, loading an assembly in a different load context. Try to add a breakpoint on BreakpointCheckpoint. |
|
And it's not possible to run any android app with XAML HotReload enabled, because the app will stop in an asssert on debugger-engine. |
|
@thaystg and I discussed how to add tests for this and she is working on that. |
|
and it looks like android hit a bad device |
|
Added a test case. |
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Fixing side effect of #48483
When starting XAML Hot Reload, in transform.c the seq_point was saved using jit_mm_for_method: https://github.com/thaystg/runtime/blob/abccfadbf570033efee8ac9a6992f6f7ee51f474/src/mono/mono/mini/interp/transform.c#L9760
When trying to search was trying on get_default_jit_mm.
How to reproduce:
Start an Android App with interpreter mode and XAML HotReload enabled.
This message will appear on output:
Assertion at /__w/1/s/src/mono/mono/mini/debugger-engine.c:1088, conditionfound_sp' not met`And the app will close.
If you disable XAML HotReload it will work fine.
Done in this PR: