https://bugs.winehq.org/show_bug.cgi?id=49577
Bug ID: 49577 Summary: Segmentation fault when running winecfg in Staging Product: Wine-staging Version: 5.12 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: gyebro69@gmail.com CC: leslie_alistair@hotmail.com, pgofman@codeweavers.com, z.figura12@gmail.com Distribution: ArchLinux
I'm using a mingw-enabled Wine build now. Vanilla Wine doesn't have this problem, but Staging does. When I issue either winecfg or wineboot -u to create or update a wineprefix, I 'm getting only "Segmentation Fault (core dumped)" in the terminal.
WINEDEBUG=+all wine winecfg: trace:virtual:free_ranges_remove_range view 0x7bc00000-0x7bf60000 (0x7bc00000). trace:module:map_image_into_view mapped PE file at 0x7bc00000-0x7bf5b000 trace:module:map_image_into_view mapping section .text at 0x7bc01000 off 600 size 68e00 virt 68d7c flags 60500020 trace:module:map_image_into_view clearing 0x7bc69e00 - 0x7bc6a000
Due to lack of time I couldn't perform a regression test yet. What I see is that Wine-Staging 5.11 works, Staging 5.12.1 and Staging/master are equally broken. Maybe this has already been reported here on bugzilla and I just couldn't find the corresponding bug report.
https://bugs.winehq.org/show_bug.cgi?id=49577
--- Comment #1 from Paul Gofman pgofman@codeweavers.com --- There must be some specifics here, because I cannot reproduce it neither with local latest Staging git nor with distro provided 12.1 binaries (which also use mingw build of course), but I don't have ArchLinux. Also, unless I missed something no one reported such an issue for 5.12 before, so presumably it is working for some people. Maybe not on ArchLinux, I've heard it ships non PE builds for some reason.
Is that the full debug output? Just in case, did you make sure you don't have some leftover .so binaries in the build tree and in the Wine installed tree? Any non-default build flags? Also AFAIU [1] suggests that someone managed to run mingw build on Arch Linux after 5.12.
1. https://bugs.winehq.org/show_bug.cgi?id=49436#c31
https://bugs.winehq.org/show_bug.cgi?id=49577
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Segmentation fault when |Segmentation fault when |running winecfg in Staging |running winecfg in Staging | |(Arch Linux)
--- Comment #2 from Béla Gyebrószki gyebro69@gmail.com --- Thank you for your response, Paul.
I always compile Wine from source and execute it from the build tree without installing system-wide. Before compiling I made sure the source was clean: git reset --hard HEAD && git reset --hard origin && git clean -d -f -x
I didn't use any specific CFLAGS, these are my configure and make commands after applying the Staging patches (e.g 32bit-only build): PKG_CONFIG_PATH=/usr/lib32/pkgconfig ../configure --disable-tests --with-xattr --without-cups --without-sane --without-hal --without-oss --without-capi --without-pcap && time make -s -j2
How do I check for those leftover .so binaries?
Would it help if I narrowed down the problem to a specific Staging commit between 5.11 and 5.12.1 or that would be only a red herring?
Anyway, I'm going to rebuild mingw on Arch to see if that's the source of the breakage.
https://bugs.winehq.org/show_bug.cgi?id=49577
--- Comment #3 from Paul Gofman pgofman@codeweavers.com --- (In reply to Béla Gyebrószki from comment #2)
How do I check for those leftover .so binaries?
I would suggest deleting the build directory completely before doing a build and build everything from scratch in such case (unless you did that already). If you are building in the source directory git clean -d -f -x has done that already (but I always build in a separate).
Would it help if I narrowed down the problem to a specific Staging commit between 5.11 and 5.12.1 or that would be only a red herring?
Might be, yes, depending on what commit is it. But if it is, e. g., some flavour of DLL size issue like we had lately that won't tell much.
Maybe you can try to run wine from gdb? backtrace is unlikely to show anything but if we get a segfault address and you can send me the crashing binary from your build it could be a good start.
https://bugs.winehq.org/show_bug.cgi?id=49577
--- Comment #4 from Béla Gyebrószki gyebro69@gmail.com --- I've found the culprit: the segfault occurs when STAGING_WRITECOPY is enabled. This is the commit when the problem appeared for me: https://github.com/wine-staging/wine-staging/commit/70f6f6d7e40c041b9e3674f1...
Hope this makes easier for you to reproduce the problem. I don't have much luck with gdb, how am I supposed to use it in this scenario?
https://bugs.winehq.org/show_bug.cgi?id=49577
--- Comment #5 from Béla Gyebrószki gyebro69@gmail.com --- Created attachment 67736 --> https://bugs.winehq.org/attachment.cgi?id=67736 ntdll.so
This is from my systemd-journal:
Process 199285 (wine) of user 1000 dumped core.
Stack trace of thread 199285: #0 0x00000000f3d1c3dc n/a (/home/gyebro/sources/test/wine-staging/wine-build/dlls/ntdll/ntdll.so + 0x443dc) #1 0x00000000f3d1ca80 n/a (/home/gyebro/sources/test/wine-staging/wine-build/dlls/ntdll/ntdll.so + 0x44a80) #2 0x00000000f4195c50 __kernel_rt_sigreturn (linux-gate.so.1 + 0xc50) #3 0x00000000f3ec298c __memset_sse2 (/usr/lib32/libc-2.31.so + 0x14e98c) #4 0x00000000f3d2f773 n/a (/home/gyebro/sources/test/wine-staging/wine-build/dlls/ntdll/ntdll.so + 0x57773) #5 0x00000000f3d3252d n/a (/home/gyebro/sources/test/wine-staging/wine-build/dlls/ntdll/ntdll.so + 0x5a52d) #6 0x00000000f3d12941 n/a (/home/gyebro/sources/test/wine-staging/wine-build/dlls/ntdll/ntdll.so + 0x3a941) #7 0x000000007d001382 n/a (/home/gyebro/sources/test/wine-staging/wine-build/loader/wine + 0x1382)
https://bugs.winehq.org/show_bug.cgi?id=49577
--- Comment #6 from Paul Gofman pgofman@codeweavers.com --- (In reply to Béla Gyebrószki from comment #4)
I've found the culprit: the segfault occurs when STAGING_WRITECOPY is enabled.
Knowing this is very helpful, I could reproduce the crash immediately.
Should be fixed by 26d3815d8c0744a7cdd89370b0c78be5311d0df5
https://bugs.winehq.org/show_bug.cgi?id=49577
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Summary|Segmentation fault when |Segmentation fault when |running winecfg in Staging |running winecfg in Staging |(Arch Linux) |(STAGING_WRITECOPY enabled) Fixed by SHA1| |26d3815d8c0744a7cdd89370b0c | |78be5311d0df5 Status|NEW |RESOLVED
--- Comment #7 from Béla Gyebrószki gyebro69@gmail.com --- Fixed indeed. Thank you, Paul!
https://bugs.winehq.org/show_bug.cgi?id=49577
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing bugs fixed in Staging 5.15.