This bug is affecting plugins using Bitbucket’s Java API and it may lead to unexpected thread hangs, as well as performance starvation due to exhaustion of IO pump threads.
This issue was found in Bitbucket 8.1.0 and 8.1.1.
- Run a git command using an input/output handler (e.g. running git cat-file --batch with a subclass of com.atlassian.bitbucket.io.AbstractCommandInputOutputHandler)
- The input handler runs until it is blocked in OutputStream.write. This happens when git's stdin is full and there is backpressure
- The output handler calls Watchdog.cancel() on the provided watchdog
- The input handler is now blocked forever in OutputStream.write.
On Bitbucket 7, step #3 above causes an IOException on the input handler thread, letting it exit.
On Bitbucket 8.1.x the input handler thread is hung even once the underlying process exits.
No workaround available