https://bugs.winehq.org/show_bug.cgi?id=53456
Bug ID: 53456 Summary: kernel32:debugger - load_blackbox() sometimes fails for crash_and_debug() on Windows Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
kernel32:debugger - load_blackbox() sometimes fails for crash_and_debug() on Windows:
debugger.c:155: Test failed: unable to open 'C:\Users\winetest\AppData\Local\Temp\wt39FA.tmp' debugger.c:155: Test failed: failed to open: C:\Users\winetest\AppData\Local\Temp\wt39FA.tmp debugger.c:676: Test failed: the child and debugged pids don't match: 4840 != 1472
https://test.winehq.org/data/patterns.html#kernel32:debugger
This happens on Window 8 to Windows 10 21H1 in both 32- and 64-bit tests but the failure rate appears to be below 2%.
https://bugs.winehq.org/show_bug.cgi?id=53456
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=53456
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fgouget@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=53456
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- should be fixed by 2486f5a0028de8bfd23c46e8f1d95064cf994be5 let's wait a couple of days of testing to see what gives
https://bugs.winehq.org/show_bug.cgi?id=53456
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- (In reply to Eric Pouech from comment #1)
should be fixed by 2486f5a0028de8bfd23c46e8f1d95064cf994be5 let's wait a couple of days of testing to see what gives
actually not fully solved
https://bugs.winehq.org/show_bug.cgi?id=53456
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW
--- Comment #3 from François Gouget fgouget@codeweavers.com --- I believe I identified a new variant. First the original issue seems to always happen in the dbg,attach,process,event,detach test. So a more complete trace is:
debugger.c:610: running dbg,attach,process,event,detach... debugger.c:621: waiting for child exit... debugger.c:198: child: crashing... debugger.c:659: waiting for the debugger... debugger.c:155: Test failed: unable to open 'C:\Users\winetest\AppData\Local\Temp\wt681E.tmp' debugger.c:155: Test failed: failed to open: C:\Users\winetest\AppData\Local\Temp\wt681E.tmp debugger.c:676: Test failed: the child and debugged pids don't match: 8052 != 8236
The new variant happens in the same test but corresponds to a case where the blackbox file is... almost empty?
debugger.c:631: running dbg,attach,process,event,detach... debugger.c:642: waiting for child exit... debugger.c:205: child: crashing... debugger.c:680: waiting for the debugger... debugger.c:168: Test failed: wrong size for 'C:\Users\winetest\AppData\Local\Temp\wt5B67.tmp': read=0 debugger.c:173: debugger traces:>>>
<<< Done. debugger.c:697: Test failed: the child and debugged pids don't match: 3388 != 3508
So the first ReadFile() call in load_blackbox() returns 0 but the second one returns a single byte (0x06) for the debugger traces. This corresponds to the expected blackbox.argc value. Race condition?
Also the pid mismatch failure message looks like the blackbox file contained a 8236 pid. However when load_blackbox() fails, in either case, the content of the blackbox structure is uninitialized. Maybe it would be clearer to do a memset(0).
There are 3 known instances of this variant so far: * 2023-02-21 on w1064v1507 32-bit * 2023-03-13 on w10pro64-hi 64-bit * 2023-03-21 on w10pro64-pt-BR 64-bit