http://bugs.winehq.org/show_bug.cgi?id=33661
Bug #: 33661 Summary: Microsoft SQL Server Management Studio Express 2008 R2 installer fails Product: Wine Version: 1.5.31 Platform: x86 URL: http://www.microsoft.com/en-us/download/details.aspx?i d=7593 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: djelinski1@gmail.com Classification: Unclassified
Created attachment 44557 --> http://bugs.winehq.org/attachment.cgi?id=44557 console output
Continuation of bug 33115. Now the console log ends with: The following error occurred: The performance counter registry hive is corrupted. To continue, you must repair the performance counter registry hive. For more information, see http://support.microsoft.com/kb/300956.
Error result: -2067922940 Result facility code: 1214 Result error code: 4
Please review the summary.txt log for further details
To reproduce: Work around bug 33450: winetricks msxml3 winetricks dotnet35sp1 Work around bug 12501: winetricks mspatcha Work around bug 30681: extract System.Data.SqlXml.dll from dotnet20sp2 installer, overwrite the existing ones in Microsoft.NET/Framework/v2.0.50727 and assembly/GAC_MSIL Run installer: wine SQLManagementStudio_x86_ENU.exe /q /FEATURES=SSMS /ACTION=Install /IAcceptSQLServerLicenseTerms
http://bugs.winehq.org/show_bug.cgi?id=33661
Daniel Jelinski djelinski1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download, Installer
http://bugs.winehq.org/show_bug.cgi?id=33661
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
http://bugs.winehq.org/show_bug.cgi?id=33661
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Component|-unknown |advapi32 Summary|Microsoft SQL Server |Microsoft SQL Server |Management Studio Express |Management Studio Express |2008 R2 installer fails |2008 R2 installer fails | |(missing registry | |configuration data for the | |Windows Performance | |Library) Ever Confirmed|0 |1
--- Comment #1 from Anastasius Focht focht@gmx.net 2013-05-26 06:49:30 CDT --- Hello folks,
confirming.
Interestingly even for Windows there are numerous reports about this issue - although locale related (search for "Microsoft SQL 2008 Setup: Performance Counter Registry Hive consistency check failed").
The sub-installer tries to read the registry configuration data for the Windows Performance Library which is obviously missing in Wine.
Relevant part of trace log:
--- snip --- 002e:Call KERNEL32.CreateProcessW(00336150 L"C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\setup100.exe",0032c334 L""C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\setup100.exe" /q /FEATURES=SSMS /ACTION=Install /ACTION=Install /WORKFLOW=Install /TIMESTAMP=20130526_124202 /LOGMARKER= /MEDIASOURCE="C:\8f85d9cd0da97d9a01988db39973b870\\" /INSTALLMEDIAPATH="C:\8f85d9cd0da97d9"...,00000000,00000000,00000001,00000020,00000000,00000000,0032c2cc,0032c318) ret=010112cf ... 0054:Call KERNEL32.__wine_kernel_init() ret=7bc5444e 002e:Ret KERNEL32.CreateProcessW() retval=00000001 ret=010112cf ... 0054:Call advapi32.RegOpenKeyExW(80000002,0155146c L"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib",00000000,00020019,0033ef70) ret=0037a9a3 0054:Ret advapi32.RegOpenKeyExW() retval=00000000 ret=0037a9a3 ... 0054:Call advapi32.RegQueryValueExW(0000260c,01551220 L"Last Counter",00000000,0033efb8,00000000,0033efb4) ret=0037ac1e 0054:Ret advapi32.RegQueryValueExW() retval=00000002 ret=0037ac1e ... 0054:Call advapi32.RegQueryValueExW(0000260c,0155124c L"Last Help",00000000,0033efb8,00000000,0033efb4) ret=0037ac1e 0054:Ret advapi32.RegQueryValueExW() retval=00000002 ret=0037ac1e ... 0054:Call advapi32.RegOpenKeyExW(80000002,01551e0c L"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009",00000000,00020019,0033ef70) ret=0037a9a3 0054:Ret advapi32.RegOpenKeyExW() retval=00000002 ret=0037a9a3 ... 0054:Call advapi32.RegCloseKey(0000260c) ret=030e93ab 0054:Ret advapi32.RegCloseKey() retval=00000000 ret=030e93ab ... 0054:Call KERNEL32.WriteFile(00000010,00a9cf14,000000bb,0033f04c,00000000) ret=0037a89f The performance counter registry hive is corrupted. To continue, you must repair the performance counter registry hive. For more information, see http://support.microsoft.com/kb/300956. 0054:Ret KERNEL32.WriteFile() retval=00000001 ret=0037a89f --- snip ---
The sub-installer and some components are mixed/managed code. Relevant part extracted by using "ILSpy" tool:
--- snip --- ... private bool CheckPerfMonCounter() { string text = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib"; int major = Environment.get_OSVersion().get_Version().get_Major(); int lCID = CultureInfo.get_InstalledUICulture().get_LCID(); string text2; if (major >= 6 && (lCID == 1028 || lCID == 2052 || lCID == 1046)) { text2 = string.Format("{0,4}", lCID.ToString("X")).Replace(" ", "0"); } else { if (31748 == CultureInfo.get_InstalledUICulture().get_Parent().get_LCID()) { text2 = "004"; } else { text2 = string.Format("{0,3}", CultureInfo.get_InstalledUICulture().get_Parent().get_LCID().ToString("X")).Replace(" ", "0"); } } int num = -1; int num2 = -1; int num3 = -1; int num4 = -1; using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(text)) { if (registryKey == null) { bool result = false; return result; } num = Convert.ToInt32(registryKey.GetValue("Last Counter")); num2 = Convert.ToInt32(registryKey.GetValue("Last Help")); StringBuilder stringBuilder = new StringBuilder(text); stringBuilder.Append(Path.DirectorySeparatorChar); stringBuilder.Append(text2); using (RegistryKey registryKey2 = Registry.LocalMachine.OpenSubKey(stringBuilder.ToString())) { if (registryKey2 == null) { bool result = false; return result; } string[] array = (string[])registryKey2.GetValue("Counter"); string[] array2 = (string[])registryKey2.GetValue("Help"); int num5 = 2; if (array == null || array.Length <= 0) { bool result = false; return result; } if (string.IsNullOrEmpty(array[array.Length - 1])) { num5 = 3; } num3 = Convert.ToInt32(array[array.Length - num5]); int num6 = 2; if (array2 == null || array2.Length <= 0) { bool result = false; return result; } if (string.IsNullOrEmpty(array2[array2.Length - 1])) { num6 = 3; } num4 = Convert.ToInt32(array2[array2.Length - num6]); } } return num >= num3 && num2 >= num4; } --- snip ---
Unless there is some work on this, namely the perflib part of advapi32 you might get around by faking the registry keys.
Here is link to a diagram that shows how perfdata consumers, the registry, PDH, and performance DLLs and application providers work together:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa371643%28v=vs.85%2...
(just to get the big picture).
Regards
http://bugs.winehq.org/show_bug.cgi?id=33661
--- Comment #2 from Daniel Jelinski djelinski1@gmail.com 2013-06-06 14:49:13 CDT --- Created attachment 44675 --> http://bugs.winehq.org/attachment.cgi?id=44675 patch that creates the necessary registry entries (English only)
This bug is probably going to stay open for a while. As seen in the code snippet, the checked registry key depends on locale setting of the machine running the installer. I'm not aware of any mechanism in Wine source code that would let us create locale-dependent registry entries. I attached a patch that works for English locales (009 is hex locale ID for English/neutral locale). It can be applied after this one: http://www.winehq.org/pipermail/wine-patches/2013-June/124596.html The patch sent to wine-patches creates locale-independent registry entries needed by installer. Doesn't look like it's going to be accepted any time soon. That patch creates other entries beside perflib: - after registry entries for performance library are created, installer complains about missing PowerShell. Creating registry entry lets it pass. - After these checks succeed, installer progresses further, but then fails while trying to retrieve WBEM installation directory. Creating registry entry lets it pass. After creating these registry entries, the installer crashes. I didn't have time to investigate/report it yet.
http://bugs.winehq.org/show_bug.cgi?id=33661
Andras Kovacs andras@sth.sze.hu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andras@sth.sze.hu
--- Comment #3 from Andras Kovacs andras@sth.sze.hu 2013-06-13 08:31:44 CDT --- After these it fails because it wants to use a custom installed wmi provider, and wine's wmi implementation does not supports custom wmi providers.
-- snip -- trace:wbemprox:wbem_locator_ConnectServer 0x498e830, L"\\.\root\Microsoft\SqlServer\ComputerManagement10", (null), (null), L"", 0x00000080, L"", (nil), 0x11f3da4c) -- snip --
SQL browser installation fails too because of this unimplemented function: -- snip -- fixme:activeds:ADsOpenObject (L"WinNT://andras-work-pc,computer",(null),1,{00000000-0000-0000-c000-000000000046},0x33e7b8)!stub -- snip --
http://bugs.winehq.org/show_bug.cgi?id=33661
Don Pobanz dpobanz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dpobanz@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=33661
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #44675|0 |1 is obsolete| |
--- Comment #4 from Austin English austinenglish@gmail.com --- Created attachment 48888 --> https://bugs.winehq.org/attachment.cgi?id=48888 rediffed patch
https://bugs.winehq.org/show_bug.cgi?id=33661
--- Comment #5 from Austin English austinenglish@gmail.com --- Still in wine-1.7.20-158-g8762842
https://bugs.winehq.org/show_bug.cgi?id=33661
--- Comment #6 from Austin English austinenglish@gmail.com --- Created attachment 48889 --> https://bugs.winehq.org/attachment.cgi?id=48889 rediffed patch
Whoops, wrong patch. This one works around this issue.
https://bugs.winehq.org/show_bug.cgi?id=33661
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36814
https://bugs.winehq.org/show_bug.cgi?id=33661
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=33661
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=33661
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |michael@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/wine.inf-Perfo | |rmance
https://bugs.winehq.org/show_bug.cgi?id=33661
alexchandel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexchandel@gmail.com
--- Comment #7 from alexchandel@gmail.com --- This may be related to bug 40649 and bug 42885.
https://bugs.winehq.org/show_bug.cgi?id=33661
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
While retesting a fix for bug 44475 I came across this one again.
Although proposed changes to 'wine.inf' are a workaround for missing PDH functionality I don't see a big problem of putting them in to get rid of bugs/blockers that stand out for many years.
https://download.microsoft.com/download/c/2/8/c28cc7df-c9d2-453b-9292-ae7d24...
SqlSetup.log:
--- snip --- ... 02/12/2018 12:01:09.293 Attempting to run workflow RUNRULES /RULES=GlobalRules 02/12/2018 12:01:09.296 Attempting to launch process c:\452bb2d057137fe907432e3bd3d5\x86\setup100.exe 02/12/2018 12:01:15.979 Process returned exit code: 0x00000000 02/12/2018 12:01:15.983 Workflow RUNRULES /RULES=GlobalRules returned exit code: 0x00000000 02/12/2018 12:01:15.987 Attempting to launch component update workflow 02/12/2018 12:01:15.991 Media source: c:\452bb2d057137fe907432e3bd3d5\ 02/12/2018 12:01:15.995 Install media path: c:\452bb2d057137fe907432e3bd3d5\x86\setup\ 02/12/2018 12:01:15.998 Media layout: Core ... 02/12/2018 12:01:16.010 Attempting to run workflow COMPONENTUPDATE 02/12/2018 12:01:16.014 Attempting to launch process c:\452bb2d057137fe907432e3bd3d5\x86\setup100.exe 02/12/2018 12:01:25.651 Process returned exit code: 0x00000000 02/12/2018 12:01:25.655 Workflow COMPONENTUPDATE returned exit code: 0x00000000 02/12/2018 12:01:25.659 Attempting to launch user requested workflow locally 02/12/2018 12:01:25.671 Attempting to find local setup.exe 02/12/2018 12:01:25.675 Local bootstrap folder path: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\ 02/12/2018 12:01:25.679 Local setup100.exe full path: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\setup100.exe 02/12/2018 12:01:25.683 Media source: c:\452bb2d057137fe907432e3bd3d5\ 02/12/2018 12:01:25.687 Install media path: c:\452bb2d057137fe907432e3bd3d5\x86\setup\ 02/12/2018 12:01:25.694 Media layout: Core ... 02/12/2018 12:01:25.706 Attempting to run user requested action from local setup100.exe 02/12/2018 12:01:25.710 Attempting to launch process C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\setup100.exe 02/12/2018 12:01:37.776 Process returned exit code: 0x84BE0004 02/12/2018 12:01:37.797 Local setup100.exe returned exit code: 0x84BE0004 ... 02/12/2018 12:01:38.180 Setup closed with exit code: 0x84C40013 --- snip ---
--- snip --- [02/12/18,12:00:27] Microsoft SQL Server 2008 Express Service Pack 1 (x86): ISetupManager::GetGlobalCustomProperty() failed to find global prop in CBaseComponent::GetGlobalCustomProperty() [02/12/18,12:00:27] Setup.exe: GetGlobalCustomProperty - Property: {BBE1827C-F2FD-4FDA-A6D6-C83B62FFFDCA} - PropertyName: compfailed - Value: 0 [02/12/18,12:00:27] Microsoft SQL Server 2008 Express Service Pack 1 (x86): CGenericComponent::Install(): Validating files. [02/12/18,12:00:27] Setup.exe: GetGlobalCustomProperty - Property: {E0875D42-A33D-4C64-81C9-167795F29CA4} - PropertyName: PathFromCartmanToRoot - Value: . [02/12/18,12:00:27] Microsoft SQL Server 2008 Express Service Pack 1 (x86): GenericComponent Action: CreateProcess launched with cmd line : c:\windows\temp_vc2010express\vcexpress.\wcu\sse\SQLExpr32_x86_enu.exe /q /ACTION=Install /FEATURES=SQL /INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /SQLSVCStartupType=Automatic /AddCurrentUserAsSqlAdmin /ENABLERANU=1 /SKIPRULES=RebootRequiredCheck /hideconsole /TIMESTAMP="VSExpress_10.0" [02/12/18,12:00:27] BWaitForMSI(): Verifying we're the only installation currently in progress. [02/12/18,12:00:27] BWaitForMSI(): Ready to proceed with installation. Continuing... [02/12/18,12:01:38] Microsoft SQL Server 2008 Express Service Pack 1 (x86): c:\windows\temp_vc2010express\vcexpress.\wcu\sse\SQLExpr32_x86_enu.exe exited with return value 2227044356 [02/12/18,12:01:38] Microsoft SQL Server 2008 Express Service Pack 1 (x86): CreateProcess internal result - if available: [02/12/18,12:01:38] InstallReturnValue: GFN_MID SSE x86, 0x84be0004 [02/12/18,12:01:38] Setup.exe: AddGlobalCustomProperty [02/12/18,12:01:38] Microsoft SQL Server 2008 Express Service Pack 1 (x86): ***ERRORLOG EVENT*** : Error code -2067922940 for this component is not recognized. [02/12/18,12:01:38] Setup.exe: AddGlobalCustomProperty [02/12/18,12:01:38] Microsoft SQL Server 2008 Express Service Pack 1 (x86): ***ERRORLOG EVENT*** : Component Microsoft SQL Server 2008 Express Service Pack 1 (x86) returned an unexpected value. [02/12/18,12:01:38] Microsoft SQL Server 2008 Express Service Pack 1 (x86): WARNING! Setup Failed for optional component Microsoft SQL Server 2008 Express Service Pack 1 (x86) --- snip ---
--- snip --- Exception summary: The following is an exception stack listing the exceptions in outermost to innermost order Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngineRuleFailureException Message: The performance counter registry hive is corrupted. To continue, you must repair the performance counter registry hive. For more information, see http://support.microsoft.com/kb/300956. Data: DisableWatson = true Stack: at Microsoft.SqlServer.Configuration.RulesEngineExtension.RunRulesAction.ExecuteAction(String actionId) at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream) --- snip ---
$ wine --version wine-3.1-193-g354fa7eb79
Regards
https://bugs.winehq.org/show_bug.cgi?id=33661
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/wine.inf-Perfo |er/patches/wine.inf-Perform |rmance |ance CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=33661
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE URL|http://www.microsoft.com/en |https://web.archive.org/web |-us/download/details.aspx?i |/20110608144150/http://down |d=7593 |load.microsoft.com/download | |/c/2/8/c28cc7df-c9d2-453b-9 | |292-ae7d242dfeca/SQLEXPR32_ | |x86_ENU.exe Status|STAGED |RESOLVED
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting. I think it's better to merge this into bug 33037. Both are about the same issue and refer to the same Wine-Staging patch.
Stable download link via Internet Archive:
https://web.archive.org/web/20110608144150/http://download.microsoft.com/dow...
$ sha1sum SQLEXPR32_x86_ENU.exe 5f6c9597a592df4a5d969259a8e1592ecf838515 SQLEXPR32_x86_ENU.exe
$ du -sh SQLEXPR32_x86_ENU.exe 62M SQLEXPR32_x86_ENU.exe
$ wine --version wine-6.0-rc3
Regards
*** This bug has been marked as a duplicate of bug 33037 ***
https://bugs.winehq.org/show_bug.cgi?id=33661
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate.