https://bugs.winehq.org/show_bug.cgi?id=35928
Bug ID: 35928 Summary: Crash handlers/debuggers fail to display user-interface when invoked for crashing (non-interactive) service processes (inherited Wine service window station/desktop) Product: Wine Version: 1.7.16 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net
Hello folks,
bug 35924 is about a crash in a win32 service which triggers 'winedbg' just-in-time debugger/crash handler. Unfortunately 'winedbg' fails to bring up its user interface hence you don't get a chance to see/save the crash info.
The win32 service is connected to Wine's default service window station and desktop '__wineservice_winstation\Default' objects (invisible).
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Echobit/Evolve ... $ WINEDEBUG=+tid,+seh,+relay,+win,+user,+server wine ./EvolveClient.exe
log.txt 2>&1
... 0043: new_process( inherit_all=0, create_flags=00000400, socket_fd=41, exe_file=00f4, process_access=001fffff, process_attr=00000000, thread_access=001fffff, thread_attr=00000000, cpu=x86, info_size=844, info={debug_flags=0,console_flags=0,console=0000,hstdin=ffffffff,hstdout=ffffffff,hstderr=0004,x=0,y=0,xsize=0,ysize=0,xchars=0,ychars=0,attribute=00,flags=0,show=0,curdir=L"C:\windows\",dllpath=L"C:\windows\system32;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem",imagepath=L"C:\Program Files\Echobit\Evolve\EvoSvc.exe",cmdline=L""C:\Program Files\Echobit\Evolve\EvoSvc.exe" -service -logfile "C:\users\Public\Application Data\Echobit\Evolve\EvoSvc.log"",title=L"C:\Program Files\Echobit\Evolve\EvoSvc.exe",desktop=L"__wineservice_winstation\Default",... ) 0043: *fd* 01c6 -> 232 ... 0045: create_winstation( flags=00000000, access=0000037f, attributes=000000c0, name=L"__wineservice_winstation" ) 0045: create_winstation() = OBJECT_NAME_EXISTS { handle=0050 } 0045: set_process_winstation( handle=0050 ) 0045: set_process_winstation() = 0 0045: create_desktop( flags=00000000, access=000001ff, attributes=000000c0, name=L"Default" ) 0045: create_desktop() = OBJECT_NAME_EXISTS { handle=0054 } 0045: set_thread_desktop( handle=0054 ) 0045: set_thread_desktop() = 0 ... 0045:Call advapi32.StartServiceCtrlDispatcherW(0033fd74) ret=0042d7e1 0045:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7edb86ca ip=7edb86ca tid=0045 0045:trace:seh:raise_exception info[0]=00000000 0045:trace:seh:raise_exception info[1]=00000003 0045:trace:seh:raise_exception eax=00000003 ebx=7ede1000 ecx=0051810a edx=00000008 esi=0033fd30 edi=0033fd34 0045:trace:seh:raise_exception ebp=0033fca8 esp=0033fc98 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010202 0045:trace:seh:call_stack_handlers calling handler at 0x50bbf0 code=c0000005 flags=0 0045:Call KERNEL32.GetLastError() ret=78ab0706 0045:Ret KERNEL32.GetLastError() retval=000000b7 ret=78ab0706 0045:trace:seh:call_stack_handlers handler at 0x50bbf0 returned 1 0045:trace:seh:call_stack_handlers calling handler at 0x4a1269 code=c0000005 flags=0 0045:Call KERNEL32.GetLastError() ret=78ab0706 0045:Ret KERNEL32.GetLastError() retval=000000b7 ret=78ab0706 0045:trace:seh:call_stack_handlers handler at 0x4a1269 returned 1 0045:trace:seh:call_stack_handlers calling handler at 0x7bc9ebbf code=c0000005 flags=0 0045:Call KERNEL32.UnhandledExceptionFilter(0033f764) ret=7bc9ebf9 0045: create_event( access=001f0003, attributes=00000002, manual_reset=1, initial_state=0, objattr={rootdir=0000,sd={},name=L""} ) 0045: create_event() = 0 { handle=0084 } wine: Unhandled page fault on read access to 0x00000003 at address 0x7edb86ca (thread 0045), starting debugger... ... 0045:trace:seh:start_debugger Starting debugger "winedbg --auto 68 132" ... 0045: new_process( inherit_all=1, create_flags=00000400, socket_fd=12, exe_file=0088, process_access=001fffff, process_attr=00000000, thread_access=001fffff, thread_attr=00000000, cpu=x86, info_size=556, info={debug_flags=0,console_flags=0,console=0000,hstdin=0004,hstdout=0008,hstderr=000c,x=0,y=0,xsize=0,ysize=0,xchars=0,ychars=0,attribute=00,flags=1,show=1,curdir=L"C:\windows\",dllpath=L"C:\Program Files\Echobit\Evolve;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem",imagepath=L"C:\windows\system32\winedbg.exe",cmdline=L"winedbg --auto 68 132",title=L"C:\windows\system32\winedbg.exe",desktop=L"",shellinfo=L"",runtime=L""}... 0045: *fd* 01c6 -> 239 0045: new_process() = 0 { info=008c, pid=0046, phandle=0090, tid=0047, thandle=0094 } ... 0045: select() = PENDING { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0047: *fd* 5 <- 239 0047: *fd* 7 <- 240 0047: init_thread( unix_pid=28628, unix_tid=28628, debug_level=1, teb=7ffd8000, entry=7ffdf000, reply_fd=5, wait_fd=7, cpu=x86 ) 0047: init_thread() = 0 { pid=0046, tid=0047, server_start=1cf50cde49be514 (-74.1316280), info_size=1744, version=454, all_cpus=00000001 }
0047:Call user32.LoadCursorW(00000000,00007f00) ret=f72ceb04 0047:Call user32.GetDesktopWindow() ret=f706cd2f 0047: get_desktop_window( force=0 ) 0047: get_desktop_window() = 0 { top_window=00000000, msg_window=00000000 } 0047: get_process_winstation( ) 0047: get_process_winstation() = 0 { handle=0010 } 0047: set_user_object_info( handle=0010, flags=00000000, obj_flags=00000000 ) 0047: set_user_object_info() = 0 { is_desktop=0, old_obj_flags=00000000, name=L"" } 0047:trace:win:GetDesktopWindow not starting explorer since winstation is not visible 0047: get_desktop_window( force=1 ) 0047: get_desktop_window() = 0 { top_window=00010058, msg_window=0001005a } ... 0047:Call KERNEL32.LoadLibraryA(7ede80e6 "user32.dll") ret=7edcf276 0047:Ret KERNEL32.LoadLibraryA() retval=f7160000 ret=7edcf276 0047:Call KERNEL32.GetProcAddress(f7160000,7ede8142 "DialogBoxParamW") ret=7edcf2ae 0047:Ret KERNEL32.GetProcAddress() retval=f7162da0 ret=7edcf2ae 0047:Call user32.DialogBoxParamW(7eda0000,00000064,00000000,7eda9fb7,00000000) ret=7edaa856 ... 0047:trace:win:WIN_CreateWindowEx L"Program Error" #8002 ex=00010001 style=80c800cc 3406512,3407044 279x241 parent=(nil) menu=(nil) inst=0x7eda0000 params=(nil) 0047:trace:win:dump_window_styles style: WS_POPUP WS_CAPTION WS_SYSMENU 000000cc 0047:trace:win:dump_window_styles exstyle: WS_EX_DLGMODALFRAME WS_EX_CONTROLPARENT ... 0047: create_window( parent=00010058, owner=00000000, atom=8002, instance=7eda0000, class=L"" ) 0047: create_window() = 0 { handle=00010066, parent=00010058, owner=00000000, extra=30, class_ptr=0012ed18 } ... 0047:Call window proc 0xf71880b7 (hwnd=0x10066,msg=WM_NCCREATE,wp=00000000,lp=0033f8e0) 0047:trace:win:WIN_SetWindowLong 0x10066 0 0 W 0047: set_window_text( handle=00010066, text=L"Program Error" ) 0047: set_window_text() = 0 0047:Ret window proc 0xf71880b7 ... 0047:Call window proc 0xf71880b7 (hwnd=0x10066,msg=WM_CREATE,wp=00000000,lp=0033f8e0) 0047:trace:win:WIN_SetWindowLong 0x10066 0 0 W 0047:Ret window proc 0xf71880b7 (hwnd=0x10066,msg=WM_CREATE,wp=00000000,lp=0033f8e0) retval=00000000 Application tried to create a window, but no driver could be loaded. The explorer process failed to start. 0047:trace:win:WIN_DestroyWindow 0x10066 ... --- snip ---
When 'winedbg' is spawned from crashing non-interactive win32 service process it inherits the parent window station object.
Not sure how this scenario should be handled .. making an exception and giving 'winedbg' the default interactive window station/desktop or forcing 'winedbg' to non-ui mode to have at least a console trace?
$ sha1sum EvolveSetup.exe 0c9f92f1ed5f97bced68c1185525dfe78900f795 EvolveSetup.exe
$ du -sh EvolveSetup.exe 3.2M EvolveSetup.exe
$ wine --version wine-1.7.16
Regards
https://bugs.winehq.org/show_bug.cgi?id=35928
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download URL| |https://update-cdn.evolvehq | |.com/installers/EvolveSetup | |.exe
https://bugs.winehq.org/show_bug.cgi?id=35928
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=35928
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #1 from Bernhard Übelacker bernhardu@mailbox.org --- This bug with the user-interface part could probably be marked as STAGED as there is currently this patch included in the staging patches:
patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch
PS.: Crashes in winedevice.exe would still not get shown because of a check for the program name in winedbg/crashdlg.c:367, display_crash_dialog, but this is probably a separate "bug"?
https://bugs.winehq.org/show_bug.cgi?id=35928
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/blob/mast | |er/patches/kernel32-Debugge | |r/0001-kernel32-Always-star | |t-debugger-on-WinSta0.patch Status|NEW |STAGED Component|-unknown |kernel32
https://bugs.winehq.org/show_bug.cgi?id=35928
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=35928
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |13f9461e99398f4080bf0fdd68a | |03f57a5427002 CC| |nerv@dawncrow.de Status|STAGED |RESOLVED Resolution|--- |FIXED
--- Comment #2 from André H. nerv@dawncrow.de ---
https://source.winehq.org/git/wine.git/commit/13f9461e99398f4080bf0fdd68a03f...
https://bugs.winehq.org/show_bug.cgi?id=35928
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.13.
https://bugs.winehq.org/show_bug.cgi?id=35928
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=35928
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #4 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bugs included in 3.0.3.
https://bugs.winehq.org/show_bug.cgi?id=35928
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://update-cdn.evolvehq |https://web.archive.org/web |.com/installers/EvolveSetup |/20141210041313/https://upd |.exe |ate-cdn.evolvehq.com/instal | |lers/EvolveSetup.exe