[Bug 34207] Microsoft .NET Framework 2.0 service pack installers fail 'NGEN service version check' custom action (service not stopped before binary update)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Nov 29 13:48:54 CST 2014


https://bugs.winehq.org/show_bug.cgi?id=34207

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net
            Summary|dotnet20sp1 installer fails |Microsoft .NET Framework
                   |most of the time            |2.0 service pack installers
                   |                            |fail 'NGEN service version
                   |                            |check' custom action
                   |                            |(service not stopped before
                   |                            |binary update)
           Severity|minor                       |normal

--- Comment #8 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming, still present.

The NGEN service is automatically started by installer.
Usually this shouldn't be necessary since it's an auto-start type service.
It's likely to ensure the availability in case a user forcibly stopped it or
changed it to manual start.

--- snip ---
...
[11/29/14,19:39:07] Setup.exe: ========== Logging started ==========
[11/29/14,19:39:07] Setup.exe: =====================================
[11/29/14,19:39:07] Setup.exe: Command line:
c:\fa68242e9a4ae9784efa9d\setup.exe  /q
[11/29/14,19:39:07] Setup.exe: GetGlobalCustomProperty - Property:
{481CEF9F-033A-11D3-ACE2-00C04F8EEBA1} - PropertyName: Disable Error Logging -
Value: 0
[11/29/14,19:39:07] Setup.exe: ISetupManager::LoadSetupLog() completed
[11/29/14,19:39:07] UTILS::RunNGENAction: Started
[11/29/14,19:39:07] UTILS::RunNGENAction: starting
"C:\windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe queue pause"
[11/29/14,19:39:07] UTILS::RunNGENAction: ngen.exe returned 0
--- snip ---

--- snip ---
...
0024:Call KERNEL32.CreateProcessW(00000000,0033e688
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe queue
pause",00000000,00000000,00000000,00000000,00000000,0033ef1c
L"C:\\windows",0033e214,0033e258) ret=3ab13b96
...
0028:Starting process
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe"
(entryproc=0x411ba1) 
...
0028:Call advapi32.OpenServiceW(001334a8,00138a38
L"clr_optimization_v2.0.50727_32",000f01ff) ret=64067c07 
...
0028:Call advapi32.StartServiceW(00138de0,00000001,0033f2dc) ret=64067d01 
...
--- snip ---

This prevents some NGEN service binaries from being updated in place.

--- snip ---
002d:trace:msi:ACTION_PerformAction Performing action (L"InstallFiles") 
...
002d:Call version.GetFileVersionInfoW(02306b78
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe",00000000,000007a4,022d2f38)
ret=7dab24ea 
...
002d:trace:msi:calculate_install_state new L"2.0.50727.1433" old 2.0.50727.42 
...
002d:Call version.GetFileVersionInfoW(02306c00
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe",00000000,00000784,022d2f38)
ret=7dab24ea 
...
002d:trace:msi:calculate_install_state new L"2.0.50727.1433" old 2.0.50727.42
...
002d:Call version.GetFileVersionInfoSizeW(02306c90
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll",0033cffc)
ret=7dab2495 
...
002d:trace:msi:calculate_install_state new L"2.0.50727.1433" old 2.0.50727.42 
...
002d:trace:msi:cabinet_copy_file extracting
L"FL_ngen_exe_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" ->
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe"
002d:Call KERNEL32.CreateFileW(022ccfa8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7daf9e7e
002d:Ret  KERNEL32.CreateFileW() retval=000001ac ret=7daf9e7e
...
002d:trace:msi:cabinet_copy_file extracting
L"FL_mscorsvw_exe_93402_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" ->
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe"
002d:Call KERNEL32.CreateFileW(022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7daf9e7e
002d:Ret  KERNEL32.CreateFileW() retval=ffffffff ret=7daf9e7e
002d:Call KERNEL32.GetFileAttributesW(022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe")
ret=7daf9ea8
002d:Ret  KERNEL32.GetFileAttributesW() retval=00000020 ret=7daf9ea8
002d:trace:msi:cabinet_copy_file file in use, scheduling rename operation 
...
002d:Call KERNEL32.CreateFileW(022cd0b8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\msi4f1b.tmp",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7dafa153
002d:Ret  KERNEL32.CreateFileW() retval=000001ac ret=7dafa153
002d:Call KERNEL32.MoveFileExW(022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe",00000000,00000004)
ret=7dafa17a
002d:Ret  KERNEL32.MoveFileExW() retval=00000001 ret=7dafa17a
002d:Call KERNEL32.MoveFileExW(022cd0b8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\msi4f1b.tmp",022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe",00000004)
ret=7dafa19b
002d:Ret  KERNEL32.MoveFileExW() retval=00000001 ret=7dafa19b
...
002d:trace:msi:cabinet_copy_file extracting
L"FL_mscorsvc_dll_93043_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" ->
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll"
002d:Call KERNEL32.CreateFileW(022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7daf9e7e
002d:Ret  KERNEL32.CreateFileW() retval=ffffffff ret=7daf9e7e
002d:Call KERNEL32.GetFileAttributesW(022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll")
ret=7daf9ea8
002d:Ret  KERNEL32.GetFileAttributesW() retval=00000020 ret=7daf9ea8
002d:trace:msi:cabinet_copy_file file in use, scheduling rename operation
...
002d:Call KERNEL32.GetTempFileNameW(022cd038
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727",7db5e58e
L"msi",00000000,022cd0b8) ret=7dafa0ff
002d:Ret  KERNEL32.GetTempFileNameW() retval=00004f1e ret=7dafa0ff
...
002d:Call KERNEL32.CreateFileW(022cd0b8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\msi4f1e.tmp",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7dafa153
002d:Ret  KERNEL32.CreateFileW() retval=000001ac ret=7dafa153
002d:Call KERNEL32.MoveFileExW(022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll",00000000,00000004)
ret=7dafa17a
002d:Ret  KERNEL32.MoveFileExW() retval=00000001 ret=7dafa17a
002d:Call KERNEL32.MoveFileExW(022cd0b8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\msi4f1e.tmp",022ccfb8
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll",00000004)
ret=7dafa19b
002d:Ret  KERNEL32.MoveFileExW() retval=00000001 ret=7dafa19b 
...
--- snip ---

The installer schedules pending rename actions for the binaries that are
locked.

The NGEN service version check fails since some binaries are not up-to-date yet
(pending renames).

--- snip ---
...
0042:Call msi.MsiDoActionW(00000004,00bc3500
L"DD_CA_NgenServiceVersionCheck_X86.3643236F_FC70_11D3_A536_0090278A1BB8")
ret=00bd0880
...
0042:trace:msi:ACTION_CustomAction Handling custom action
L"DD_CA_NgenServiceVersionCheck_X86.3643236F_FC70_11D3_A536_0090278A1BB8" (401
L"BIN_File_237924_X86" L"NgenServiceVersionCheck")
...
0042:trace:msi:msi_set_property 0x18f008 L"CustomActionData"
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll;C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe;C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe;"
-1 
...
0042:trace:msi:HANDLE_CustomType1 Calling function L"NgenServiceVersionCheck"
from L"C:\\users\\focht\\Temp\\msi37d7.tmp" 
...
0043:Starting thread proc 0x7dad5c92 (arg=0x22dd45c)
0043:trace:msi:DllThread custom action (43) started
...
0043:trace:msi:ACTION_CallDllFunction calling L"NgenServiceVersionCheck" 
...
0043:Call msi.MsiRecordSetStringW(00000001,00000000,00bfa3c8 L"11/29/14
19:02:51 DDSet_Status: File Version for [2] is [3]") ret=00bd057e 
...
0043:Call msi.MsiGetFileVersionW(02523a38
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll",02523ba0,02c6d748,02523da8,02c6d748)
ret=00bd15a1 
...
0043:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"1: 0 2:
C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll 3: 2.0.50727.42
4:  5:  6:  7:  8:  9:  10:  " 
...
0043:Call msi.MsiRecordSetStringW(00000001,00000000,00bfa3c8 L"11/29/14
19:02:51 DDSet_Status: File Version for [2] is [3]") ret=00bd057e 
...
0043:Call msi.MsiGetFileVersionW(02523aae
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe",02523ba0,02c6d748,02523da8,02c6d748)
ret=00bd15a1 
...
0043:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"1: 0 2:
C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe 3: 2.0.50727.42
4:  5:  6:  7:  8:  9:  10:  " 
...
0043:Call msi.MsiRecordSetStringW(00000001,00000000,00bfa3c8 L"11/29/14
19:02:51 DDSet_Status: File Version for [2] is [3]") ret=00bd057e 
...
0043:Call msi.MsiGetFileVersionW(02523b24
L"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe",02523ba0,02c6d748,02523da8,02c6d748)
ret=00bd15a1 
...
0043:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"1: 0 2:
C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe 3: 2.0.50727.1433
4:  5:  6:  7:  8:  9:  10:  " 
...
0043:Call msi.MsiRecordSetStringW(00000001,00000000,00bfa3c8 L"11/29/14
19:02:51 DDSet_Error: File Versions do not match: [2] and [3]") ret=00bd057e 
...
0043:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"1: 0 2:
2.0.50727.1433 3: 2.0.50727.42 4:  5:  6:  7:  8:  9:  10:  " 
...
0043:trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7b83b1d3
ip=7b83b1d3 tid=0043
0043:trace:seh:raise_exception  info[0]=19930520
0043:trace:seh:raise_exception  info[1]=02c6dfa0
0043:trace:seh:raise_exception  info[2]=00bf5b4c
0043:trace:seh:raise_exception  eax=7b826e65 ebx=7b8be000 ecx=19930520
edx=02c6d684 esi=02c6d728 edi=02c6d6f0
0043:trace:seh:raise_exception  ebp=02c6d6c8 esp=02c6d664 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00000283
0043:trace:seh:call_stack_handlers calling handler at 0xbf4eb8 code=e06d7363
flags=1 
...
0043:Call msi.MsiRecordSetStringW(00000001,00000000,00bfa3c8 L"11/29/14
19:02:51 DDSet_Error: NgenServiceVersionCheck Failed") ret=00bd04f0 
...
0043:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"1: 0 2:
2.0.50727.1433 3: 2.0.50727.42 4:  5:  6:  7:  8:  9:  10:  " 
...
0043:Call msi.MsiRecordSetStringW(00000001,00000000,00bfa3c8 L"11/29/14
19:02:51 DDSet_Exit: NgenServiceVersionCheck ended with return value [2]")
ret=00bd0639 
...
0043:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"1: 0 2:
1603 3: 2.0.50727.42 4:  5:  6:  7:  8:  9:  10:  " 
...
0043:trace:msi:DllThread custom action (43) returned 1603 
...
002d:err:msi:ITERATE_Actions Execution halted, action
L"DD_CA_ScheduleNgenServiceVersionCheck_X86.3643236F_FC70_11D3_A536_0090278A1BB8"
returned 1603 
...
0024:Call oleaut32.SysAllocString(009b43e0 L" GFN_MID Framework 2.0a Setup,
RENAME, mscorsvw.exe, mscorsvw.exe,
C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\msicab3.tmp,   (
2.0.50727.1433 (REDBITS.050727-1400) ) ,   ( Wed Oct 24 01:47:40 2007 )  ,
C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvw.exe,   (
2.0.50727.42 (RTM.0507"...) ret=3a0c896c 
...
0024:Call oleaut32.SysAllocString(009b43e0 L" GFN_MID Framework 2.0a Setup,
RENAME, mscorsvc.dll, mscorsvc.dll,
C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\msicab6.tmp,   (
2.0.50727.1433 (REDBITS.050727-1400) ) ,   ( Wed Oct 24 01:47:40 2007 )  ,
C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\mscorsvc.dll,   (
2.0.50727.42 (RTM.0507"...) ret=3a0c896c
0024:Ret  oleaut32.SysAllocString() retval=022b5c9c ret=3a0c896c
--- snip --- 

I found a suspicious looking 'StopServices' action which is executed some time
before the 'InstallFiles':

--- snip ---
0024:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"Action
start 19:39:21: StopServices." 
...
0024:trace:msi:ITERATE_StopService component not scheduled for removal
L"ASPNET_ISAPI_DLL_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" 
...
0024:trace:msi:ITERATE_StopService component not scheduled for removal
L"ASPNET_STATE_EXE_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" 
...
0024:trace:msi:ITERATE_StopService component not scheduled for removal
L"MSCORSVW_EXE_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" 
...
0024:trace:msi:MSI_ProcessMessage (nil) 0x3a0b01b5 0x39e64ac4 7fdf 10 L"Action
ended 19:39:21: StopServices. Return value 0." 
...
0024:trace:msi:ACTION_HandleStandardAction scheduling rollback action
0024:trace:msi:msi_schedule_action Scheduling action L"StartServices" in script
2 
--- snip --- 

Source:
http://source.winehq.org/git/wine.git/blob/609de1a80a6ea99523737c4ada266ddc069fb2af:/dlls/msi/action.c#l6156

--- snip ---
6156 static UINT ITERATE_StopService( MSIRECORD *rec, LPVOID param )
6157 {
...
6175     comp->Action = msi_get_component_action( package, comp );
6176     if (comp->Action != INSTALLSTATE_ABSENT)
6177     {
6178         TRACE("component not scheduled for removal %s\n",
debugstr_w(component));
6179         return ERROR_SUCCESS;
6180     }
6181
6182     scm = OpenSCManagerW( NULL, NULL, SC_MANAGER_CONNECT );
...
--- snip ---

Not sure where the 'INSTALLSTATE_ABSENT' condition stems from.
The service (component) is not to be removed but updated.
A service stop is a requirement to allow updating the binaries in place.

Letting the NGEN service stop makes .NET service pack installers to work (no
'winetricks' needed).

$ sha1sum NetFx20SP1_x86.exe 
eef5a36924cdf0c02598ccf96aa4f60887a49840  NetFx20SP1_x86.exe

$ du -sh NetFx20SP1_x86.exe 
24M    NetFx20SP1_x86.exe

$ wine --version
wine-1.7.32

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