Unable to start small programm in freshly installed wine

Questions about Wine on Linux
Locked
hasezoey
Level 1
Level 1
Posts: 6
Joined: Thu Feb 16, 2023 8:35 am

Unable to start small programm in freshly installed wine

Post by hasezoey »

Hello, i have the need to run some specific windows APIs and so made a binary to run them, but then i noticed even a simple "hello" printline would cause wine crash in mingw, and in msvc i could not figure out what was causing the problem.

Attached are logs of:
- `wine ./program_gnu.exe` as `normal_gnu.log`
- `winedbg --gdb ./program_gnu.exe` as `winedbg_gdb_gnu.log`
- objdump output for the problematic instruction as `disassembly_gnu.txt`
- `wine ./program_msvc.exe` as `normal_msvc.log`
- `winedbg ./program_msvc.exe` as `winedbg_msvc.log`
- objdump output for the problematic instruction as `disassembly_msvc.txt`

Both msvc and gnu(mingw) builds are running fine on the host, but not on freshly installed systems with wine (tested are Manjaro 22.0.3 and Linux Mint 21.1 (with winehq apt)) and i cant seem to find a reason on why it would not work (like a missing package)

For context, i am using this project's `ade-extract-winapi-bin.exe` binary (the provided one in releases is build with msvc)
Attachments
wine_logs.tar.gz
(6.18 KiB) Downloaded 139 times
hasezoey
Level 1
Level 1
Posts: 6
Joined: Thu Feb 16, 2023 8:35 am

Re: Unable to start small programm in freshly installed wine

Post by hasezoey »

i tried further debugging, but am still new at this low-level debugging but here are my findings for now:
it seems like the last line everything is correct is "0x7b627e67" (in "/usr/lib/wine/x86_64-windows/kernel32.dll"), but then stepping into it it lands me at "0x14002631c", and somehow in the VM inside "winedbg --gdb" it is a repeating of "add %al,(%rax)" for quite a while (have not seen the end of it yet), and objdump on the same file (inside the VM) lists the address as "14002631c: 48 83 ec 28 sub rsp,0x28" and wine on the host also sees the same output in both objdump and "winedbg --gdb", but i have no clue how to further debug this

Screenshot from inside the VM with "winedbg --gdb" and "objdump" open at the same address
hasezoey
Level 1
Level 1
Posts: 6
Joined: Thu Feb 16, 2023 8:35 am

Re: Unable to start small programm in freshly installed wine

Post by hasezoey »

turns out i forgot to check something, the simple thing of "try running it on a different filesystem":

it seems like wine has problems running *binaries* from a "ihc" filesystem, which i use to share a folder with the VM.
directly executing a *linux binary* does not have any problems doing it from "ihc"

for reference, the other filesystem that works is "btrfs"
ihc mount option (fstab): "ihc /run/media/shared trans=virtio,nobootwait,rw,_netdev 0 0"

opened a bug report as https://bugs.winehq.org/show_bug.cgi?id=54592
Locked