On Wed, Nov 24, 2021 at 02:13:20AM +0300, Alexandr Miloslavskiy wrote: > Indeed there was a race condition where TunnelAgent could begin writing at > the same time when pipe is being closed. This resulted in an unexpected > IOException, which was detected by the test.
> Please find the patch attached. > Index: > subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java > =================================================================== > --- > subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java > (revision 1895276) > +++ > subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java > (working copy) > @@ -4676,7 +4676,19 @@ > // RuntimeException("Test exception") is expected here > } > > - tunnelAgent.joinAndTest(); > + // In this test, there is a race condition that sometimes results in > + // IOException when 'WAIT_TUNNEL' tries to read from a pipe that > + // already has its read end closed. This is not an error, but > + // it's hard to distinguish this case from other IOException which > + // indicate a problem. To reproduce, simply wrap this test's body in > + // a loop. The workaround is to ignore any detected IOException. > + // > + // tunnelAgent.joinAndTest(); > + try { > + tunnelAgent.join(); > + } catch (InterruptedException e) { The comment says IOException, but this is InterruptedException. Is that intentional? > + e.printStackTrace (); > + } > } > > /** -- James GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB