http://bugs.winehq.org/show_bug.cgi?id=16882
Summary: WMI core 1.5 installation hangs (needed for .NET 3.0 installer, WCF part), SECURITY_SERVICE_RID missing from service token group Product: Wine Version: 1.1.12 Platform: Other URL: http://www.microsoft.com/downloads/details.aspx?familyid =AFE41F46-E213-4CBF-9C5B-FBF236E0E875 OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: advapi32 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
after getting past bug 16879 one encounters this one.
---- Prerequisite:
1. clean WINEPREFIX 2. sh winetricks -q dotnet20 3. download .NET 3.0 Framework installer from: http://download.microsoft.com /download/4/d/a/4da3a5fa-ee6a-42b8-8bfa-ea5c4a458a7d/dotnetfx3setup.exe (sha1sum: a566bcd2ffffc3842a95adc57f7df3f8cd11577f) 4. export _SFX_CAB_SHUTDOWN_REQUEST=1 (workaround, see bug 9158) 5. wine ./dotnetfx3setup.exe
It might take a while until all required packages are downloaded using BITS.
Note: If you need to redo steps, backup the directory "dotnetfx304506.30" from "c:\windows\temp" to a different location, remove ~/.wine, copy "dotnetfx304506.30" again to "c:\windows\temp" to prevent BITS from downloading over and over again. ----
"c:\windows\temp\dd_dotnetfx3error.txt":
--- snip --- [01/11/09,12:50:20] Windows Communication Foundation: [2] Error: Installation failed for component Windows Communication Foundation. MSI returned error code 1603 [01/11/09,12:50:31] WapUI: [2] DepCheck indicates Windows Communication Foundation is not installed. [01/11/09,12:50:31] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.0 was not attempted to be installed. --- snip ---
"c:\windows\temp\dd_wcf_retMSI597F.txt":
--- snip --- 1: C:\windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe /r /x /y /v 2: 1: ERROR: Process returned non-0 value! CMDLINE: C:\windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe /r /x /y /v 2: 1: Failed 2: --- snip ---
and "c:\windows\temp\dd_wcf_retCA69A1.txt":
--- snip --- === Verbose logging started: 1/11/2009 12:50:17 Calling process: C:\windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe === ServiceModelReg [12:50:18:302]: Warning: Could not detect IIS installation or IIS is disabled, skipping the Web Host Script Mappings component since it depends upon IIS to function properly. If you believe this message is an error, check your IIS installation to make sure it is installed properly. ServiceModelReg [12:50:18:329]: Information: The ServiceModelReg tool will take the following actions: Reinstalling configuration section system.serviceModel to C:\windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config. Reinstalling configuration section system.runtime.serialization to C:\windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config. Reinstalling configuration section system.serviceModel.activation to C:\windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config. Adding configuration entry for BuildProvider: System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Reinstalling compilation assembly node to System.Web section group: System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL Reinstalling compilation assembly node to System.Web section group: System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitectur... ServiceModelReg [12:50:18:358]: Uninstalling: Machine.config Section Groups and Handlers ServiceModelReg [12:50:18:366]: Warning: Configuration section system.serviceModel does not exist in C:\windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config. ServiceModelReg [12:50:18:369]: Warning: Configuration section system.runtime.serialization does not exist in C:\windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config. ServiceModelReg [12:50:18:373]: Warning: Configuration section system.serviceModel.activation does not exist in C:\windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config. ServiceModelReg [12:50:18:374]: Installing: Machine.config Section Groups and Handlers ServiceModelReg [12:50:18:893]: Uninstalling: System.Web Build Provider ServiceModelReg [12:50:19:095]: Warning: A configuration entry for BuildProvider System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 does not exist. ServiceModelReg [12:50:19:096]: Installing: System.Web Build Provider ServiceModelReg [12:50:19:138]: Uninstalling: System.Web Compilation Assemblies ServiceModelReg [12:50:19:153]: Warning: All compilation assembly nodes do not exist in System.Web section group. ServiceModelReg [12:50:19:154]: Installing: System.Web Compilation Assemblies ServiceModelReg [12:50:19:246]: Uninstalling: HTTP Handlers ServiceModelReg [12:50:19:260]: Warning: HttpHandlers node *.svc does not exist in System.Web section group. ServiceModelReg [12:50:19:261]: Installing: HTTP Handlers ServiceModelReg [12:50:19:322]: Uninstalling: HTTP Modules ServiceModelReg [12:50:19:333]: Warning: HttpModules node ServiceModel does not exist in System.Web section group. ServiceModelReg [12:50:19:334]: Installing: HTTP Modules ServiceModelReg [12:50:19:365]: Repairing: WMI Classes ServiceModelReg [12:50:19:396]: Warning: Failure executing "C:\windows\system32\wbem\mofcomp.exe" with parameters ""C:\windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModel.mof"": System.IO.FileNotFoundException: Could not load file or assembly 'C:\windows\system32\wbem\mofcomp.exe' or one of its dependencies. Exception from HRESULT: 0x80070002 File name: 'C:\windows\system32\wbem\mofcomp.exe' at System.ServiceModel.Install.InstallHelper.ExecuteWaitHelper(String program, String parameters) at System.ServiceModel.Install.InstallHelper.ExecuteWait(String program, String parameters, Int32[] allowedExitCodes) at System.ServiceModel.Install.WmiInstallComponent.OnInstall(OutputLevel outputLevel) ServiceModelReg [12:50:19:516]: System.InvalidCastException: Retrieving the COM class factory for component with CLSID {4590F811-1D3A-11D0-891F-00AA004B2E24} failed due to the following error: 80004002. at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at System.Management.ManagementScope.Connect() at System.ServiceModel.Install.WmiInstallComponent.get_IsInstalled() at System.ServiceModel.Install.WmiInstallComponent.ApplyNamespaceDacl(OutputLevel outputLevel) at System.ServiceModel.Install.WmiInstallComponent.OnInstall(OutputLevel outputLevel) at System.ServiceModel.Install.WmiInstallComponent.Reinstall(OutputLevel outputLevel) at Microsoft.Tools.ServiceModel.ServiceModelReg.PerformAction(ActionItem actionItem, Nullable`1 confirmUninstall) at Microsoft.Tools.ServiceModel.ServiceModelReg.Run(String[] args) at Microsoft.Tools.ServiceModel.ServiceModelReg.TryRun(String[] args) === Verbose logging stopped: 1/11/2009 12:50:19 === --- snip ---
Oh joy ... WMI. Providing fake mofcomp.exe (returning success) is not enough, WCF installer will try *use* WMI hence there needs to be some working infrastructure:
--- snip --- ServiceModelReg [19:37:29:832]: Starting tool 'C:\windows\system32\wbem\mofcomp.exe' with parameters '"C:\windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModel.mof"'. ServiceModelReg [19:37:29:895]: ServiceModelReg [19:37:29:896]: ServiceModelReg [19:37:29:897]: Tool 'C:\windows\system32\wbem\mofcomp.exe' with parameters '"C:\windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModel.mof"' exited with code '0'. ServiceModelReg [19:37:29:955]: System.InvalidCastException: Retrieving the COM class factory for component with CLSID {4590F811-1D3A-11D0-891F-00AA004B2E24} failed due to the following error: 80004002. at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at System.Management.ManagementScope.Connect() at System.ServiceModel.Install.WmiInstallComponent.get_IsInstalled() at System.ServiceModel.Install.WmiInstallComponent.ApplyNamespaceDacl(OutputLevel outputLevel) at System.ServiceModel.Install.WmiInstallComponent.OnInstall(OutputLevel outputLevel) at System.ServiceModel.Install.WmiInstallComponent.Reinstall(OutputLevel outputLevel) at Microsoft.Tools.ServiceModel.ServiceModelReg.PerformAction(ActionItem actionItem, Nullable`1 confirmUninstall) at Microsoft.Tools.ServiceModel.ServiceModelReg.Run(String[] args) at Microsoft.Tools.ServiceModel.ServiceModelReg.TryRun(String[] args) === Verbose logging stopped: 1/8/2009 19:37:29 === --- snip ---
This is a big blocker and getting WMI to work with Wine is imperative for .NET 3.0 and higher. Of course this also useful for older .NET Frameworks
Roll-back, prepare clean WINEPREFIX again;-)
We need to install native WMI core 1.5 from: http://www.microsoft.com/downloads/details.aspx?familyid=AFE41F46-E213-4CBF-...
Download wmicore http://download.microsoft.com/download/platformsdk/wmicore/1.5/W9XNT4/EN-US/... (sha1sum: f7a36668eb6c82a28393637ffdf0ec6e8adfa6a1)
Make sure you set winver to NT 4.0 (don't forget to reset to default) and execute the installer (I already have my own winetricks step for this):
--- snip --- wine wmicore.exe --- snip ---
The installer will then hang at some point "Configuring repository". With winedbg one can see following processes:
--- snip --- Wine-dbg>info process pid threads parent executable (all id:s are in hex) 0000000c 5 0000000a 'services.exe' 0000000f 1 0000000a 'explorer.exe' 0000001b 4 0000000c 'winedevice.exe' 00000025 1 00000000 'wmicore.exe' 00000027 2 00000025 'GLBbab.tmp' 00000022 4 0000000c 'WinMgmt.exe' --- snip ---
The problem is "WinMgmt.exe" which ought to be a service but due to Wine insufficiency the service thinks it's a normal process not showing usual service process behaviour as registering control handler and the like.
If you do 'wineserver -k' and try to start anything with Wine nothing will happen until wineboot times out...
As quickfix, start regedit (wait until wineboot timeout) and set service start type key for "WinMgmt" to manual start, e.g. "2" -> "3". Also a kernel driver (service) that is installed with WMI "smbios" fails to load but this currently harmless.
If we look now in "c:\windows\system32\WBEM" we see the whole stuff installed. The logs in "logs" subdirs are not revealing much so we have to increase the log level:
--- snip --- [HKEY_LOCAL_MACHINE\Software\Microsoft\WBEM\CIMOM] "Logging"="1" "Logging Directory"="C:\windows\system32\WBEM\Logs" --- snip ---
LogLevel is 0 to turn off logging, a 1 to turn on logging, and a 2 for verbose logging.
After that, we manually try to start the service:
--- snip --- $ wine net start winmgmt err:winedevice:ServiceMain driver L"smbios" failed to load The Windows Management Instrumentation service is starting. fixme:ole:CoInitializeSecurity ((nil),-1,(nil),(nil),2,2,(nil),32,(nil)) - stub! fixme:ole:CoInitializeSecurity ((nil),-1,(nil),(nil),1,3,(nil),0,(nil)) - stub! fixme:advapi:RegisterEventSourceW (L"",L"WinMgmt"): stub wine: Call from 0x7b844f54 to unimplemented function ole32.dll.CoSwitchCallContext, aborting err:rpc:I_RpcReceive we got fault packet with status 0x80000100 fixme:ole:CoCreateInstance no instance created for interface {00000000-0000-0000-c000-000000000046} of class {8bc3f05e-d86b-11d0-a075-00c04fb68820}, hres is 0xc0000005 --- snip ---
This is bug 7187 After fixing this problem, we repeat the whole stuff again to get this in logs:
--- snip --- (Sun Jan 11 13:41:41 2009) : Starting WinMgmt, ProcID = 26, CmdLine = , User = focht(Sun Jan 11 13:41:41 2009) : WinMgmt bIsService = 0, return code from function determining if service = 0(Sun Jan 11 13:41:41 2009) : WinMgmt gbRunAsApp = 1(Sun Jan 11 13:41:41 2009) : Starting Initialize, ID = 26(Sun Jan 11 13:41:41 2009) : Registered class factory with flags: 0x15 (Sun Jan 11 13:41:41 2009) : RegOpenKey returned 0x2 while trying to open the transports node. Using default transports!(Sun Jan 11 13:41:41 2009) : Initialize complete(Sun Jan 11 13:41:41 2009) : WindowProc got hWnd=20026, message=24, wParam=0, lParam=33f814(Sun Jan 11 13:41:41 2009) : WindowProc got hWnd=20026, message=81, wParam=0, lParam=33fce8(Sun Jan 11 13:41:41 2009) : WindowProc got hWnd=20026, message=83, wParam=0, lParam=33f974(Sun Jan 11 13:41:41 2009) : WindowProc got hWnd=20026, message=1, wParam=0, lParam=33fce8(Sun Jan 11 13:41:41 2009) : Inside the waiting function --- snip ---
"WinMgmt bIsService = 0" is the culprit.
The process retrieves token information and checks if process token groups contain "SECURITY_INTERACTIVE_RID" (-> normal process) or "SECURITY_SERVICE_RID" (service process).
I think it's actually services.exe that adds the SECURITY_SERVICE_RID sid to the newly created service process (token groups).
This requires some infrastructure, including wineserver. I already quick-hacked a path to verify this and it works as expected, letting the service successfully start ;-)
Regards