Skip to content

Conversation

@ijd02
Copy link

@ijd02 ijd02 commented Jul 4, 2019

Fixed git deadlock bug in GitServiceExecutor. Fault due to stdIn & stdOut buffers in the git.exe filling and blocking further processing. Handling in GitServiceExecutor now asynchronous i.e. Bonobo is continually emptying the buffers even while its sending data to git. Link to initial issue:
#747

ian davis added 2 commits July 4, 2019 22:31
@willdean
Copy link
Collaborator

willdean commented Jul 5, 2019

Thanks for this. There are a couple of issues I would like to discuss: (Note that I didn't write the original code, so I'm not defensive about it in the slightest!)

  • Is it necessary for both the input and the output stream to be async like this? If we start the output read before writing the input data, then the input write could probably stay synchronous, like it used to be?

  • If we're going to fix-up this broken routine, we should probably also make sure we're reading stderr at the same time as stdout, because otherwise is there still some kind of possible deadlock in the situation where a lot of stderr output occurs? (See the last sample on https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.standardoutput?view=netframework-4.8 )

  • I find myself a little uncomfortable about the mixture of an old-style pre-Task API (Process), modern Task-async and then the Thread.Sleep() and the Task.Wait() call. I wonder if it's better to avoid the CopyAsync and just use the old-style Process async methods, so avoid mixing approaches here? This is not a fully-thought-through position, just gut feel.

But thanks for the PR, anyway, I would definitely like to add this improvement once we're fully happy with it.

@ijd02
Copy link
Author

ijd02 commented Jul 9, 2019 via email

@willdean willdean mentioned this pull request Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants