[Bug 40425] New: Page fault in PsList from sysinternals
https://bugs.winehq.org/show_bug.cgi?id=40425 Bug ID: 40425 Summary: Page fault in PsList from sysinternals Product: Wine Version: 1.9.7 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: alexchandel(a)gmail.com Distribution: --- Created attachment 54168 --> https://bugs.winehq.org/attachment.cgi?id=54168 Backtrace of page fault on 1.9.7 Running PsList with no arguments triggers an immediate page fault. Tested on wine-1.9.7, OS X 10.11. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 alexchandel(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Version|1.9.7 |unspecified -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 --- Comment #1 from alexchandel(a)gmail.com --- Still present in wine-1.9.11 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.9.7 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 --- Comment #2 from alexchandel(a)gmail.com --- Still getting "wine: Unhandled page fault on read access to 0x00000004 at address 0x401229 (thread 0009), starting debugger..." as of release 1.9.16 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xerox_xerox2000(a)yahoo.co.uk --- Comment #3 from Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> --- Hi, this is a known issue about missing registry key HKEY_PERFORMANCE_DATA See also https://bugs.winehq.org/show_bug.cgi?id=33037 and https://bugs.winehq.org/show_bug.cgi?id=33955 and See also closed bug https://bugs.winehq.org/show_bug.cgi?id=5322 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 --- Comment #4 from alexchandel(a)gmail.com --- The error has changed, somewhere between 1.9.17 and 2.14. It now reads: wine pslist.exe pslist v1.3 - Sysinternals PsList Copyright (C) 2000-2012 Mark Russinovich Sysinternals - www.sysinternals.com Failed to take process snapshot on alex-mbr. Make sure that the Remote Registry service is running on the remote system, that you havefirewall ports allow RPC access, and your account has read access the following key on the remote system: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Perflib -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Summary|Page fault in PsList from |PsList from Sysinternals |sysinternals |crashes when trying to | |retrieve performance | |counter data CC| |focht(a)gmx.net URL| |https://docs.microsoft.com/ | |en-us/sysinternals/download | |s/pslist Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Component|-unknown |advapi32 --- Comment #5 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, confirming, still present. Also adding download link. --- snip --- $ WINEDEBUG=+seh,+relay,+reg wine ./pslist.exe >>log.txt 2>&1 ... 002f:Call advapi32.RegOpenKeyExA(80000002,0041f7e8 "software\\microsoft\\windows nt\\currentversion\\perflib",00000000,00020019,0033f418) ret=00402aae 002f:trace:reg:open_key (0x28,L"software\\microsoft\\windows nt\\currentversion\\perflib",20019,0x33f418) 002f:trace:reg:open_key <- 0x54 002f:Ret advapi32.RegOpenKeyExA() retval=00000000 ret=00402aae 002f:Call advapi32.RegQueryValueExA(00000054,0041f7c0 "Last Counter",00000000,00000000,0033f520,0033f408) ret=00402acb 002f:trace:reg:RegQueryValueExA (0x54,"Last Counter",(nil),(nil),0x33f520,0x33f408=4) 002f:trace:reg:NtQueryValueKey (0x54,L"Last Counter",2,0x33f240,256) 002f:Ret advapi32.RegQueryValueExA() retval=00000000 ret=00402acb 002f:Call advapi32.RegCloseKey(00000054) ret=00402ae9 002f:Ret advapi32.RegCloseKey() retval=00000000 ret=00402ae9 002f:Call advapi32.RegQueryValueExA(80000004,0041f7b4 "Counter 009",00000000,00000000,00000000,0033f40c) ret=00402afb 002f:trace:reg:RegQueryValueExA (0x80000004,"Counter 009",(nil),(nil),(nil),0x33f40c=525469) 002f:Ret advapi32.RegQueryValueExA() retval=000000ea ret=00402afb 002f:Call KERNEL32.IsBadStringPtrA(0041ff4c,ffffffff) ret=00405af4 002f:Ret KERNEL32.IsBadStringPtrA() retval=00000000 ret=00405af4 002f:Call ntdll.RtlAllocateHeap(00110000,00000000,0000000a) ret=0040659e 002f:Ret ntdll.RtlAllocateHeap() retval=00157e10 ret=0040659e 002f:Call KERNEL32.GetLastError() ret=0040a9ec 002f:Ret KERNEL32.GetLastError() retval=00000000 ret=0040a9ec 002f:Call KERNEL32.GetLastError() ret=0040a9ec 002f:Ret KERNEL32.GetLastError() retval=00000000 ret=0040a9ec 002f:Call KERNEL32.IsBadStringPtrA(00157e10,ffffffff) ret=00402c03 002f:Ret KERNEL32.IsBadStringPtrA() retval=00000000 ret=00402c03 002f:trace:seh:raise_exception code=c0000005 flags=0 addr=0x402c23 ip=00402c23 tid=002f 002f:trace:seh:raise_exception info[0]=00000000 002f:trace:seh:raise_exception info[1]=00000004 002f:trace:seh:raise_exception eax=00000000 ebx=00157e10 ecx=0033f520 edx=00157e1a esi=00000001 edi=0033f520 002f:trace:seh:raise_exception ebp=0033f2c4 esp=0033f2b8 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 002f:trace:seh:call_stack_handlers calling handler at 0x418a21 code=c0000005 flags=0 ... --- snip --- Source: https://source.winehq.org/git/wine.git/blob/6500f882dad29eb417107d2f73589b31... --- snip --- 1625 static DWORD query_perf_data(const WCHAR *query, DWORD *type, void *data, DWORD *ret_size) 1626 { 1627 static const WCHAR SZ_SERVICES_KEY[] = { 'S','y','s','t','e','m','\\', 1628 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 1629 'S','e','r','v','i','c','e','s',0 }; 1630 DWORD err, i, data_size; 1631 HKEY root; 1632 PERF_DATA_BLOCK *pdb; 1633 1634 if (!ret_size) 1635 return ERROR_INVALID_PARAMETER; 1636 1637 data_size = *ret_size; 1638 *ret_size = 0; 1639 1640 if (type) 1641 *type = REG_BINARY; 1642 1643 if (!data || data_size < sizeof(*pdb)) 1644 return ERROR_MORE_DATA; --- snip --- Microsoft Docs: https://docs.microsoft.com/en-us/windows/desktop/api/winreg/nf-winreg-regque... --- quote --- If hKey specifies HKEY_PERFORMANCE_DATA and the lpData buffer is not large enough to contain all of the returned data, RegQueryValueEx returns ERROR_MORE_DATA and the value returned through the lpcbData parameter is undefined. This is because the size of the performance data can change from one call to the next. In this case, you must increase the buffer size and call RegQueryValueEx again passing the updated buffer size in the lpcbData parameter. Repeat this until the function succeeds. You need to maintain a separate variable to keep track of the buffer size, because the value returned by lpcbData is unpredictable. --- quote --- Returning 'ERROR_MORE_DATA' when the app just wants to query the buffer size is not correct. Another example from Microsoft Docs, showing this: https://docs.microsoft.com/en-us/windows/desktop/PerfCtrs/retrieving-counter... --- snip --- ... // Query the size of the text data so you can allocate the buffer. status = RegQueryValueEx(HKEY_PERFORMANCE_DATA, wszSourceAndLangId, NULL, NULL, NULL, &dwBufferSize); if (ERROR_SUCCESS != status) { wprintf(L"RegQueryValueEx failed getting required buffer size. Error is 0x%x.\n", status); goto cleanup; } ... --- snip --- $ sha1sum PSTools.zip 1e562ff2bae38856f8dcf3f939cdbe8e1bf6ccf3 PSTools.zip $ du -sh PSTools.zip 2.8M PSTools.zip $ wine --version wine-3.12-110-g414fe80aeb 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|advapi32 |kernel32 Depends on| |33037 URL|https://docs.microsoft.com/ |https://web.archive.org/web |en-us/sysinternals/download |/20201207090557/https://dow |s/pslist |nload.sysinternals.com/file | |s/PSTools.zip --- Comment #6 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, revisiting, obviously still present. Adding dependency to bug 33037 Adding stable download link via Internet Archive: https://web.archive.org/web/20201207090557/https://download.sysinternals.com... The crash is a follow-up problem, as already explained in my comment #5 The corresponding code moved meanwhile to kernelbase: https://source.winehq.org/git/wine.git/commitdiff/c7548d6c4fcc37844503f67d41... ("advapi32: Move registry functions to kernelbase.") Now here: https://source.winehq.org/git/wine.git/blob/56e7cd12ce0ce3bb331a8595b25aedb8... --- snip --- 1299 static DWORD query_perf_data(const WCHAR *query, DWORD *type, void *data, DWORD *ret_size) 1300 { 1301 DWORD err, i, data_size; 1302 HKEY root; 1303 PERF_DATA_BLOCK *pdb; 1304 1305 if (!ret_size) 1306 return ERROR_INVALID_PARAMETER; 1307 1308 data_size = *ret_size; 1309 *ret_size = 0; 1310 1311 if (type) 1312 *type = REG_BINARY; 1313 1314 if (!data || data_size < sizeof(*pdb)) 1315 return ERROR_MORE_DATA; ... --- snip --- $ wine --version wine-6.0-rc3 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 Bug 40425 depends on bug 33037, which changed state. Bug 33037 Summary: Multiple Microsoft product installers fail due to missing registry performance counter information (HKEY_PERFORMANCE_DATA 230, process object)(Visual Studio 6, eMbedded Visual C++ 4.0, SQL Server Management Studio Express 2008 R2) https://bugs.winehq.org/show_bug.cgi?id=33037 What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |FIXED -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40425 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de -- 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.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla