-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
Symptoms
When creating a SQL transport monitoring instance using PowerShell, the PowerShell instance terminates with a stack overflow.
It is still possible to create monitoring instances using the ServiceControl Management UI).
Who's affected
You are affected if:
- You are using ServiceControl 5.2.0, 5.2.1, 5.2.2
- You are creating a SQL transport monitoring instance using the ServiceControl PowerShell module.
Root cause
Details
Description
It is not possible to create a SQL transport monitoring instance using PowerShell
Expected behavior
An SQL transport monitoring instance is created using the Powershell command.
Actual behavior
The PowerShell process terminates with a stack overflow.
Versions
Steps to reproduce
- Open Powershell v7.2 window
- Enter the following commands
Import-Module Particular.ServiceControl.ManagementNew-MonitoringInstance -Name particular.monitoring.sql -DisplayName particular.monitoring.sql -InstallPath 'C:\Particular.Monitoring.SQL' -LogPath 'C:\Logs' -HostName localhost -Port 33634 -ErrorQueue error -Transport SQLServer -ConnectionString 'Data Source=sqlinternal.somewhere;Initial Catalog=nservicebussqltransport;User Id=nsbuser;Password=verysecretpwd' -ServiceAccount LocalSystemRelevant log output
VERBOSE: Installing Monitoring instance...
Stack overflow.
Repeat 1057 times:
--------------------------------
at System.Reflection.RuntimeAssembly.InternalLoad(System.Reflection.AssemblyName, System.Threading.StackCrawlMark ByRef, System.Runtime.Loader.AssemblyLoadContext, System.Reflection.RuntimeAssembly, Boolean)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(System.Reflection.AssemblyName)
at ServiceControl.Management.PowerShell.ModuleAssemblyInitializer.Resolve(System.Runtime.Loader.AssemblyLoadContext, System.Reflection.AssemblyName)
at System.Runtime.Loader.AssemblyLoadContext.GetFirstResolvedAssemblyFromResolvingEvent(System.Reflection.AssemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(System.Reflection.AssemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr, System.Reflection.AssemblyName)
--------------------------------
at ServiceControlInstaller.Engine.Validation.ConnectionStringValidator.CheckMsSqlConnectionString()
at ServiceControlInstaller.Engine.Validation.ConnectionStringValidator.Validate(ServiceControlInstaller.Engine.IMonitoringInstance)
at ServiceControlInstaller.Engine.Instances.MonitoringNewInstance+<Validate>d__72.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[ServiceControlInstaller.Engine.Instances.MonitoringNewInstance+<Validate>d__72, ServiceControlInstaller.Engine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]](<Validate>d__72 ByRef)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[ServiceControlInstaller.Engine.Instances.MonitoringNewInstance+<Validate>d__72, ServiceControlInstaller.Engine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]](<Validate>d__72 ByRef)
at ServiceControlInstaller.Engine.Instances.MonitoringNewInstance.Validate(System.Func`2<ServiceControlInstaller.Engine.Validation.PathInfo,System.Threading.Tasks.Task`1<Boolean>>)
at ServiceControlInstaller.Engine.Unattended.UnattendMonitoringInstaller+<Add>d__4.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[ServiceControlInstaller.Engine.Unattended.UnattendMonitoringInstaller+<Add>d__4, ServiceControlInstaller.Engine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]](<Add>d__4 ByRef)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[ServiceControlInstaller.Engine.Unattended.UnattendMonitoringInstaller+<Add>d__4, ServiceControlInstaller.Engine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]](<Add>d__4 ByRef)
at ServiceControlInstaller.Engine.Unattended.UnattendMonitoringInstaller.Add(ServiceControlInstaller.Engine.Instances.MonitoringNewInstance, System.Func`2<ServiceControlInstaller.Engine.Validation.PathInfo,System.Threading.Tasks.Task`1<Boolean>>)
at ServiceControl.Management.PowerShell.NewMonitoringInstance.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
at System.Management.Automation.CommandProcessorBase.DoExecute()
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)
at System.Management.Automation.PipelineOps.InvokePipeline(System.Object, Boolean, System.Management.Automation.CommandParameterInternal[][], System.Management.Automation.Language.CommandBaseAst[], System.Management.Automation.CommandRedirection[][], System.Management.Automation.Language.FunctionContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Run(System.Management.Automation.Interpreter.InterpretedFrame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)
at System.Management.Automation.Interpreter.Interpreter.Run(System.Management.Automation.Interpreter.InterpretedFrame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)
at System.Management.Automation.DlrScriptCommandProcessor.RunClause(System.Action`1<System.Management.Automation.Language.FunctionContext>, System.Object, System.Object)
at System.Management.Automation.DlrScriptCommandProcessor.Complete()
at System.Management.Automation.CommandProcessorBase.DoComplete()
at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(System.Management.Automation.CommandProcessorBase)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)
at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)Additional Information
Workarounds
Create the Monitoring instance using the ServiceControl Management UI.
Possible solutions
N/A
Additional information
N/A