SQL SERVER 2016 installation failing due to MSVCR120 missing Update (EXCEPTION_ILLEGAL_INSTRUCTION)
I was working on one of SQL SETUP issue with my colleague Shaurabh Thapa where in SQL SERVER 2016 installation was failing. So we looked into the setup logs and in detail.txt we could see following information:
Detail.txt
(01) 2016-10-10 17:25:48 Slp: Sco: Returning service process id 0
(01) 2016-10-10 17:25:48 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
(01) 2016-10-10 17:25:48 Slp: The service did not respond to the start or control request in a timely fashion.
(01) 2016-10-10 17:25:48 Slp: The configuration failure category of current exception is ConfigurationFailure
(01) 2016-10-10 17:25:48 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
(01) 2016-10-10 17:25:48 Slp: System.ComponentModel.Win32Exception (0x80004005): The service did not respond to the start or control request in a timely fashion.
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.Sco.Service.StartService(String[] startParams)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(String[] parameters, Boolean withFailpoint)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerStartup.StartSQLServerForInstall(String sqlCollation, String masterFullPath, Boolean isConfiguringTemplateDBs, Boolean isSlipstreamRunning)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.ConfigSQLServerSystemDatabases(EffectiveProperties properties, Boolean isConfiguringTemplateDBs, Boolean useInstallInputs)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.DoCommonDBStartConfig(ConfigActionTiming timing)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.Install(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
(01) 2016-10-10 17:25:48 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2016-10-10 17:25:48 Slp: Inner exceptions are being indented
(01) 2016-10-10 17:25:48 Slp:
(01) 2016-10-10 17:25:48 Slp: Exception type: System.ComponentModel.Win32Exception
(01) 2016-10-10 17:25:48 Slp: Message:
(01) 2016-10-10 17:25:48 Slp: The service did not respond to the start or control request in a timely fashion.
(01) 2016-10-10 17:25:48 Slp:
(01) 2016-10-10 17:25:48 Slp: HResult : 0x80004005
(01) 2016-10-10 17:25:48 Slp: Error : 1053
(01) 2016-10-10 17:25:48 Slp: Data:
(01) 2016-10-10 17:25:48 Slp: SQL.Setup.FailureCategory = ConfigurationFailure
(01) 2016-10-10 17:25:48 Slp: WatsonConfigActionData = INSTALL@CONFIGRC@SQL_ENGINE_CORE_INST
(01) 2016-10-10 17:25:48 Slp: WatsonExceptionFeatureIdsActionData = System.String[]
(01) 2016-10-10 17:25:48 Slp: Stack:
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.Sco.Service.StartService(String[] startParams)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(String[] parameters, Boolean withFailpoint)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerStartup.StartSQLServerForInstall(String sqlCollation, String masterFullPath, Boolean isConfiguringTemplateDBs, Boolean isSlipstreamRunning)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.ConfigSQLServerSystemDatabases(EffectiveProperties properties, Boolean isConfiguringTemplateDBs, Boolean useInstallInputs)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.DoCommonDBStartConfig(ConfigActionTiming timing)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.Install(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
(01) 2016-10-10 17:25:48 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
(01) 2016-10-10 17:25:48 Slp: Watson Bucket 1
Original Parameter Values
(01) 2016-10-10 17:25:48 Slp: Parameter 0 : SQL Server 2016@RTM@
(01) 2016-10-10 17:25:48 Slp: Parameter 1 : Microsoft.SqlServer.Configuration.Sco.Service.StartService
(01) 2016-10-10 17:25:48 Slp: Parameter 2 : Microsoft.SqlServer.Configuration.Sco.Service.StartService
(01) 2016-10-10 17:25:48 Slp: Parameter 3 : System.ComponentModel.Win32Exception@-2147467259
(01) 2016-10-10 17:25:48 Slp: Parameter 4 : System.ComponentModel.Win32Exception@-2147467259
(01) 2016-10-10 17:25:48 Slp: Parameter 5 : SqlEngineDBStartConfigAction_install_configrc
(01) 2016-10-10 17:25:48 Slp: Parameter 6 : INSTALL@CONFIGRC@SQL_ENGINE_CORE_INST
(01) 2016-10-10 17:25:48 Slp: Parameter 7 : 1053
(01) 2016-10-10 17:25:48 Slp: Parameter 8 : 1053
(01) 2016-10-10 17:25:26 SQLEngine: : Checking Engine checkpoint 'StartEngineService'
(01) 2016-10-10 17:25:26 SQLEngine: --SqlServerServiceSCM: Starting SQL via SCM (-mSqlSetup -Q -qLatin1_General_CI_AS -T4022 -T4010 -T3659 -T3610 -T8015)...
(01) 2016-10-10 17:25:26 Slp: Sco: Attempting to start service MSSQL$SQL2016
(01) 2016-10-10 17:25:26 Slp: Sco: Attempting to open SC Manager
(01) 2016-10-10 17:25:26 Slp: Sco: Attempting to open service handle for service MSSQL$SQL2016
(01) 2016-10-10 17:25:44 Slp: Sco: Attempting to close service handle for service MSSQL$SQL2016
(01) 2016-10-10 17:25:44 Slp: Sco: Attempting to close SC Manager
(01) 2016-10-10 17:25:44 SQLEngine: --SqlServerServiceSCM: Exception generated: The service did not respond to the start or control request in a timely fashion.
So we can cleary see that SQL SERVER Service failed to start and hitting an exception. We looked into the Watson dump signature and can clearly see a APPCRASH and faulting module was MSVCR120.dll with EXCEPTION_ILLEGAL_INSTRUCTION exception.
Version=1
EventType=APPCRASH
EventTime=131194442869667947
ReportType=2
Consent=1
ReportIdentifier=d1637b61-8499-11e6-80b6-aeb7d004036e
IntegratorReportIdentifier=d1637b60-8499-11e6-80b6-aeb7d004036e
NsAppName=sqlservr.exe
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=sqlservr.exe
Sig[1].Name=Application Version
Sig[1].Value=2015.130.1601.5
Sig[2].Name=Application Timestamp
Sig[2].Value=5724ae45
Sig[3].Name=Fault Module Name
Sig[3].Value=MSVCR120.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=12.0.40649.5
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=56bc00d3
Sig[6].Name=Exception Code
Sig[6].Value=c000001d =============> This means EXCEPTION_ILLEGAL_INSTRUCTION
Sig[7].Name=Exception Offset
Sig[7].Value=00000000000931f3
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.3.9600.2.0.0.272.7
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=2057
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=9d85
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=9d85f85e0140d2c5e78ed7595acfc4cb
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=4062
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=406218417176eedb9b6d8b2c6586febb
UI[2]=C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
UI[5]=Check online for a solution (recommended)
UI[6]=Check for a solution later (recommended)
UI[7]=Close
UI[8]=SQL Server Windows NT - 64 Bit stopped working and was closed
UI[9]=A problem caused the application to stop working correctly. Windows will notify you if a solution is available.
UI[10]=&Close
Solution
We found that customer already installed Critical Update for Microsoft VC++ 2013 Runtime but issue was still happening.
https://support.microsoft.com/en-us/kb/3164398
We have done further research on this and later asked customer to apply following fix and after that SQL SERVER 2016 installation completed successfully.
FIX: Programs that are built in Visual C++ 2013 crash with "Illegal Instruction" exception https://support.microsoft.com/en-in/kb/3174417
I hope this will help.
Vikas Rana (@vikasrana_dba)
Support Escalation Engineer
Microsoft India GTSC