projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.
Apache License 2.0
3.12k stars 652 forks source link

Readblock call deadlocks between stdout/stderror intermittently, and cause all subsequent requests blocked #880

Closed hongdai closed 10 years ago

hongdai commented 10 years ago

This issue occurs in the recent Zumo Stress runs.

MSDN(http://msdn.microsoft.com/en-us/library/system.diagnostics.process.standarderror.aspx) recommends to use Process.BeginErrorReadLine or Process.BeginOutputReadLine to read either stdout or stderr asynchronously to avoid deadlocks.

The related code is in https://github.com/projectkudu/kudu/blob/master/Kudu.Core/Infrastructure/Executable.cs line 91.

I can provide a memory dump if needed.

Load: In our stress tests, we do one kudu operation to a site at a time, at a rate of around 2 kudu operations per min.

Scenarios: A mix of update, delete, get. Get has the most load.

amitapl commented 10 years ago

Can you specify the rate and the scenario you're testing? Currently our stress requirements are quite low as we're not expecting any stress on kudu.

hongdai commented 10 years ago

I have updated the issue with below:

Load: In our stress tests, we do one kudu operation to a site at a time, at a rate of around 2 kudu operations per min. Scenarios: A mix of update, delete, get. Get has the most load.

davidebbo commented 10 years ago

Do you have stack traces of the relevant deadlocked thread? Thanks!

hongdai commented 10 years ago

I’ve sent it to the kududev as well.

From the call stacks, thread 25 and 26 looks deadlocked:

Thread 26 is to read stdout. The content shows it.

0:026> !do 0313cbe8 Name: System.Byte[] MethodTable: 72ebcf5c EEClass: 72b2c46c Size: 4108(0x100c) bytes Array: Rank 1, Number of elements 4096, Type Byte Content: [VfsUpdateBranch 9530d16] Committing update from request /scmvfs/service/api/random.js. 1 file changed, 9 deletions(-). delete m

Thread 25 should be read stderror, the content is empty.

25 Id: 8f4.e0c Suspend: 0 Teb: fe984000 Unfrozen ChildEBP RetAddr WARNING: Stack unwind information not available. Following frames may be wrong. 0060e7b0 72e4cb5b ntdll!ZwReadFile+0xc 0060e820 72dc8d02 mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(<HRESULT 0x80004001>)+0x67 0060e848 72dc8c51 mscorlib_ni!System.IO.FileStream.ReadFileNative(<HRESULT 0x80004001>)+0x72 0060e874 72dc8b35 mscorlib_ni!System.IO.FileStream.ReadCore(<HRESULT 0x80004001>)+0x41 0060e894 73554810 mscorlib_ni!System.IO.FileStream.Read(<HRESULT 0x80004001>)+0x95 0060e8a8 738754ca mscorlib_ni!System.IO.Stream.b__a(<HRESULT 0x80004001>)+0x3c 0060e8b4 72e0aef6 mscorlib_ni!System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].InnerInvoke(<HRESULT 0x80004001>)+0x372496 0060e8d8 72e0aeb9 mscorlib_ni!System.Threading.Tasks.Task.Execute(<HRESULT 0x80004001>)+0x32 0060e940 72dc23d7 mscorlib_ni!System.Threading.Tasks.Task.ExecutionContextCallback(<HRESULT 0x80004001>)+0x15 0060e940 72dc2316 mscorlib_ni!System.Threading.ExecutionContext.RunInternal(<HRESULT 0x80004001>)+0xa7 0060e954 72e0ad62 mscorlib_ni!System.Threading.ExecutionContext.Run(<HRESULT 0x80004001>)+0x16 0060e9a0 72e0ac87 mscorlib_ni!System.Threading.Tasks.Task.ExecuteWithThreadLocal(<HRESULT 0x80004001>)+0xca 0060e9b0 72e0abcb mscorlib_ni!System.Threading.Tasks.Task.ExecuteEntry(<HRESULT 0x80004001>)+0xb3 0060ea04 72dcd5d9 mscorlib_ni!System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem(<HRESULT 0x80004001>)+0x7 0060ea04 72dcd475 mscorlib_ni!System.Threading.ThreadPoolWorkQueue.Dispatch(<HRESULT 0x80004001>)+0x149 0060ea14 74322952 mscorlib_ni!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(<HRESULT 0x80004001>)+0x5 0060ea14 7434316f clr+0x2952 0060ea68 743439b5 clr!DllUnregisterServerInternal+0x18d73 0060eae4 744013ec clr!DllUnregisterServerInternal+0x195b9 0060eb5c 7440008d clr!DllGetClassObjectInternal+0x14957 0060eb74 744000fb clr!DllGetClassObjectInternal+0x135f8 0060ec1c 744001c8 clr!DllGetClassObjectInternal+0x13666 0060ec78 74486869 clr!DllGetClassObjectInternal+0x13733 0060ec84 744868d2 clr!GetMetaDataInternalInterfaceFromPublic+0x21db2 0060ed48 7448684f clr!GetMetaDataInternalInterfaceFromPublic+0x21e1b 0060ed6c 744000fb clr!GetMetaDataInternalInterfaceFromPublic+0x21d98 0060ee14 744001c8 clr!DllGetClassObjectInternal+0x13666 0060ee70 7432c6df clr!DllGetClassObjectInternal+0x13733 0060ee94 74401384 clr!DllUnregisterServerInternal+0x22e3 0060ef48 743aa665 clr!DllGetClassObjectInternal+0x148ef 0060efc4 7440064c clr!GetMetaDataInternalInterface+0x25bc1 0060fde4 7696851e clr!DllGetClassObjectInternal+0x13bb7 0060fdf0 777abf39 kernel32!BaseThreadInitThunk+0xe 0060fe34 777abf0c ntdll!RtlInitializeExceptionChain+0x85 0060fe4c 00000000 ntdll!RtlInitializeExceptionChain+0x58

