-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Race condition on marshal-ilgen init #74603
Comments
@uweigand I've created this issues based on your comment from the PR. Thanks for finding that. Is this blocking you? If it is an immediate blocker I will jump on this right now, otherwise I will wait until early next week. |
No, it's not a blocker - I just saw this on one testsuite run, and haven't been able to reproduce since. Thanks for looking into this! |
cc @lambdageek fyi |
reverted the original change from 7.0. Moving this to 8.0 |
#77090 seems like the same issue - the race is there even before the componentization work. It's worth fixing and backporting. |
@naricc - we should add the fix for this in your existing PR for completeness |
Working on taking the fix from the marshal-component change and applying it independent of that change, so we can easily backport it to 7. |
Backporting to 7.0 in #83813 |
Description
Because of this change: #71203,
mono_marshal_ilgen_init
gets called later, after comnponents are initilized. This allows for potential races in initilizing the callback table.I propose to fix this by making a pointer to
ilgen_marshal_cb
, and initing that pointer atomically (with a CAS) after the table has been constructed.See comment here: #71203 (comment)
Reproduction Steps
Race condition; not easily reproducible.
Expected behavior
Runs
Actual behavior
with this call stack:
Regression?
No response
Known Workarounds
No response
Configuration
ppc, but probably possible on other architectures
Other information
No response
The text was updated successfully, but these errors were encountered: