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

[release/7.0] [MONO][MARSHAL] Initialize ilgen with a flag #83813

Merged
merged 7 commits into from
Apr 5, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 23, 2023

Backport of #77448 to release/7.0

/cc @jandupej @naricc

Customer Impact

This resolves a race condition that can occur when ilgen callbacks are being lazily initialized. After the fix, the callbacks are installed only once before any user code is executed, removing the race. The issue has been observed by a customer #83804 on 7.0.

Testing

Manual testing.

Risk

Fairly low. No new features are added. Mono marshaller initialization is merely moved to a location where the said race condition cannot occur.

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

@lambdageek lambdageek added this to the 7.0.x milestone Mar 23, 2023
@lambdageek lambdageek added the Servicing-consider Issue for next servicing release review label Mar 23, 2023
@jandupej
Copy link
Member

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@naricc naricc self-requested a review March 23, 2023 15:02
@jandupej
Copy link
Member

Windows ICU failures are known #77485. Other CI failures are explained by issues linked above or are unrelated to this PR.

@carlossanlop
Copy link
Member

Approved by Tactics via email. Will merge once the branches open again.

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Mar 24, 2023
@carlossanlop carlossanlop modified the milestones: 7.0.x, 7.0.6 Mar 24, 2023
@omajid
Copy link
Member

omajid commented Mar 27, 2023

Is this fix also applicable to 6.0? We use Mono on 6.0 for s390x platforms, would that benefit from a fix like this too?

cc @uweigand

@jandupej
Copy link
Member

@omajid If you are experiencing these race conditions with your setup, we can backport the fix to 6.0 also.

@omajid
Copy link
Member

omajid commented Mar 28, 2023

Thanks. I think I have seen them occasionally, but I don't have a great way to reproduce this specific issue on 6.0 (on s390x) as opposed to 7.0 (with ppc64le), where it's super easy for me to run into this. Should we be defensive and backport the change anyway, or would you prefer that I find a way to reproduce the problems with 6.0 specifically?

@SamMonoRT
Copy link
Member

Thanks. I think I have seen them occasionally, but I don't have a great way to reproduce this specific issue on 6.0 (on s390x) as opposed to 7.0 (with ppc64le), where it's super easy for me to run into this. Should we be defensive and backport the change anyway, or would you prefer that I find a way to reproduce the problems with 6.0 specifically?

I would suggest to create a new issue with repro steps whenever you hit the issue using 6.0. We can validate with the fix and immediately start the backport process.

@carlossanlop
Copy link
Member

I'm retargeting this PR to the new release/7.0-staging branch, which is the one that we will use from now on for servicing fixes.

Repo maintainers will now be allowed to merge their own servicing PR as long as it meets the requirements:

  • It is approved by Tactics (signaled by adding the Servicing-approved label).
  • It's signed-off by an area owner.
  • The CI is green, or the failures are investigated as unrelated.
  • And if the PR touches an OOB package, the necessary OOB authoring changes are added.

The new process is described here: runtime/docs/project/library-servicing.md.

The infra team will be actively monitoring servicing PRs to ensure all requirements are met and to help with any issues.

Let me know if you have any questions.

@carlossanlop carlossanlop changed the base branch from release/7.0 to release/7.0-staging March 28, 2023 21:02
@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-approved Approved for servicing release labels Mar 30, 2023
@carlossanlop
Copy link
Member

Reminder: April 10th is the last day to merge backport PRs to ensure they get included in the May Release. PR owners are now in charge of merging their own PRs.

@jandupej
Copy link
Member

jandupej commented Apr 5, 2023

@carlossanlop I'd like to confirm, do I need to do anything else before merging? I've rechecked the CI - the failures are unrelated and explained by the issues linked and we have approval. /cc @SamMonoRT

@carlossanlop
Copy link
Member

  • It is approved by Tactics (signaled by adding the Servicing-approved label).
  • It's signed-off by an area owner.
  • The failures are investigated as unrelated.

[N/A] No OOB package changes needed (not a libraries change, only native).

All good. Smash that squash&merge button, @jandupej.

@SamMonoRT SamMonoRT merged commit 4a5620b into release/7.0-staging Apr 5, 2023
@SamMonoRT SamMonoRT deleted the backport/pr-77448-to-release/7.0 branch April 5, 2023 19:54
@ghost ghost locked as resolved and limited conversation to collaborators May 6, 2023
@leecow leecow modified the milestones: 7.0.6, 7.0.7 Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-meta-mono Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants