https://bugs.winehq.org/show_bug.cgi?id=52856
Bug ID: 52856 Summary: kernel32:process fails when Wine has no Unix terminal Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
kernel32:console fails on the TestBot Wine machines:
process.c:1552: Test failed: Opening ConIn process.c:1553: Test failed: Opening ConOut process.c:1556: Test failed: Getting sb info process.c:1557: Test failed: Getting console in mode process.c:1558: Test failed: Getting console out mode process.c:212: 5 failures in child process process.c:1569: Test failed: Getting sb info process.c:1570: Test failed: Getting console in mode process.c:1571: Test failed: Getting console out mode process.c:1582: Test failed: GetLastError: expecting 87 got 12 process.c:1592: Test failed: GetLastError: expecting 87 got 12 process.c:1621: Test failed: Console:SizeX expected 30870, but got 0 process.c:1622: Test failed: Console:SizeY expected 31489, but got 0 process.c:1623: Test failed: Console:CursorX expected 32644, but got 0 process.c:1624: Test failed: Console:CursorY expected 94, but got 0 process.c:1625: Test failed: Console:Attributes expected 0, but got 1 process.c:1626: Test failed: Console:winLeft expected 0, but got 1 process.c:1627: Test failed: Console:winTop expected 4294964424, but got 0 process.c:1628: Test failed: Console:winRight expected 49, but got 0 process.c:1629: Test failed: Console:winBottom expected 30870, but got 0 process.c:1630: Test failed: Console:maxWinWidth expected 31489, but got 0 process.c:1631: Test failed: Console:maxWinHeight expected 11256, but got 0 process.c:1634: Test failed: Console:InputMode expected 0, but got 1 process.c:1635: Test failed: Console:OutputMode expected 7211040, but got 0 process.c:1639: Test failed: Wrong console CP (expected 1252 got 0/0) process.c:1640: Test failed: Wrong console-SB CP (expected 1252 got 0/0) process.c:1645: Test failed: Wrong console mode process.c:1646: Test failed: Wrong console-SB mode
https://test.winehq.org/data/patterns.html#kernel32:process
The reason is that the TestBot starts Wine from a daemon process which does not have an associated xterm / Konsole / GNOME terminal. This causes Wine to have to allocate a Wine console and that's when things go wrong.
A bisect shows that the TestBot is only impacted by this bug since the commit below:
commit eff83cd4e00e8ccd4daad05bdd6d76e77664ddd1 Author: Eric Pouech eric.pouech@gmail.com Date: Mon Apr 11 15:05:09 2022 +0200
kernelbase: Provide a pseudo console environment for initial CUI processes not tied to a Unix tty.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52771 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52761 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52743 Signed-off-by: Eric Pouech eric.pouech@gmail.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
But as the commit entry shows this commit also fixed a lot of other issues in the TestBot results (not least of which is getting the wow64 WineTest results in an acceptable shape for test.winehq.org).
Also this issue has happened before as evidenced by bugs 25284 and 28220. However those bugs are very old (~2014) so the issue may have been fixed and reappeared (the TestBot has not used a Unix terminal to run the Wine tests since at least 2018-06 (date on local-testagentd.service) and probably 2017 or more (f1d368722b65 tools commit)).
Bug 28220 does have a more recent and interesting comment by Esme with regards to handle inheritance: https://bugs.winehq.org/show_bug.cgi?id=28220#c3