Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/coreclr/vm/syncblk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ inline WaitEventLink *ThreadQueue::DequeueThread(SyncBlock *psb)

if (pLink)
{
// Sometimes the SList is corrupted causing the EE to deadlock as referenced in /dotnet/runtime/issues/115794
// When that happens managed threads will remain in a suspended state causing the application to hang
// indefinitely.
// To mitigate this issue, when the next link points to itself, de-reference the next link
// TODO : find which code is responsible for allowing the situation to happen
if ( psb->m_Link.m_pNext == pLink->m_pNext)
pLink->m_pNext = NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to investigate the root cause instead of taking this fix as-is since there could be other issues/AVs related to the mangling of the list.


psb->m_Link.m_pNext = pLink->m_pNext;
#ifdef _DEBUG
pLink->m_pNext = (SLink *)POISONC;
Expand Down
Loading