Skip to content

[mono][hot reload] Fix sequence point logic for compiler-generated methods in updates #65865

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

Merged
merged 5 commits into from
Feb 25, 2022

Conversation

lambdageek
Copy link
Member

If an update adds a compiler-generated method that doesn't have any sequence points, don't fall back to looking for sequence points in the baseline file - consider 0 sequence points as a success.

Also modify the hot reload tests to pass MONO_DEBUG=gen-seq-points to the runtime (via remote executor or build properties) so that we exercise this code even when we don't have a debugger attached.

Fixes #65808

-1 means there was some kind of problem

0 means 0 sequence points

In particular for mono_ppdb_get_seq_points_enc a compiler-generated method
might have 0 sequence points in the PDB delta, but we should consider that as
ok, and not fall back to looking in the baseline image
For platforms where we use the remote executor, set the environment variable
when starting the remote process.

For WASM, pass --setenv when building the project.
@ghost ghost added the area-EnC-mono Hot Reload for WebAssembly, iOS/Android, etc label Feb 24, 2022
@ghost ghost assigned lambdageek Feb 24, 2022
@lambdageek
Copy link
Member Author

/backport to release/7.0-preview2

@github-actions
Copy link
Contributor

Started backporting to release/7.0-preview2: https://github.com/dotnet/runtime/actions/runs/1895464774

@github-actions
Copy link
Contributor

@lambdageek backporting to release/7.0-preview2 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [tests] Pass PDB delta to ApplyUpdate
Applying: extra tracing output
Applying: Return 0 if a method has no sequence points
Applying: pass MONO_DEBUG=getn-seq-points to hot reload tests
Using index info to reconstruct a base tree...
M	src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj
CONFLICT (content): Merge conflict in src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0004 pass MONO_DEBUG=getn-seq-points to hot reload tests
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 128

Please backport manually!

@lambdageek lambdageek merged commit 31bd72d into dotnet:main Feb 25, 2022
@lambdageek lambdageek deleted the fix-gh-65808 branch March 19, 2022 16:45
@ghost ghost locked as resolved and limited conversation to collaborators Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-EnC-mono Hot Reload for WebAssembly, iOS/Android, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[net7 Preview1][hot reload] Adding new methods in blazor wasm asserts at debug-mono-ppdb.c:499
2 participants