Git-Wrapper icon indicating copy to clipboard operation
Git-Wrapper copied to clipboard

deadlocks can happen in IPC::Open3

Open aeruder opened this issue 6 years ago • 4 comments

This is largely system dependent, but because we write stdin before reading stdout/stderr in Git::Wrapper::RUN and read stdout before stderr, we can end up with deadlocks when pipe buffers fill up and we are blocked on another descriptor. Solving this with Open3 gets pretty icky with select() but there are several alternative modules to help with this.

aeruder avatar May 25 '18 03:05 aeruder

Do you have a test case that reliably reproduces this?

genehack avatar May 29 '18 05:05 genehack

I'll put something together.

aeruder avatar May 31 '18 14:05 aeruder

@genehack -- got a test worked out and pull request to fix the issue made.

aeruder avatar Jun 16 '18 00:06 aeruder

Just to clarify - we are regularly hitting this deadlock with git fetch --tags when there's 15 or so tags.

aeruder avatar Jul 11 '18 20:07 aeruder