https://bugs.winehq.org/show_bug.cgi?id=45167
Bug ID: 45167 Summary: Acronis Disk Director 12 installer fails: ITERATE_Actions Execution halted, action L"_USRCUSTACT_MsiFltSrvInstall_fltsrv_component" returned 1603 (setupapi lasterror leakage) Product: Wine Version: 3.7 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: setupapi Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
found while re-testing bug 40285
--- snip --- $ WINEDEBUG=+seh,+relay,+msi,+setupapi wine ./ADD12_trial_en-US.exe >>log.txt 2>&1 ... 0009:trace:msi:ACTION_PerformAction Performing action (L"_USRCUSTACT_MsiFltSrvInstall_fltsrv_component") ... 0009:trace:msi:ACTION_CustomAction Handling custom action L"_USRCUSTACT_MsiFltSrvInstall_fltsrv_component" (c01 L"_07ACC498A1CC6CE24B33317680A42CA8" L"MsiFltSrvInstall") ... 0009:trace:msi:HANDLE_CustomType1 Calling function L"MsiFltSrvInstall" from L"C:\users\focht\Temp\msi2409.tmp" ... 00d1:Call KERNEL32.CreateProcessW(009dfc24 L"C:\windows\system32\msiexec.exe",009df9a4 L"C:\windows\system32\msiexec.exe -Embedding {A121B25A-1BB4-4E7E-8C27-789D2A9666D5}",00000000,00000000,00000000,00000000,00000000,00000000,009dfe2c,009dfe70) ret=7e91e77d ... 00d3:Ret PE DLL (proc=0x10003420,module=0x10000000 L"msi2409.tmp",reason=PROCESS_ATTACH,res=(nil)) retval=1 00d3:Ret KERNEL32.LoadLibraryW() retval=10000000 ret=7e91e173 00d3:Call KERNEL32.GetProcAddress(10000000,0015be58 "MsiFltSrvInstall") ret=7e91e1f0 00d3:Ret KERNEL32.GetProcAddress() retval=100022b0 ret=7e91e1f0 ... 00d3:trace:msi:__wine_msi_call_dll_function calling "MsiFltSrvInstall" ... 00d5:Call KERNEL32.CreateFileW(00168190 L"\\?\C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.sys",c0000000,00000000,00000000,00000002,00000080,00000000) ret=10059a51 00d5:Ret KERNEL32.CreateFileW() retval=00000074 ret=10059a51 ... 00d5:Call msi.MsiRecordSetStringW(00000002,00000001,001646f0 L"MSI_TRACE(fltsrv): MsiFltSrvInstall: build number 2299") ret=10024c68 ... 00d5:Call KERNEL32.CreateFileW(00168480 L"\\?\C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.inf",c0000000,00000000,00000000,00000002,00000080,00000000) ret=10059a51 00d5:Ret KERNEL32.CreateFileW() retval=0000007c ret=10059a51 ... 00d5:Call setupapi.SetupOpenInfFileW(001680c0 L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.inf",00000000,00000002,00000000) ret=1001af9e ... 00d5:trace:setupapi:SetupOpenInfFileW L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.inf" -> 0x168158 00d5:Ret setupapi.SetupOpenInfFileW() retval=00168158 ret=1001af9e ... 00d5:Call msi.MsiRecordSetStringW(00000002,00000001,00168440 L"MSI_TRACE(fltsrv): defaultInstallSection=DefaultInstall") ret=10024c68 ... 00d5:Call setupapi.SetupFindFirstLineW(001681a0,001648a8 L"DefaultInstall",001638f0 L"CopyFiles",0045fb20) ret=1001affd 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"CopyFiles"): returning 0 00d5:Ret setupapi.SetupFindFirstLineW() retval=00000001 ret=1001affd 00d5:Call setupapi.SetupGetFieldCount(0045fb20) ret=10018f90 00d5:Ret setupapi.SetupGetFieldCount() retval=00000001 ret=10018f90 00d5:Call setupapi.SetupGetStringFieldW(0045fb20,00000001,0016c910,00001000,00000000) ret=10018fc2 00d5:trace:setupapi:SetupGetStringFieldW context 0x1681a0/0x1681a0/1/0 index 1 returning L"FltSrvDrivers" 00d5:Ret setupapi.SetupGetStringFieldW() retval=00000001 ret=10018fc2 ... 00d5:Call setupapi.SetupQueueCopySectionW(00164738,0016c210 L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\",001681a0,00000000,00168088 L"FltSrvDrivers",00000100) ret=1001b30d 00d5:trace:setupapi:SetupQueueCopySectionW hinf=0x1681a0/(nil) section=L"FltSrvDrivers" root=L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\" 00d5:trace:setupapi:SetupFindFirstLineW (0x1681a0,L"FltSrvDrivers",(null)): returning 5/0 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DestinationDirs",L"FltSrvDrivers"): returning 0 ... 00d5:trace:setupapi:SetupGetStringFieldW context 0x1681a0/0x1681a0/7/0 index 1 returning L"Acronis Storage Filter Management Driver Installation Disk" 00d5:trace:setupapi:SetupQueueCopyIndirectW root=L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\" path=(null) file=L"fltsrv.x86.sys" -> dir=L"C:\windows\system32\drivers" file=L"fltsrv.sys" descr=L"Acronis Storage Filter Management Driver Installation Disk" tag=(null) ... 00d5:Ret setupapi.SetupQueueCopySectionW() retval=00000001 ret=1001b30d ... 00d5:Call setupapi.SetupFindNextMatchLineW(0045fb20,001638f0 L"CopyFiles",0045fb20) ret=1001b061 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"CopyFiles"): not found 00d5:Ret setupapi.SetupFindNextMatchLineW() retval=00000000 ret=1001b061 00d5:Call KERNEL32.GetLastError() ret=1001b06b 00d5:Ret KERNEL32.GetLastError() retval=e0000102 ret=1001b06b ... 00d5:Call setupapi.SetupDefaultQueueCallbackW(0016bdd0,0000000b,0045fa80,00000000) ret=10019646 00d5:trace:setupapi:SetupDefaultQueueCallbackW start copy L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.sys" -> L"C:\windows\system32\drivers\fltsrv.sys" 00d5:Ret setupapi.SetupDefaultQueueCallbackW() retval=00000001 ret=10019646 00d5:trace:setupapi:SetupCommitFileQueueW copying file L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.sys" -> L"C:\windows\system32\drivers\fltsrv.sys" ... 00d5:trace:setupapi:do_file_copyW copy L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.sys" to L"C:\windows\system32\drivers\fltsrv.sys" style 0x100 00d5:err:setupapi:do_file_copyW Unsupported style(s) 0x100 00d5:Call KERNEL32.CopyFileW(0016b270 L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.sys",0016c210 L"C:\windows\system32\drivers\fltsrv.sys",00000000) ret=f7ac5e92 00d5:Ret KERNEL32.CopyFileW() retval=00000001 ret=f7ac5e92 00d5:trace:setupapi:do_file_copyW Did copy... rc was 1 00d5:Call setupapi.SetupDefaultQueueCallbackW(0016bdd0,0000000c,0045fa80,00000000) ret=10019646 00d5:trace:setupapi:SetupDefaultQueueCallbackW end copy L"C:\users\focht\Temp\AE6D8134-43FB-4C07-B3A1-87DA0CC08234\fltsrv.x86.sys" -> L"C:\windows\system32\drivers\fltsrv.sys" 00d5:Ret setupapi.SetupDefaultQueueCallbackW() retval=00000000 ret=10019646 00d5:Call setupapi.SetupDefaultQueueCallbackW(0016bdd0,00000004,00000000,00000000) ret=10019646 00d5:trace:setupapi:SetupDefaultQueueCallbackW end subqueue 0 00d5:Ret setupapi.SetupDefaultQueueCallbackW() retval=00000000 ret=10019646 00d5:Call setupapi.SetupDefaultQueueCallbackW(0016bdd0,00000002,00000001,00000000) ret=10019646 00d5:trace:setupapi:SetupDefaultQueueCallbackW end queue 00d5:Ret setupapi.SetupDefaultQueueCallbackW() retval=00000000 ret=10019646 ... 00d5:Ret setupapi.SetupCommitFileQueueW() retval=00000001 ret=100195ca 00d5:Call setupapi.SetupPromptReboot(00164738,00000000,00000001) ret=100195ea 00d5:fixme:setupapi:SetupPromptReboot 0x164738, (nil), 1: stub 00d5:Ret setupapi.SetupPromptReboot() retval=00000000 ret=100195ea ... 00d5:Ret setupapi.SetupCloseFileQueue() retval=00000001 ret=100194ff 00d5:Call setupapi.SetupInstallFromInfSectionW(00000000,001681a0,00168858 L"DefaultInstall",0000000e,80000002,00000000,00000000,00000000,00000000,00000000,00000000) ret=1001b28c 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"WinePreInstall"): not found 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"UpdateInis"): not found 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"UpdateIniFields"): not found 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"Ini2Reg"): not found 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"DelReg"): not found 00d5:trace:setupapi:SetupFindNextMatchLineW (0x1681a0,L"DefaultInstall",L"AddReg"): not found 00d5:Ret setupapi.SetupInstallFromInfSectionW() retval=00000001 ret=1001b28c 00d5:Call KERNEL32.GetLastError() ret=1001b29a 00d5:Ret KERNEL32.GetLastError() retval=e0000102 ret=1001b29a 00d5:Call KERNEL32.GetLastError() ret=10033590 00d5:Ret KERNEL32.GetLastError() retval=e0000102 ret=10033590 00d5:Call KERNEL32.GetLastError() ret=10033590 00d5:Ret KERNEL32.GetLastError() retval=e0000102 ret=10033590 00d5:Call KERNEL32.GetLastError() ret=10033590 00d5:Ret KERNEL32.GetLastError() retval=e0000102 ret=10033590 00d5:Call KERNEL32.GetLastError() ret=10033590 00d5:Ret KERNEL32.GetLastError() retval=e0000102 ret=10033590 ... 00d5:Call msi.MsiRecordSetStringW(00000002,00000001,00168440 L"MSI_TRACE(fltsrv): ProcessDirectivesFromSection failed: 3758096642") ret=10024c68 ... 00d5:Call msi.MsiRecordSetStringW(00000002,00000001,00168440 L"MSI_TRACE(fltsrv): Failed to install: status 3758096642.") ret=10024c68 ... --- snip ---
It seems there is some lasterror leaking in Wine's setupapi.
0xe0000102 -> ERROR_LINE_NOT_FOUND
This error is set due to previous parsing calls (ok) but never reset throughout various setupapi call sequences (external and internal). The app installer checks the lasterror even on API return success and reports failure.
I've reset the lasterror in 'SetupInstallFromInfSectionW()' on success to zero since the leaf function calls 'SetupFindNextMatchLineW()' will set it -> leakage. It helps the installer to get further and actually install the (kernel) filter service - only to run into next bug.
$ sha1sum ADD12_trial_en-US.exe 9c087d66c4e7e4ef22b30721d9ab519753a394b1 ADD12_trial_en-US.exe
$ du -sh ADD12_trial_en-US.exe 290M ADD12_trial_en-US.exe
$ wine --version wine-3.7-136-g8f46ac233e
Regards