[Bug 60382] New: Diablo 2 Resurrected: game freezes after 5-60 mins of play (thread spins in RtlWakeAddressSingle on a corrupted address-wait queue)
http://bugs.winehq.org/show_bug.cgi?id=60382 Bug ID: 60382 Summary: Diablo 2 Resurrected: game freezes after 5-60 mins of play (thread spins in RtlWakeAddressSingle on a corrupted address-wait queue) Product: Wine Version: 11.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@list.winehq.org Reporter: blinovsv@gmail.com Target Milestone: --- Distribution: --- == Symptom == Diablo II: Resurrected (Battle.net, 64-bit) freezes after minutes to hours of play (e.g. observed at 6 and 43 minutes). Before freeze: GPU ~20% CPU ~30% (not important) After freeze: GPU 0% CPU 100% all cores (16 in my case) Same with fsync enabled or disabled (tried both, thouhgt it's fsync, but it's NOT fsync) == Playing with gdb and perf == TLDR: The main thread loops at RtlWakeAddressSingle+140 while holding the queue spinlock (lock == -1). Other threads spin in spin_lock()/NtYieldExecution(). The queue list is cyclic and leads into a neighbouring queue's head: H.next = Q, Q.next = A, A.next = B, B.next = Q. The walk never returns to H. TLDR2: from debugging I got into this code in RtlWaitOnAddress https://gitlab.winehq.org/wine/wine/-/blob/wine-11.18/dlls/ntdll/sync.c#L911... /* We may have already been removed by a call to RtlWakeAddressSingle() or RtlWakeAddressAll(). */ if (entry.addr) <---- check without the lock { spin_lock( &queue->lock ); <---- then locks if (entry.addr) <---- and then checks again?? suspicious right? list_remove( &entry.entry ); spin_unlock( &queue->lock ); } First try removing just ourter `if (entry.addr)` it works perfectly for me: spin_lock( &queue->lock ); if (entry.addr) list_remove( &entry.entry ); spin_unlock( &queue->lock ); After this at least in D2R I was playing like many hours since 14 Sep 2026 till now 25 Sep 2026 and not a single freeze occurred :) Is it a proof? No. But it's good enough for me, and I hope it helps. == How to reproduce == In other curcumstances I'd be happy to provide reproduction guide, but due to the nature of the bug there's no deterministic way to reproduce to get a freeze (at least not in D2R). Also, the game is pay to play. I think it's possible to write a synthetic binary which uses this queue and hits the same issue. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla