http://bugs.winehq.org/show_bug.cgi?id=58305
Bug ID: 58305 Summary: Sonny (RPG game) randomly freezes during gameplay Product: Wine Version: 10.8 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wineserver Assignee: wine-bugs@winehq.org Reporter: doucha@swarmtech.cz Distribution: ---
Sonny, a game on Unity engine, started randomly freezing during gameplay after I've updated WINE from v9.18 to v10.8. The game stops accepting input and even the audio stops playing. But if I move mouse out of the WINE virtual desktop and back in, the game starts working again.
Here's what CPU usage looks like during normal play and frozen state:
Normal: - SonnyWindows.exe: 37% CPU - wineserver: 8% CPU
Frozen: - SonnyWindows.exe: 1% CPU - wineserver: 100% CPU
I've managed to bisect the issue to the following commit:
commit 87ca5db40e2c1b37423bdc25101a5c5e39e67e6f server: Use epoll_pwait2 for the main loop on Linux.
If I comment out #define HAVE_EPOLL_PWAIT2 1 in config.h and recompile WINE, the problem goes away.
Game link: https://armor-games-studios.itch.io/sonny
I use Gentoo Linux. The issue may be reproducible in other Unity games as well.
http://bugs.winehq.org/show_bug.cgi?id=58305
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |87ca5db40e2c1b37423bdc25101 | |a5c5e39e67e6f CC| |wine@horvath.blog Distribution|--- |Gentoo Keywords| |regression URL| |https://store.steampowered. | |com/app/586750/Sonny/
--- Comment #1 from Ken Sharp imwellcushtymelike@gmail.com --- Please attach the console output.
Does this occur on vanilla (non-Staging) Wine?
Does the game have a downloadable demo?
How did you install the game? Did you use any workarounds? Are you using Steam?
http://bugs.winehq.org/show_bug.cgi?id=58305
--- Comment #2 from next_ghost doucha@swarmtech.cz --- (In reply to Ken Sharp from comment #1)
Please attach the console output.
There's no console output from WINE once the game starts, only debug output from Unity engine. Would you like me to trace something in particular using WINEDEBUG?
Does this occur on vanilla (non-Staging) Wine?
I've reproduced the freezes in vanilla git during the bisect.
Does the game have a downloadable demo?
Not that I'm aware of. It's a remake of a Flash game from 2009 so it doesn't need one.
How did you install the game? Did you use any workarounds? Are you using Steam?
I've bought the game on Itch.io and installed it by unpacking the ZIP file downloaded from there.
I don't see anything wrong with the epoll_pwait2() call from the bisected commit. I suspect the timespec structure contents may not match the return value of get_next_timeout(). I'll investigate further later.
http://bugs.winehq.org/show_bug.cgi?id=58305
--- Comment #3 from next_ghost doucha@swarmtech.cz --- (In reply to next_ghost from comment #2)
(In reply to Ken Sharp from comment #1)
Does this occur on vanilla (non-Staging) Wine?
I've reproduced the freezes in vanilla git during the bisect.
And just to be clear, I've compiled and tested the tags wine-10.6 and wine-10.3 during the bisect, not just random commits between releases. I've reproduced the freezes with both. Build from tag wine-10.1 did not reproduce the issue.
http://bugs.winehq.org/show_bug.cgi?id=58305
next_ghost doucha@swarmtech.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #4 from next_ghost doucha@swarmtech.cz --- After more investigation it turns out that the game is hitting epoll_pwait2() regression in kernel v6.14: https://github.com/torvalds/linux/commit/d9ec73301099ec5975505e1c3effbe768ba...
Sorry for the noise, closing as invalid.