Just got a bit suspicious behavior of Octopus Server (ver. 3.4.9). It just crashed with the following message in the log
2016-11-09 05:00:09.8240 135 FATAL Unhandled AppDomain exception occurred: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: chunkLength
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: chunkLength
at System.Text.StringBuilder.ToString()
at Octopus.Worker.Scripting.ServiceMessageParser.Flush(Action`2 to) in Y:\Work\refs\tags\3.4.9\source\Octopus.Worker\Scripting\ServiceMessageParser.cs:line 107
at Octopus.Worker.Scripting.ServiceMessageParser.Finish() in Y:\Work\refs\tags\3.4.9\source\Octopus.Worker\Scripting\ServiceMessageParser.cs:line 93
at Octopus.Worker.Scripting.ServiceMessageParser.Append(ProcessOutputSource source, String line) in Y:\Work\refs\tags\3.4.9\source\Octopus.Worker\Scripting\ServiceMessageParser.cs:line 28
at Octopus.Worker.Scripting.LocalScriptLogWriter.WriteOutput(ProcessOutputSource source, String message) in Y:\Work\refs\tags\3.4.9\source\Octopus.Worker\Scripting\LocalScriptLogWriter.cs:line 18
at System.Diagnostics.Process.OutputReadNotifyUser(String data)
at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
at System.Diagnostics.AsyncStreamReader.ReadBuffer(IAsyncResult ar)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.IO.Stream.ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
I’m not sure what caused this exception, i’ll check if it is temporary or not. But i’m not sure that unhandled exception in thread pool task should crash the server itself.