Chasing Windows ProcessTest intermittent failure #4172
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original PR is described below the horizontal line. That content is now in
PR #4174.
This PR involved into yet another evolution of my attempt to understand the
apparent intermittent failure in
ProcessTestconcurrentTest. I am tryingto tease apart a concurrency defect in the test as written from the way
Scala Native is handling EOF on an apparently empty pipe.
Is SN not blocking when it should? Is output from the child process getting
lost (that is, output happens but child closes pipe, so EOF is real). The latter
may be why intermittent seems to be only/more_frequent on Windows.
I would like to understand this intermittent better before I go off and
fix the concurrency logic and read-framing errors in the test.
Fix NNNN
The output stream used by a javalib
Processto send output to the sub-process it createsis now direct; that is, unbuffered. This corresponds more closely with JVM practice and
with the now unbuffered equivalent input stream.
If one needs the stream to be buffered, one should wrap the result of
Process.getOutputStream()ina
BufferedOutputStreamor other class documented as buffered..