Bug#836911: /usr/bin/winecfg-development: winecfg-development is a fork bomb
On 07.09.2016 20:27, Jens Reyer wrote: > I think I can reproduce this: Wine starts a > wineserver which all other Wine processes connect to. This wineserver > has to be from the same build as the connecting process. Now if wine > (stable)'s wineserver is already running and I then start > wine-development I can observe this issue. It seems that in the Debian packaging SERVER_PROTOCOL_VERSION is always 1, and thus the check if server and clients match doesn't work. Testing between Debian's and winehq's versions I get e.g.: $ /usr/lib/wine-development/wine winecfg $ /usr/lib/wine-development/wine winecfg --> OK, 2 winecfg windows $ /usr/lib/wine/wine winecfg $ /usr/lib/wine-development/wine winecfg --> fork bomb (use "wineserver -k" to avoid system crash) $ /opt/wine-devel/bin/wine winecfg $ /usr/lib/wine/wine winecfg wine client error:0: version mismatch 515/1. Your wine binary was not upgraded correctly, or you have an older one somewhere in your PATH. Or maybe the wrong wineserver is still running? --> OK, mismatch detected $ /opt/wine-devel/bin/wine winecfg $ /opt/wine-staging/bin/wine winecfg wine client error:0: version mismatch 515/516. Your wineserver binary was not upgraded correctly, or you have an older one somewhere in your PATH. Or maybe the wrong wineserver is still running? --> OK, mismatch detected Attached patch is a dirty workaround for this, by always setting the SERVER_PROTOCOL_VERSION to 2. So if we apply this to e.g. src:wine-development, but not to src:wine, it will be detected if a client tries to connect to a mismatching wineserver from the other set: $ /usr/lib/wine-development/wine winecfg $ /usr/lib/wine/wine winecfg wine client error:0: version mismatch 2/1. Your wine binary was not upgraded correctly, or you have an older one somewhere in your PATH. Or maybe the wrong wineserver is still running? --> OK, mismatch detected However this workaround doesn't catch any version incompatibilities. So far I found that: internally SERVER_PROTOCOL_VERSION is SERVER_PROT. tools/make_requests puts this in include/wine/server_protocol.h.new include/wine/server_protocol.h in git has: #define SERVER_PROTOCOL_VERSION 515 This number seems to be updated with every relevant change. I assume generate/request.patch is incomplete, and needs to be fixed to correctly produce the right SERVER_PROTOCOL_VERSION. But I don't know if I can come up with a real fix. Any help would be appreciated! Other diagnosis (dead ends): - /tmp/.wine-$uid gets created. - I removed all /usr/bin/wine* and replaced the wineserver script by the binary to rule out the alternatives system and our scripts/link setup as reason for this. But I assume the alternatives system just led people to playing with wine and wine-development, which exposed this bug much more, see also #836566. - I built without the shlib-exit-calls.patch. Greets jre diff --git a/debian/patches/generate/request.patch b/debian/patches/generate/request.patch index 9c3f1c9..8bde81c 100644 --- a/debian/patches/generate/request.patch +++ b/debian/patches/generate/request.patch @@ -3,6 +3,15 @@ author: Michael Gilbert --- a/tools/make_requests +++ b/tools/make_requests +@@ -397,7 +397,7 @@ print SERVER_PROT "struct reply_head + foreach my $req (@requests) { print SERVER_PROT "struct ${req}_reply ${req}_reply;\n"; } + print SERVER_PROT "};\n\n"; + +-printf SERVER_PROT "#define SERVER_PROTOCOL_VERSION %d\n\n", $protocol + 1; ++printf SERVER_PROT "#define SERVER_PROTOCOL_VERSION %d\n\n", $protocol + 2; + print SERVER_PROT "#endif /* __WINE_WINE_SERVER_PROTOCOL_H */\n"; + close SERVER_PROT; + update_file( "include/wine/server_protocol.h" ); @@ -437,7 +437,7 @@ foreach my $err (sort keys %errors) push @trace_lines, "{ NULL, 0 }\n"; push @trace_lines, "};\n";
Bug#836911: [pkg-wine-party] Bug#836911: /usr/bin/winecfg-development: winecfg-development is a fork bomb
Hi, thanks for your report. I think I can reproduce this: Wine starts a wineserver which all other Wine processes connect to. This wineserver has to be from the same build as the connecting process. Now if wine (stable)'s wineserver is already running and I then start wine-development I can observe this issue. But if no wine process is running previously this doesn't happen. E.g. everything should be fine, if you first kill an eventually running wineserver, and then start winecfg: $ wineserver-development -k $ winecfg-development But $ winecfg-stable & $ winecfg-development ... leads to this bug. Can you confirm this? AFAIK in the past Wine aborted if the "wrong" wineserver was already running. Now I have to investigate if the whole issue is caused by the alternatives system (which was introduced in wine-development 1.9.16-1 and wine 1.8.3-3), or if you just ran into this because the alternatives system made this easier for you to get wrong. Greets jre
Bug#836911: /usr/bin/winecfg-development: winecfg-development is a fork bomb
Package: wine-development Version: 1.9.18-1 Severity: normal File: /usr/bin/winecfg-development Running winecfg-development just made my machine unusable. Excerpts of my "ps fax" output: 5836 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5843 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5844 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5845 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5846 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5847 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5848 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5849 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5842 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5850 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5853 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 5851 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop ... 6383 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 16146 ?T 0:00 \_ C:\windows\system32\explorer.exe /desktop 6384 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 16143 ?T 0:00 \_ C:\windows\system32\explorer.exe /desktop 6386 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop 16217 ?T 0:00 \_ C:\windows\system32\explorer.exe /desktop 6387 ?Ts 0:00 C:\windows\system32\explorer.exe /desktop ... 16068 ?Ts 0:00 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop 16065 ?Ts 0:00 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop 16071 ?Ts 0:03 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop 16077 ?Ts 0:00 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop 16056 ?Ts 0:00 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop 16067 ?Ts 0:00 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop 16070 ?Ts 0:01 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop 16073 ?Ts 0:00 /usr/lib/wine/wine64 C:\windows\system32\explorer.exe /desktop The console window I started that in was spammed with lots of messages: err:win:GetDesktopWindow failed to create desktop window err:ole:apartment_createwindowifneeded CreateWindow failed with error 1411 err:win:GetDesktopWindow failed to create desktop window err:ole:apartment_createwindowifneeded CreateWindow failed with error 1411 err:system:SYSPARAMS_Init Can't create wine registry branch err:system:SYSPARAMS_Init Can't create wine registry branch err:system:SYSPARAMS_Init Can't create wine registry branch err:system:SYSPARAMS_Init Can't create wine registry branch err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:ole:RPC_StartRemoting Couldn't register endpoint L"\\pipe\\OLE_03f203f3" err:ole:RPC_StartRemoting Couldn't register endpoint L"\\pipe\\OLE_03ee03ef" err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:system:SYSPARAMS_Init Can't create wine registry branch err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:win:GetDesktopWindow failed to create desktop window err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex err:font:WineEngInit Failed to create font mutex