Skip to content

Conversation

@LeeTibbert
Copy link
Contributor

@LeeTibbert LeeTibbert commented Jan 16, 2025

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 ProcessTest concurrentTest. I am trying
to 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 Process to send output to the sub-process it creates
is 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() in
a BufferedOutputStream or other class documented as buffered..

@LeeTibbert
Copy link
Contributor Author

LeeTibbert commented Jan 16, 2025

One of the 4 Windows tests failed. The failure was in the concurrent test.

Looks to me I need to fix Issue #4164 before proceeding with this PR.

Marking this as "Draft".

@LeeTibbert LeeTibbert marked this pull request as draft January 16, 2025 21:45
@LeeTibbert LeeTibbert changed the title Fix #4167: javalib PipeIO output is now direct Chasing Windows ProcessTest intermittent failure Jan 17, 2025
@LeeTibbert
Copy link
Contributor Author

This draft PR has served its purpose and served it well. The nature of ProcessTest failures
have evolved, partially based on fixed discovered in this draft.

@LeeTibbert LeeTibbert closed this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants