Note that the appveyor failure is due to pre-existing data races in the v2 branch.
I conducted trial runs of ./cmd/jujud/agent with this proposed branch vs. the current revision specified by Juju. My findings here: http://paste.ubuntu.com/16933543/
With this branch, I had a 10/10 pass rate of the above test. With the version currently used by Juju master, I had a 7/10 pass rate.
To be clear, I don't think this branch is a perfect fix for the issues in npipe, which includes several data races in PipeListener between Accept and Close, as well as some in the tests.
However I do think this pull request could mitigate the immediate issue of LP:#1581157. The separate close handle should allow PipeListener.Close() to preempt waitForCompletion even if the PipeListener.handle has a stale reference.
@natefinch I think this is ready for a review, PTAL.
Note that the appveyor failure is due to pre-existing data races in the v2 branch.
I conducted trial runs of
./cmd/jujud/agent
with this proposed branch vs. the current revision specified by Juju. My findings here: http://paste.ubuntu.com/16933543/With this branch, I had a 10/10 pass rate of the above test. With the version currently used by Juju master, I had a 7/10 pass rate.
To be clear, I don't think this branch is a perfect fix for the issues in npipe, which includes several data races in PipeListener between Accept and Close, as well as some in the tests.
However I do think this pull request could mitigate the immediate issue of LP:#1581157. The separate close handle should allow
PipeListener.Close()
to preemptwaitForCompletion
even if the PipeListener.handle has a stale reference.@natefinch I think this is ready for a review, PTAL.