26 Id: 8f4.5a4 Suspend: 0 Teb: fe966000 Unfrozen ChildEBP RetAddr WARNING: Stack unwind information not available. Following frames may be wrong. 00b0f6c0 72e4cb5b ntdll!ZwReadFile+0xc 00b0f730 72dc8d02 mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(<HRESULT 0x80004001>)+0x67 00b0f758 72dc8c51 mscorlib_ni!System.IO.FileStream.ReadFileNative(<HRESULT 0x80004001>)+0x72 00b0f784 72dc8b35 mscorlib_ni!System.IO.FileStream.ReadCore(<HRESULT 0x80004001>)+0x41 00b0f7a4 73554810 mscorlib_ni!System.IO.FileStream.Read(<HRESULT 0x80004001>)+0x95 00b0f7b8 738754ca mscorlib_ni!System.IO.Stream.b__a(<HRESULT 0x80004001>)+0x3c 00b0f7c4 72e0aef6 mscorlib_ni!System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].InnerInvoke(<HRESULT 0x80004001>)+0x372496 00b0f7e8 72e0aeb9 mscorlib_ni!System.Threading.Tasks.Task.Execute(<HRESULT 0x80004001>)+0x32 00b0f850 72dc23d7 mscorlib_ni!System.Threading.Tasks.Task.ExecutionContextCallback(<HRESULT 0x80004001>)+0x15 00b0f850 72dc2316 mscorlib_ni!System.Threading.ExecutionContext.RunInternal(<HRESULT 0x80004001>)+0xa7 00b0f864 72e0ad62 mscorlib_ni!System.Threading.ExecutionContext.Run(<HRESULT 0x80004001>)+0x16 00b0f8b0 72e0ac87 mscorlib_ni!System.Threading.Tasks.Task.ExecuteWithThreadLocal(<HRESULT 0x80004001>)+0xca 00b0f8c0 72e0abcb mscorlib_ni!System.Threading.Tasks.Task.ExecuteEntry(<HRESULT 0x80004001>)+0xb3 00b0f914 72dcd5d9 mscorlib_ni!System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem(<HRESULT 0x80004001>)+0x7 00b0f914 72dcd475 mscorlib_ni!System.Threading.ThreadPoolWorkQueue.Dispatch(<HRESULT 0x80004001>)+0x149 00b0f924 74322952 mscorlib_ni!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(<HRESULT 0x80004001>)+0x5 00b0f924 7434316f clr+0x2952 00b0f978 743439b5 clr!DllUnregisterServerInternal+0x18d73 00b0f9f4 744013ec clr!DllUnregisterServerInternal+0x195b9 00b0fa6c 7440008d clr!DllGetClassObjectInternal+0x14957 00b0fa84 744000fb clr!DllGetClassObjectInternal+0x135f8 00b0fb2c 744001c8 clr!DllGetClassObjectInternal+0x13666 00b0fb88 74486869 clr!DllGetClassObjectInternal+0x13733 00b0fb94 744868d2 clr!GetMetaDataInternalInterfaceFromPublic+0x21db2 00b0fc58 7448684f clr!GetMetaDataInternalInterfaceFromPublic+0x21e1b 00b0fc7c 744000fb clr!GetMetaDataInternalInterfaceFromPublic+0x21d98 00b0fd24 744001c8 clr!DllGetClassObjectInternal+0x13666 00b0fd80 7432c6df clr!DllGetClassObjectInternal+0x13733 00b0fda4 74401384 clr!DllUnregisterServerInternal+0x22e3 00b0fe58 743aa665 clr!DllGetClassObjectInternal+0x148ef 00b0fed4 7440064c clr!GetMetaDataInternalInterface+0x25bc1 00b0ff6c 7696851e clr!DllGetClassObjectInternal+0x13bb7 00b0ff78 777abf39 kernel32!BaseThreadInitThunk+0xe 00b0ffbc 777abf0c ntdll!RtlInitializeExceptionChain+0x85 00b0ffd4 00000000 ntdll!RtlInitializeExceptionChain+0x58

