http://bugs.winehq.org/show_bug.cgi?id=58831
Bug ID: 58831 Summary: the commit:win32u: Don't store the window OpenGL drawables on the DCs. Causing software deadlock Product: Wine Version: 10.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: win32u Assignee: wine-bugs@winehq.org Reporter: 1685899837@qq.com Distribution: ---
I used wine10.15 to run Hypermesh 2023. Before this commit:win32u: Don't store the window OpenGL drawables on the DCs.(https://gitlab.winehq.org/wine/wine/-/commit/c3f3ef24e8d1ebe49e8073e8e5b11de... I clicked on 'create session' and selected 'HyperView'. It was running normally, but after merging this commit, there was an issue: 01a0:err:sync:RtlpWaitForCriticalSection section 00007F4A4ACC5570 "?" wait timed out in thread 01a0, blocked by 0134, retrying (60 sec).
http://bugs.winehq.org/show_bug.cgi?id=58831
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE
--- Comment #1 from Austin English austinenglish@gmail.com --- Duplicate.
*** This bug has been marked as a duplicate of bug 58791 ***
http://bugs.winehq.org/show_bug.cgi?id=58831
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|DUPLICATE |--- Status|RESOLVED |UNCONFIRMED
--- Comment #2 from Austin English austinenglish@gmail.com --- Apologies, *potentially* a duplicate. The other bug was about rendering glitches, not deadlocks.
1b5ebd3c567901d8ae6949cff7cbcb09bc9fea2a may fix this (it's after wine-10.17, so you'll need to compile from git to test it, or wait for wine-10.18.
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #3 from 1685899837@qq.com --- (In reply to Austin English from comment #2)
Apologies, *potentially* a duplicate. The other bug was about rendering glitches, not deadlocks.
1b5ebd3c567901d8ae6949cff7cbcb09bc9fea2a may fix this (it's after wine-10.17, so you'll need to compile from git to test it, or wait for wine-10.18.
I am compiling wine10.15 with 1b5ebd3c567901d8ae6949cff7cbcb09bc9fea2a, but the above issues still exist.
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #4 from 1685899837@qq.com --- My testing environment:debian12 ,intel x86_64
After submitting this commit, the lifecycle of the OpenGL Drawable window remains consistent with the window. Perhaps there are still some issues with releasing OpenGL Drawable resources.
http://bugs.winehq.org/show_bug.cgi?id=58831
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com Keywords| |regression Regression SHA1| |c3f3ef24e8d1ebe49e8073e8e5b | |11de859951352
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #5 from Rémi Bernon rbernon@codeweavers.com --- Could you attach a log of Wine output running with WINEDEBUG=+timestamp,+pid,+win,+msg,+message,+x11drv,+event,+wgl,+bitblt environment variable?
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #6 from 1685899837@qq.com --- Created attachment 79509 --> http://bugs.winehq.org/attachment.cgi?id=79509 hypermesh2023 Exception log
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #7 from 1685899837@qq.com --- (In reply to Rémi Bernon from comment #5)
Could you attach a log of Wine output running with WINEDEBUG=+timestamp,+pid,+win,+msg,+message,+x11drv,+event,+wgl,+bitblt environment variable?
I have added logs of abnormal operation in the following reply, you can search for the location where the exception occurred:
err:sync:RtlpWaitForCriticalSection section 00007F2B4759B5F0 (null) wait timed out in thread 0188, blocked by 0134, retrying (60 sec)
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #8 from Rémi Bernon rbernon@codeweavers.com --- Thanks, the dbghelp messages usually indicate that some thread has crashed and that probably explains the deadlock. There's no obvious crash indication or clear call either yet.
Lets add +seh,+opengl,+d3d,+dc,+gdi,+bitmap,+loaddll to the list of debug channels if you don't mind, to try to get a bit more context. (so WINEDEBUG=+timestamp,+pid,+win,+msg,+message,+x11drv,+event,+wgl,+bitblt,+seh,+opengl,+d3d,+dc,+gdi,+bitmap,+loaddll )
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #9 from 1685899837@qq.com --- Created attachment 79510 --> http://bugs.winehq.org/attachment.cgi?id=79510 hypermesh2023 Exception more log
According to your request, I have added these debug channels, and the above are the Exception log,There are too many logs, I only posted Exception log。
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #10 from 1685899837@qq.com --- (In reply to Rémi Bernon from comment #8)
Thanks, the dbghelp messages usually indicate that some thread has crashed and that probably explains the deadlock. There's no obvious crash indication or clear call either yet.
Lets add +seh,+opengl,+d3d,+dc,+gdi,+bitmap,+loaddll to the list of debug channels if you don't mind, to try to get a bit more context. (so WINEDEBUG=+timestamp,+pid,+win,+msg,+message,+x11drv,+event,+wgl,+bitblt, +seh,+opengl,+d3d,+dc,+gdi,+bitmap,+loaddll )
According to your request, I have added these debug channels, and the above are the Exception log,There are too many logs, I only posted Exception log.
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #11 from Rémi Bernon rbernon@codeweavers.com --- Thanks, I think compressing the log file could make it small enough for attachment, the +loaddll parts could be useful to figure if it's crashing in the application or in Wine modules.
Anyway, from the small portion it looks like it crashes after calling glGetString(GL_RENDERER) which maybe could indicate that it gets an unexpected or NULL value there:
``` 3282158.712:012c:0130:trace:opengl:glPolygonOffset factor 1.000000, units 1.000000 3282158.712:012c:0130:trace:opengl:glPointSize size 3.000000 3282158.712:012c:0130:trace:opengl:glGetString name 7936 3282158.712:012c:0130:trace:opengl:glGetString name 7937 3282158.712:012c:0130:trace:seh:dispatch_exception code=c0000005 (EXCEPTION_ACCESS_VIOLATION) flags=0 addr=000000293436646D 3282158.712:012c:0130:trace:seh:dispatch_exception info[0]=0000000000000008 3282158.712:012c:0130:trace:seh:dispatch_exception info[1]=000000293436646D 3282158.712:012c:0130:trace:seh:dispatch_exception rip=000000293436646d rsp=00007ffffe8f70a0 rbp=612d34332d302e31 eflags=00010246 3282158.712:012c:0130:trace:seh:dispatch_exception rax=0000000000000000 rbx=00007f6a9f2d8700 rcx=000000007fffc800 rdx=00000000fffffbff 3282158.712:012c:0130:trace:seh:dispatch_exception rsi=00007f6a59e65ed0 rdi=00007f6a8b6d3e80 r8=000000007fffcc00 r9=00007ffffe9300f0 3282158.712:012c:0130:trace:seh:dispatch_exception r10=0000000000000000 r11=00007ffffe8f7090 r12=0000000000000012 r13=000000000000000f 3282158.712:012c:0130:trace:seh:dispatch_exception r14=0000003030323174 r15=0000000000000000 mxcsr=00001fab ```
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #12 from 1685899837@qq.com --- Created attachment 79511 --> http://bugs.winehq.org/attachment.cgi?id=79511 hypermesh2023 Exception log.zip
I added a compressed file.
http://bugs.winehq.org/show_bug.cgi?id=58831
--- Comment #13 from Rémi Bernon rbernon@codeweavers.com --- Thanks, the RIP / RBP register values at the crash site seem to contain invalid pointers, (0x000000293436646d, resp 0x612d34332d302e31). These are actually likely string bytes, as interpreting them as ASCII returns ")46dm" and "a-43-0.1", which when reversed and concatenated gives "1.0-34-amd64".
Elsewhere in the log we can see that the GL_RENDERER string that has just been queried is supposed to be "AMD Radeon Graphics (radeonsi, navi33, LLVM 15.0.6, DRM 3.49, 6.1.0-34-amd64)", which suspiciously matches the corrupted registers after 64 characters.
My understanding is that the application is querying GL_RENDERER, and copies the string in a 64byte buffer, overflowing it and corrupting the stack and later the registers when they get restored after some calls.
The issue is then unrelated to the blamed commit but that the GL_RENDERER string is too long, and that's a bug in the application, or in MESA. Still, it's probably something we can provide configuration option to workaround in Wine and I'll have a try at it.