-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Assert failure: SyncTableEntry::GetSyncTableEntry()[sbIndex].m_Object == obj #74741
Comments
Tagging subscribers to this area: @dotnet/gc Issue DetailsThe failure has been observed on x64 and ARM64 while using server GC:
The sync table entry with index Call stack examples:
|
@PeterSolMS I suspect this may be caused by #41600, which made it possible for one thread to start scanning for deleted entries in the |
@AntonLapounov I think you are right - I'm thinking about the proper way to fix this... |
The problem here is that during GCScan::GcWeakPtrScan, we call GCHeap::IsPromoted so we can zero out object pointers to objects that weren't marked. At the same time, one thread may do the same for the sync block table. When the first kind of threads validate the object, they also validate the sync block entry that may have already been zeroed - this causes an assert failure. I don't think there is any bad effect apart from the assert failure though. The fix is to simply call Object::Validate with a bVerifySyncBlock of FALSE if the object hasn't been marked.
This should be fixed by PR #74810. Thanks @AntonLapounov for the thorough diagnosis! |
Thank you for fixing this! |
…canning. (#74894) * The problem here is that during GCScan::GcWeakPtrScan, we call GCHeap::IsPromoted so we can zero out object pointers to objects that weren't marked. At the same time, one thread may do the same for the sync block table. When the first kind of threads validate the object, they also validate the sync block entry that may have already been zeroed - this causes an assert failure. I don't think there is any bad effect apart from the assert failure though. The fix is to simply call Object::Validate with a bVerifySyncBlock of FALSE if the object hasn't been marked. * Overlooked the fact that there is yet another declaration of CObjectHeader::Validate with just one parameter that is used in Native AOT and the standalone GC. Fix is simply to declare, but ignore the extra parameters. Co-authored-by: Peter Sollich <[email protected]>
The failure has been observed on x64 and ARM64 while using server GC:
The sync table entry with index
sbIndex
is in the free list pointed bym_FreeSyncTableList
near its beginning.Call stack examples:
The text was updated successfully, but these errors were encountered: