https://bugs.winehq.org/show_bug.cgi?id=41114
Bug ID: 41114 Summary: CPU-Z randomly fails to load its driver (cpuz139_x32.sys) Product: Wine Version: 1.9.16 Hardware: x86-64 URL: http://www.cpuid.com/downloads/cpu-z/cpu-z_1.77-en.zip OS: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: 00cpxxx@gmail.com Distribution: Debian
Created attachment 55318 --> https://bugs.winehq.org/attachment.cgi?id=55318 app log
When attempting to run CPU-Z 1.77 it will randomly open without errors or will present a screen stating that it failed to load the driver. Anyway the driver even when loaded does not seem to help in anything as many pages of information are blank with or without it.
The error log from the application (full log attached) has these lines:
[WinNT_bCreateService] szDestName = C:\users\wine\Temp\cpuz139\cpuz139_x32.sys [WinNT_bCreateService] CreateService failed, error code = 1073 [WinNT_hCreateServiceHandle] returned 2 (0x2)
File Info: d9d7b1e1d815370fddb886aa3d12125daacac727 cpu-z_1.77-en.zip 2.5Mb
I'm running the 32 bits version, the same zip file also have a 64 bits version.
https://bugs.winehq.org/show_bug.cgi?id=41114
--- Comment #1 from Vincent Povirk madewokherd@gmail.com --- FWIW, 1073 is ERROR_SERVICE_EXISTS.
https://bugs.winehq.org/show_bug.cgi?id=41114
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 55319 --> https://bugs.winehq.org/attachment.cgi?id=55319 failed load attempt (+loaddll,+process,+service)
https://bugs.winehq.org/show_bug.cgi?id=41114
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 55320 --> https://bugs.winehq.org/attachment.cgi?id=55320 success load (+loaddll,+process,+service)
https://bugs.winehq.org/show_bug.cgi?id=41114
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Vincent Povirk from comment #1)
FWIW, 1073 is ERROR_SERVICE_EXISTS.
Some sort of race condition then (?)
https://bugs.winehq.org/show_bug.cgi?id=41114
Sergey Isakov isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |isakov-sl@bk.ru
--- Comment #5 from Sergey Isakov isakov-sl@bk.ru --- For me CPU-Z-1.74 always crash with wine-2.11 and works with wine-staging-2.11 CPU E6850 Conroe.
https://bugs.winehq.org/show_bug.cgi?id=41114
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Summary|CPU-Z randomly fails to |CPU-Z randomly fails to |load its driver |load its driver |(cpuz139_x32.sys) |(cpuz139_x32.sys)('StartSer | |vice' must wait for driver | |service entry point | |execution before return) Status|NEW |RESOLVED CC| |focht@gmx.net
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
dupe of bug 38836
In short: Wine's service manager doesn't wait until the kernel driver entry point is fully executed hence the driver symbolic device link '\\.\cpuz140' which is created in entry point might not exist yet when the client process tries to open it immediately after the StartService() call returns.
App log:
--- snip--- [bInitDriver] path = C:\users\focht\Temp\ [bInitDriver] GetCurrentDirectory = Z:\home\focht\Downloads [bInitDriver] GetModuleFileName = Z:\home\focht\Downloads\cpuz_x32.exe [vGetOSVersion] m_iOSVersion = 2 (5.1) [vGetOSVersion] m_bIsAMD64 = 0 [bInitDriver] m_hDriverMutex = 90 [bDeleteFile 13:18:16] DeleteFile returned = 0 (error = 3) [bDeleteFile 13:18:16] RemoveDirectory C:\users\focht\Temp\cpuz140\ returned = 0 (error = 2) [bInitDriver] m_szFilename = cpuz140_x32.sys [WinNT_hCreateServiceHandle] returned 2 (0x2) [WinNT_bInstallDriver 13:18:16] szMachineName = n550 [dwExtract_SYS] Extract C:\users\focht\Temp\cpuz140\cpuz140_x32.sys [WinNT_bCreateService] szDestName = C:\users\focht\Temp\cpuz140\cpuz140_x32.sys [WinNT_hCreateServiceHandle] returned 2 (0x2) [bInitDriver] bInitDriver returned 2 [vCloseDriver 13:18:16] WaitForSingleObject error = 0 [WinNT_dwStopService] ControlService[SERVICE_CONTROL_INTERROGATE] status = 0x4 [WinNT_dwStopService] ControlService[SERVICE_CONTROL_STOP] status = 0x3 [WinNT_dwStopService] ControlService[SERVICE_CONTROL_STOP] failed, pending, result = 0 [bDeleteFile 13:18:16] DeleteFile returned = 1 (error = 0) [bDeleteFile 13:18:16] RemoveDirectory C:\users\focht\Temp\cpuz140\ returned = 1 (error = 0) [vCloseDriver] CloseHandle(mutex) = 1 --- snip ---
Relevant part of "good case" trace log:
--- snip --- ... 0009:Call advapi32.CreateServiceA(0015cca0,007f2a28 "cpuz140",007f2a28 "cpuz140",000f01ff,00000001,00000003,00000001,0033e6c8 "C:\users\focht\Temp\\cpuz140\cpuz140_x32.sys",00000000,00000000,00000000,00000000,00000000) ret=00436740 ... 0015:trace:service:svcctl_CreateServiceW (L"cpuz140", L"cpuz140", 0xf01ff, L"C:\users\focht\Temp\\cpuz140\cpuz140_x32.sys") 0015:trace:service:create_serviceW (L"cpuz140", L"cpuz140", 0xf01ff, L"C:\users\focht\Temp\\cpuz140\cpuz140_x32.sys") ... 0009:trace:service:SERV_OpenServiceW returning 0x15c810 0009:Ret advapi32.OpenServiceA() retval=0015c810 ret=00436867 0009:Call advapi32.StartServiceA(0015c810,00000000,00000000) ret=004368a1 ... 0014:trace:process:create_process_impl starting L"C:\windows\system32\winedevice.exe" as Win32 binary (0x10000000-0x10003000, arch 014c, fakedll) ... 002f:Call KERNEL32.__wine_kernel_init() ret=7bc69f34 ... 0014:trace:process:create_process_impl started process pid 002e tid 002f 0014:Ret KERNEL32.CreateProcessW() retval=00000001 ret=7ed6c56b ... 0014:trace:service:process_send_start_message 0x11c390 L"Winedevice3" 0x64e408 0 ... 002f:trace:service:service_run_main_thread Starting 1 services running as process 46 ... 0014:trace:service:service_start returning 0 ... 0034:Call KERNEL32.LoadLibraryW(0011cb28 L"C:\users\focht\Temp\\cpuz140\cpuz140_x32.sys") ret=7effaaa4 ... 0009:Ret advapi32.StartServiceA() retval=00000001 ret=004368a1 ... 0034:trace:loaddll:load_native_dll Loaded L"C:\users\focht\Temp\cpuz140\cpuz140_x32.sys" at 0x740000: native ... 0034:Ret KERNEL32.LoadLibraryW() retval=00740000 ret=7effaaa4 ... 0034:Call driver init 0x74703e (obj=0x11c950,str=L"\Registry\Machine\System\CurrentControlSet\Services\cpuz140") ... ntoskrnl.exe.IoCreateDevice(0011c950,00000004,0063e734,00009c40,00000000,00000001,0063e740) ret=00743e95 ... 0034:trace:ntoskrnl:IoCreateDevice (0x11c950, 4, L"\Device\cpuz140", 40000, 0, 1, 0x63e740) ... 0034:trace:ntoskrnl:IoCreateSymbolicLink L"\DosDevices\Global\CPUZ140" -> L"\Device\cpuz140" ... 0034:Ret driver init 0x74703e (obj=0x11c950,str=L"\Registry\Machine\System\CurrentControlSet\Services\cpuz140") retval=00000000 ... 0034:trace:service:SetServiceStatus 0x11b7d8 30 4 5 0 0 0 0 ... 0009:Call KERNEL32.CreateFileA(0033e6f8 "\\.\cpuz140",80000000,00000001,00000000,00000003,00000000,00000000) ret=00436a72 ... 0009:Ret KERNEL32.CreateFileA() retval=00000088 ret=00436a72 ... --- snip ---
Last parts of "bad case" trace log:
--- snip --- ... 0035:Call KERNEL32.LoadLibraryW(0011cb20 L"C:\users\focht\Temp\\cpuz140\cpuz140_x32.sys") ret=7effaaa4 ... 0009:Ret advapi32.StartServiceA() retval=00000001 ret=004368a1 ... 0035:trace:loaddll:load_native_dll Loaded L"C:\users\focht\Temp\cpuz140\cpuz140_x32.sys" at 0x740000: native ... 0009:Call KERNEL32.CreateFileA(0033e6f8 "\\.\cpuz140",80000000,00000001,00000000,00000003,00000000,00000000) ret=00436a72 ... 0009:Ret KERNEL32.CreateFileA() retval=ffffffff ret=00436a72 ... 0009:Call KERNEL32.GetLastError() ret=00436a7e 0009:Ret KERNEL32.GetLastError() retval=00000002 ret=00436a7e ... 0035:Call driver init 0x74703e (obj=0x11c948,str=L"\Registry\Machine\System\CurrentControlSet\Services\cpuz140") ... 0035:trace:ntoskrnl:IoCreateSymbolicLink L"\DosDevices\Global\CPUZ140" -> L"\Device\cpuz140" ... --- snip ---
$ sha1sum cpu-z_1.77-en.zip 34de55aef583f43576dbb097ad8d486598ac0adb cpu-z_1.77-en.zip
$ du -sh cpu-z_1.77-en.zip 2.5M cpu-z_1.77-en.zip
$ wine --version wine-2.12
Regards
*** This bug has been marked as a duplicate of bug 38836 ***
https://bugs.winehq.org/show_bug.cgi?id=41114
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=41114
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.cpuid.com/downlo |https://web.archive.org/web |ads/cpu-z/cpu-z_1.77-en.zip |/20161114150711/http://down | |load.cpuid.com/cpu-z/cpu-z_ | |1.77-en.zip Component|-unknown |programs