24 Id: 8f4.e54 Suspend: 0 Teb: fe963000 Unfrozen ChildEBP RetAddr WARNING: Stack unwind information not available. Following frames may be wrong. 00a8e258 743b2c4e ntdll!ZwWaitForMultipleObjects+0xc 00a8e2a8 743b29a5 clr!GetMetaDataInternalInterface+0x2e1aa 00a8e334 743b2a96 clr!GetMetaDataInternalInterface+0x2df01 00a8e3a0 743b2bf4 clr!GetMetaDataInternalInterface+0x2dff2 00a8e3ec 74396324 clr!GetMetaDataInternalInterface+0x2e150 00a8e400 743feada clr!GetMetaDataInternalInterface+0x11880 00a8e414 743fec18 clr!DllGetClassObjectInternal+0x12045 00a8e4c4 743fecf9 clr!DllGetClassObjectInternal+0x12183 * WARNING: Unable to verify checksum for mscorlib.ni.dll * ERROR: Module load completed but symbols could not be loaded for mscorlib.ni.dll 00a8e560 72d9a5fa clr!DllGetClassObjectInternal+0x12264 00a8e570 72d9a53b mscorlib_ni!System.Threading.Monitor.Wait(<HRESULT 0x80004001>)+0x16 00a8e5c8 72e41f32 mscorlib_ni!System.Threading.Monitor.Wait(<HRESULT 0x80004001>)+0x7 00a8e5c8 72e0baa7 mscorlib_ni!System.Threading.ManualResetEventSlim.Wait(<HRESULT 0x80004001>)+0x182 00a8e608 734eda0b mscorlib_ni!System.Threading.Tasks.Task.SpinThenBlockingWait(<HRESULT 0x80004001>)+0x93 00a8e660 734ef2b0 mscorlib_ni!System.Threading.Tasks.Task.InternalWait(<HRESULT 0x80004001>)+0x153 00a8e674 73814e72 mscorlib_ni!System.Threading.Tasks.Task1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].GetResultCore(<HRESULT 0x80004001>)+0xfffec1b8 00a8e6d0 05fd6778 mscorlib_ni!System.Threading.Tasks.Task1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].get_Result(<HRESULT 0x80004001>)+0x311ac2 * WARNING: Unable to verify checksum for Kudu.Core.dll * ERROR: Module load completed but symbols could not be loaded for Kudu.Core.dll 00a8e6d0 05fd9981 Kudu_Core!Kudu.Core.Infrastructure.Executable.Execute(<HRESULT 0x80004001>)+0x170 00a8e704 0635c8c9 Kudu_Core!Kudu.Core.SourceControl.Git.GitExeRepository.Commit(<HRESULT 0x80004001>)+0x81 * WARNING: Unable to verify checksum for Kudu.Services.dll * ERROR: Module load completed but symbols could not be loaded for Kudu.Services.dll 00a8e748 0635c737 Kudu_Services!Kudu.Services.SourceControl.LiveScmEditorController+d1c.MoveNext(<HRESULT 0x80004001>)+0x149 00a8e7a0 0635c6c5 mscorlib_ni!System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Security.Cryptography.CryptoStream+d__0, mscorlib]](HRESULT 0x80004001)+0x92dbe127 00a8e800 0635c5ba Kudu_Services!Kudu.Services.SourceControl.LiveScmEditorController.CreateFileDeleteResponse(<HRESULT 0x80004001>)+0x6d 00a8e848 0635c159 Kudu_Services!Kudu.Services.Infrastructure.VfsControllerBase.DeleteItem(<HRESULT 0x80004001>)+0x2b2 00a8e884 0635bfdf Kudu_Services!Kudu.Services.SourceControl.LiveScmEditorController+db.MoveNext(<HRESULT 0x80004001>)+0x131 00a8e8dc 0635bf6d mscorlib_ni!System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Security.Cryptography.CryptoStream+d0, mscorlib]](HRESULT 0x80004001)+0x92dbd9cf 00a8e928 05d31f95 Kudu_Services!Kudu.Services.SourceControl.LiveScmEditorController.DeleteItem(<HRESULT 0x80004001>)+0x6d 00a8e938 05fd5e47 DynamicClass.lambda_method(<HRESULT 0x80004001>)+0x65 *\ ERROR: Module load completed but symbols could not be loaded for System.Web.Http.dll 00a8e948 05fd5e17 System_Web_Http!System.Web.Http.Controllers.ReflectedHttpActionDescriptor+ActionExecutor+<>cDisplayClass15.bb(<HRESULT 0x80004001>)+0x17 00a8e964 05fd57e6 System_Web_Http!System.Web.Http.Controllers.ReflectedHttpActionDescriptor+ActionExecutor.Execute(<HRESULT 0x80004001>)+0xf 00a8e964 05fd5608 System_Web_Http!System.Web.Http.Controllers.ReflectedHttpActionDescriptor+<>cDisplayClass5.b4(<HRESULT 0x80004001>)+0x36 00a8e988 05fd5740 System_Web_Http!System.Threading.Tasks.TaskHelpers.RunSynchronously[[System.Canon, mscorlib]](HRESULT 0x80004001)+0x68 00a8e9a0 05fd5696 System_Web_Http!System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(<HRESULT 0x80004001>)+0x68 00a8e9c4 05fd5608 System_Web_Http!System.Web.Http.Controllers.ApiControllerActionInvoker+<>cDisplayClass3.b0(<HRESULT 0x80004001>)+0x3e 00a8e9e8 05fd5539 System_Web_Http!System.Threading.Tasks.TaskHelpers.RunSynchronously[[System.Canon, mscorlib]](HRESULT 0x80004001)+0x68 00a8ea00 05fd549b System_Web_Http!System.Web.Http.Controllers.ApiControllerActionInvoker.InvokeActionAsync(<HRESULT 0x80004001>)+0x89 00a8ea10 05fd53dc System_Web_Http!System.Web.Http.ApiController+<>cDisplayClass3.b2(<HRESULT 0x80004001>)+0x23 00a8ea28 05fd536b System_Web_Http!System.Web.Http.ApiController+<>cDisplayClass3.b1(<HRESULT 0x80004001>)+0x5c 00a8ea54 05fd52d5 System_Web_Http!System.Threading.Tasks.TaskHelpersExtensions+<>cDisplayClass32`1[[System.Canon, mscorlib]].b31(<HRESULT 0x80004001>)+0xb 00a8ea54 05fd51cd System_Web_Http!System.Threading.Tasks.TaskHelpersExtensions.ThenImpl[[System.Canon, mscorlib],[System.Canon, mscorlib]](HRESULT 0x80004001)+0xed 00a8ea7c 05fd4d86 System_Web_Http!System.Threading.Tasks.TaskHelpersExtensions.Then[[System.Canon, mscorlib]](HRESULT 0x80004001)+0x9d 00a8ea9c 05fd090b System_Web_Http!System.Web.Http.ApiController+<>cDisplayClass3.b__0(<HRESULT 0x80004001>)+0x56 00a8eab8 05e0dade System_Web_Http!System.Web.Http.ApiController.ExecuteAsync(<HRESULT 0x80004001>)+0x11b 00a8ead8 05e0d88a System_Web_Http!System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsyncInternal(<HRESULT 0x80004001>)+0x1de 00a8eb08 6975dde8 System_Web_Http!System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(<HRESULT 0x80004001>)+0x4a * WARNING: Unable to verify checksum for System.Net.Http.ni.dll * ERROR: Module load completed but symbols could not be loaded for System.Net.Http.ni.dll 00a8eb20 05e0d612 System_Net_Http_ni!System.Net.Http.HttpMessageInvoker.SendAsync(<HRESULT 0x80004001>)+0x38 00a8eb3c 6975dfca System_Web_Http!System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(<HRESULT 0x80004001>)+0x172 00a8eb50 05e0ca36 System_Net_Http_ni!System.Net.Http.DelegatingHandler.SendAsync(<HRESULT 0x80004001>)+0x2a 00a8eb78 6975dde8 System_Web_Http!System.Web.Http.HttpServer.SendAsync(<HRESULT 0x80004001>)+0x136 00a8eb90 05e0bb6c System_Net_Http_ni!System.Net.Http.HttpMessageInvoker.SendAsync(<HRESULT 0x80004001>)+0x38 * ERROR: Module load completed but symbols could not be loaded for System.Web.Http.WebHost.dll 00a8ebb4 05e0b829 System_Web_Http_WebHost!System.Web.Http.WebHost.HttpControllerHandler.BeginProcessRequest(<HRESULT 0x80004001>)+0xcc 00a8ebd0 718dd4fa System_Web_Http_WebHost!System.Web.Http.WebHost.HttpControllerHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(<HRESULT 0x80004001>)+0x31 * WARNING: Unable to verify checksum for System.Web.ni.dll * ERROR: Module load completed but symbols could not be loaded for System.Web.ni.dll 00a8ec1c 70f88b1c System_Web_ni!System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute(<HRESULT 0x80004001>)+0x92f7fa 00a8ec5c 70f9c400 System_Web_ni!System.Web.HttpApplication.ExecuteStep(<HRESULT 0x80004001>)+0x9c 00a8ece0 70f88d80 System_Web_ni!System.Web.HttpApplication+PipelineStepManager.ResumeSteps(<HRESULT 0x80004001>)+0x474 00a8ecf4 70f84e5b System_Web_ni!System.Web.HttpApplication.BeginProcessRequestNotification(<HRESULT 0x80004001>)+0x60 00a8ed44 70f8ad5d System_Web_ni!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(<HRESULT 0x80004001>)+0xbb 00a8edd8 70f8aaef System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(<HRESULT 0x80004001>)+0x245 00a8ee00 01f9a90a System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(<HRESULT 0x80004001>)+0x1f * ERROR: Symbol file could not be found. Defaulted to export symbols for webengine4.dll - 00a8ee30 73e09499 CLRStub[StubLinkStub]@3027a89c01f9a90a(<Win32 error 0n318>) 00a8ee54 73e09589 webengine4!MgdGetCurrentNotificationInfo+0x89 00a8ee78 73e095f9 webengine4!MgdGetCurrentNotificationInfo+0x179 00a8eec0 73e09e7b webengine4!MgdGetCurrentNotificationInfo+0x1e9 *\ ERROR: Symbol file could not be found. Defaulted to export symbols for iiscore.dll - 00a8eee0 74221bae webengine4!MgdIndicateCompletion+0xc2 00a8eef4 742210e3 iiscore+0x21bae 00a8ef84 74212c87 iiscore+0x210e3 00a8efcc 74222778 iiscore+0x12c87 00a8eff0 74222258 iiscore+0x22778 00a8f260 742164fa iiscore+0x22258 00a8f284 74215d0d iiscore+0x164fa 00a8f2a4 73e09da3 iiscore+0x15d0d 00a8f2b4 73e09ddb webengine4!MgdGetResponseChunks+0xbf 00a8f2c4 71000735 webengine4!MgdIndicateCompletion+0x22 00a8f304 70f8ae8a System_Web_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(<HRESULT 0x80004001>)+0x3d 00a8f394 70f8aaef System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(<HRESULT 0x80004001>)+0x372 00a8f3bc 01f9a90a System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(<HRESULT 0x80004001>)+0x1f 00a8f3dc 7448cfb8 CLRStub[StubLinkStub]@3027a89c01f9a90a(<Win32 error 0n318>) 00a8f43c 744867ca clr!GetMetaDataInternalInterfaceFromPublic+0x28501 00a8f500 7448cf26 clr!GetMetaDataInternalInterfaceFromPublic+0x21d13 00a8f558 01f9a965 clr!GetMetaDataInternalInterfaceFromPublic+0x2846f 00a8f58c 73e09499 CLRStub[StubLinkStub]@3027a89c01f9a965(<Win32 error 0n318>) 00a8f5b0 73e09a0f webengine4!MgdGetCurrentNotificationInfo+0x89 00a8f5c0 74400c7f webengine4!PerfDecrementCounter+0x4e 00a8f608 743aa665 clr!DllGetClassObjectInternal+0x141ea 00a8f684 7440064c clr!GetMetaDataInternalInterface+0x25bc1 00a8f7a0 7696851e clr!DllGetClassObjectInternal+0x13bb7 00a8f7ac 777abf39 kernel32!BaseThreadInitThunk+0xe 00a8f7f0 777abf0c ntdll!RtlInitializeExceptionChain+0x85 00a8f808 00000000 ntdll!RtlInitializeExceptionChain+0x58

suwatch commented 10 years ago

I got a chance to look at the dump. The symptom was the same as the previous issue (https://github.com/projectkudu/kudu/issues/754). In the past, Zumo ran into this with 'git rev-parse HEAD' command and this time with 'git commit -m ...'.

The git.exe process has exited however reading from its stdout and stderr were still blocked. In fact, in this situation, no data was ever read from stdout or stderr at all (meaning it was blocked on the first read attempt). What we expected was stdout/err pipe should be flushed and closed when process died.

I have written a simple stress calling GitExeRepository.CurentId in the tight loop .. so far it has been running for an hour without any issue. Will see how it go.

A couple of ideas we could do as a defend in depth

  1. Instead of calling Task.Result at this line, we could introduce idlemanager.WaitFor(Task). If wait for task show no sign of IO after process has exited, we will simply close the StdOut and StdErr and report errors. This should free up the two pending reading threads.
  2. For the two threads that do the StreamReader.ReadAsyncBlock, we could do the Peek loop with Time.Delay(). This would allow to exit the thread in unhappy scenarios.
hongdai commented 10 years ago

What’s the reason we cannot use the recommended way, i.e. use Process.BeginErrorReadLine to read stderror?

suwatch commented 10 years ago

Thanks Hong. We certainly are exploring that approach.

suwatch commented 10 years ago

Fix https://github.com/projectkudu/kudu/commit/b35f506fdcfd5cbbcb461a09517b05fe4be50a94 to be true async with stdio