-
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
MulticoreJIT accesses m_GenericInfoCount
field from multiple threads without synchronization
#46778
Comments
@mangod9 It looks like this is the cause of the crashes in the PGO runs. It may also be a severe problem for other users of multi-core JIT. |
@agocke do you have a link to the pgo jobs which are failing? |
Although I wouldn't suggest trying to debug through that -- I can provide a dump, but simply doing a volatile load from that field at the beginning of WriteOutput and using a local from then on was enough to reduce the race to no longer produce memory corruption. I'm not sure what the appropriate level of synchronization for that field is, though. |
Hi, @agocke I cannot access that dump. In the dumped backtrace, is there "WriteMulticoreJitProfiler"? |
Yup, stack trace in the crash looks like
|
@jkotas This manifested as memory corruption in the test case. Do we want to consider backporting the fix? |
#39996 that introduced this crash is in .NET 6 only. |
See MultiCoreJitRecord::WriteOutput for an example.
This looks like it can cause memory corruption.
The text was updated successfully, but these errors were encountered: