-
Bug
-
Resolution: Fixed
-
P4
-
11
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204816 | 11.0.1 | Alan Bateman | P4 | Resolved | Fixed | team |
ADDITIONAL SYSTEM INFORMATION :
$ uname -a
Linux ubuntu-dev 4.4.0-124-generic #148-Ubuntu SMP Wed May 2 13:00:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ java -version
java version "11-ea" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11-ea+15)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11-ea+15, mixed mode)
A DESCRIPTION OF THE PROBLEM :
When a write fails with a connection-reset when using Socket its not possible to read any remaining data from the Socket. This should be possible and was possible in previous java versions.
More details on the issue can be found here:
http://mail.openjdk.java.net/pipermail/net-dev/2018-May/011511.html
REGRESSION : Last worked in version 11 b04 ( prior toJDK-8199329)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the netty testsuite, or just this test:
https://github.com/netty/netty/blob/netty-4.1.25.Final/testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketHalfClosedTest.java#L231
$ cd testsuite
$ ../mvnw clean test -Dtest=SocketHalfClosedTest#testAutoCloseFalseDoesShutdownOutput
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should be possible to read data from a socket if there is remaining data left and write causes a connection reset.
ACTUAL -
As soon as a connection reset happened on a write, read also throws a SocketException.
---------- BEGIN SOURCE ----------
https://github.com/netty/netty/blob/netty-4.1.25.Final/testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketHalfClosedTest.java#L231
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none...
FREQUENCY : always
$ uname -a
Linux ubuntu-dev 4.4.0-124-generic #148-Ubuntu SMP Wed May 2 13:00:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ java -version
java version "11-ea" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11-ea+15)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11-ea+15, mixed mode)
A DESCRIPTION OF THE PROBLEM :
When a write fails with a connection-reset when using Socket its not possible to read any remaining data from the Socket. This should be possible and was possible in previous java versions.
More details on the issue can be found here:
http://mail.openjdk.java.net/pipermail/net-dev/2018-May/011511.html
REGRESSION : Last worked in version 11 b04 ( prior to
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the netty testsuite, or just this test:
https://github.com/netty/netty/blob/netty-4.1.25.Final/testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketHalfClosedTest.java#L231
$ cd testsuite
$ ../mvnw clean test -Dtest=SocketHalfClosedTest#testAutoCloseFalseDoesShutdownOutput
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should be possible to read data from a socket if there is remaining data left and write causes a connection reset.
ACTUAL -
As soon as a connection reset happened on a write, read also throws a SocketException.
---------- BEGIN SOURCE ----------
https://github.com/netty/netty/blob/netty-4.1.25.Final/testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketHalfClosedTest.java#L231
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none...
FREQUENCY : always
- backported by
-
JDK-8204816 Not possible to read data from socket after write detects connection reset
-
- Resolved
-
- relates to
-
JDK-8199329 Remove code that attempts to read bytes after connection reset reported
-
- Closed
-