[Bug 50430] New: winedbg crash reporter dialog shows 'winedevice' process name as 'unidentified'
WineHQ Bugzilla
wine-bugs at winehq.org
Thu Dec 31 08:30:57 CST 2020
https://bugs.winehq.org/show_bug.cgi?id=50430
Bug ID: 50430
Summary: winedbg crash reporter dialog shows 'winedevice'
process name as 'unidentified'
Product: Wine
Version: 6.0-rc4
Hardware: x86-64
OS: Linux
Status: NEW
Severity: trivial
Priority: P2
Component: kernel32
Assignee: wine-bugs at winehq.org
Reporter: focht at gmx.net
Distribution: ---
Hello folks,
as it says. When a kernel driver crashes the 'winedevice' hosting process,
winedbg's crash reporter dialog has the title '"The program (unidentified) has
encountered a serious problem and needs to close. We are sorry for the
inconvenience."'
It's not really a problem since the crash dialog contains information that
points to the crashing process. But most users won't figure that part out.
--- snip ---
...
0060:Call KERNEL32.OpenProcess(00000400,00000000,00000044) ret=7f3f831db66b
0060:Call kernelbase.OpenProcess(00000400,00000000,00000044) ret=7bc4429f
...
0060:Call ntdll.NtOpenProcess(0021fa50,00000400,0021fa68,0021fa58) ret=7b041f9c
0060: open_process( pid=0044, access=00000400, attributes=00000000 )
0060: open_process() = 0 { handle=0098 }
0060:Ret ntdll.NtOpenProcess() retval=00000000 ret=7b041f9c
0060:Ret kernelbase.OpenProcess() retval=00000098 ret=7bc4429f
0060:Ret KERNEL32.OpenProcess() retval=00000098 ret=7f3f831db66b
0060:Call KERNEL32.K32GetProcessImageFileNameW(00000098,0021f9a0,00000104)
ret=7f3f831da8d0
0060:Call kernelbase.K32GetProcessImageFileNameW(00000098,0021f9a0,00000104)
ret=7bc4429f
0060:Call
ntdll.NtQueryInformationProcess(00000098,0000001b,0021edf0,00000216,0021ede4)
ret=7b014f6e
0060: get_dll_info( handle=0098, base_address=00000000 )
0060: get_dll_info() = 0 { entry_point=00000000, filename_len=68,
filename=L"C:\\windows\\system32\\winedevice.exe" }
0060:Ret ntdll.NtQueryInformationProcess() retval=00000000 ret=7b014f6e
0060:Call ntdll.RtlIsDosDeviceName_U(0021edea L"C:") ret=7b060e83
0060:Ret ntdll.RtlIsDosDeviceName_U() retval=00000000 ret=7b060e83
...
0060:Call ntdll.NtOpenSymbolicLinkObject(0021e858,00000001,0021e870)
ret=7b060bb9
0060: open_symlink( access=00000001, attributes=00000040, rootdir=0000,
name=L"\\DosDevices\\C:" )
0060: open_symlink() = OBJECT_NAME_NOT_FOUND { handle=0000 }
0060:Ret ntdll.NtOpenSymbolicLinkObject() retval=c0000034 ret=7b060bb9
...
0060:Call ntdll.RtlNtStatusToDosError(c0000034) ret=7b060f89
0060:Ret ntdll.RtlNtStatusToDosError() retval=00000002 ret=7b060f89
...
0060:Call ntdll.RtlNtStatusToDosError(c000000e) ret=7b01512f
0060:Ret ntdll.RtlNtStatusToDosError() retval=00000002 ret=7b01512f
0060:Ret kernelbase.K32GetProcessImageFileNameW() retval=00000000 ret=7bc4429f
...
0060:Call user32.SetDlgItemTextW(0002004a,00000065,0021e880 L"The program
(unidentified) has encountered a serious problem and needs to close. We are
sorry for the inconvenience.") ret=7f3f831da59d
---snip ---
Wine source:
https://source.winehq.org/git/wine.git/blob/784cb2060ab63076adc349dcb1d15a6cb5eb2bc4:/dlls/kernelbase/debug.c#l1636
--- snip ---
1636 /******************************************************************
1637 * QueryFullProcessImageNameW (kernelbase.@)
1638 */
1639 BOOL WINAPI DECLSPEC_HOTPATCH QueryFullProcessImageNameW( HANDLE process,
DWORD flags,
1640 WCHAR *name,
DWORD *size )
1641 {
1642 BYTE buffer[sizeof(UNICODE_STRING) + MAX_PATH*sizeof(WCHAR)]; /* this
buffer should be enough */
1643 UNICODE_STRING *dynamic_buffer = NULL;
1644 UNICODE_STRING *result = NULL;
1645 NTSTATUS status;
1646 DWORD needed;
1647
1648 /* FIXME: On Windows, ProcessImageFileName return an NT path. In Wine
it
1649 * is a DOS path and we depend on this. */
1650 status = NtQueryInformationProcess( process, ProcessImageFileName,
buffer,
1651 sizeof(buffer) - sizeof(WCHAR),
&needed );
1652 if (status == STATUS_INFO_LENGTH_MISMATCH)
1653 {
1654 dynamic_buffer = HeapAlloc( GetProcessHeap(), 0, needed +
sizeof(WCHAR) );
1655 status = NtQueryInformationProcess( process, ProcessImageFileName,
dynamic_buffer,
1656 needed, &needed );
1657 result = dynamic_buffer;
1658 }
1659 else
1660 result = (UNICODE_STRING *)buffer;
1661
1662 if (status) goto cleanup;
1663
1664 if (flags & PROCESS_NAME_NATIVE)
1665 {
1666 WCHAR drive[3];
1667 WCHAR device[1024];
1668 DWORD ntlen, devlen;
1669
1670 if (result->Buffer[1] != ':' || result->Buffer[0] < 'A' ||
result->Buffer[0] > 'Z')
1671 {
1672 /* We cannot convert it to an NT device path so fail */
1673 status = STATUS_NO_SUCH_DEVICE;
1674 goto cleanup;
1675 }
1676
1677 /* Find this drive's NT device path */
1678 drive[0] = result->Buffer[0];
1679 drive[1] = ':';
1680 drive[2] = 0;
1681 if (!QueryDosDeviceW(drive, device, ARRAY_SIZE(device)))
1682 {
1683 status = STATUS_NO_SUCH_DEVICE;
1684 goto cleanup;
1685 }
1686
1687 devlen = lstrlenW(device);
1688 ntlen = devlen + (result->Length/sizeof(WCHAR) - 2);
1689 if (ntlen + 1 > *size)
1690 {
1691 status = STATUS_BUFFER_TOO_SMALL;
1692 goto cleanup;
1693 }
1694 *size = ntlen;
1695
1696 memcpy( name, device, devlen * sizeof(*device) );
1697 memcpy( name + devlen, result->Buffer + 2, result->Length - 2 *
sizeof(WCHAR) );
1698 name[*size] = 0;
1699 TRACE( "NT path: %s\n", debugstr_w(name) );
1700 }
1701 else
1702 {
1703 if (result->Length/sizeof(WCHAR) + 1 > *size)
1704 {
1705 status = STATUS_BUFFER_TOO_SMALL;
1706 goto cleanup;
1707 }
1708
1709 *size = result->Length/sizeof(WCHAR);
1710 memcpy( name, result->Buffer, result->Length );
1711 name[*size] = 0;
1712 }
1713
1714 cleanup:
1715 HeapFree( GetProcessHeap(), 0, dynamic_buffer );
1716 return set_ntstatus( status );
1717 }
--- snip ---
Example crash report dialog context (from bug 50428) to show the crashing
"unidentified" process
--- snip ---
Unhandled exception: unimplemented function
ntoskrnl.exe.SeCaptureSecurityDescriptor called in 64-bit code
(0x000000007b012af2).
Register dump:
rip:000000007b012af2 rsp:0000000000c3f560 rbp:0000000000c3f5e0 eflags:00000206
( - -- I - -P- )
rax:0000000000c3f5a0 rbx:0000000000dee138 rcx:0000000000c3f580
rdx:0000000000c3f650
rsi:0000000000000002 rdi:000000007b60e660 r8:0000000000000010
r9:0000000000000010 r10:0000000000c3f5a0
r11:0000000000000246 r12:0000000000c3f870 r13:00000000000197d0
r14:0000000000000022 r15:0000000000000008
...
Backtrace:
=>0 0x000000007b012af2 RaiseException+0x72() in kernelbase (0x0000000000c3f5e0)
1 0x0000000000330ad5 __wine_spec_unimplemented_stub+0x44()
[Z:\home\focht\projects\wine\mainline-src\dlls\winecrt0\stub.c:2147483680] in
ntoskrnl (0x0000000000c3f660)
2 0x0000000000315277 vectored_handler+0xffffffffffffffff() in ntoskrnl
(0x0000000000000000)
0x000000007b012af2 RaiseException+0x72 in kernelbase: nop
Modules:
Module Address Debug info Name (11 modules)
PE 220000- 244000 Deferred sechost
PE 250000- 303000 Deferred ucrtbase
PE 310000- 357000 PDB ntoskrnl
PE 360000- 3eb000 Deferred msvcrt
PE ad0000- b39000 Deferred rpcrt4
PE d60000- e02000 Deferred bhdrvx64.sys
PE 7b000000- 7b0a6000 PDB kernelbase
PE 7b600000- 7b80a000 Deferred kernel32
PE 7bc00000- 7bc8a000 Deferred ntdll
PE 140000000- 140008000 Deferred winedevice
PE 180000000- 180038000 Deferred advapi32
Threads:
process tid prio (all id:s are in hex)
...
00000044 (D) C:\windows\system32\winedevice.exe
00000048 0
00000054 0 <==
00000058 0
0000006c 0
...
--- snip ---
$ sha1sum NAV10TBEN.exe
eadfb9c860146186c548aba695a9be87607f5586 NAV10TBEN.exe
$ du -sh NAV10TBEN.exe
74M NAV10TBEN.exe
$ wine --version
wine-6.0-rc4
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list