Re: Problem with half-closure related to connection-reset in Java 11

2018-05-31 Thread Norman Maurer



> Am 29.05.2018 um 22:49 schrieb Alan Bateman :
> 
>> On 29/05/2018 17:28, Norman Maurer wrote:
>> :
>> Oh sorry I thought thats the right system to use. I just followed the wiki 
>> page (I think).
> bugs.sun.com or bugreport.java.com is the right place. That routes the bugs 
> to the JIRA, just not automatically to the right project as often issues need 
> to be filtered or deleted. The bug tracking is JDK-8203937 [1].
> 
> 
>> :
>> Well it seems like it worked before on linux as well ? I mean with Java10 it 
>> seems to at least not fail on linux the same way as now.
>> 
> The only platform that I'm aware of that will report the reset when reading 
> and allow reading beyond the reset is Solaris and this is only because of the 
> way that it reports networking errors to applications. I think the behavior 
> change you observe is because the reset is reported when writing and this is 
> impacting the reading from the java.net.Socket. This is really odd behavior 
> that has been there since JDK 1.4, just not noticed because it would attempt 
> to read until it got the reset. This is all unspecified behavior so this is 
> why the testing with the changes in JDK 11 didn't show up anything. I agree 
> we should just eliminate this so that it doesn't impact the read.
> 
> Would you have cycles to create a small, and standalone test, that 
> demonstrates the issue? This could be something we turn into a regression 
> test to test behavior.
> 
> -Alan
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8203937

Also let me know if you need anything else or want me to test something

Bye
Norman

Re: Problem with half-closure related to connection-reset in Java 11

2018-05-31 Thread Alan Bateman




On 31/05/2018 18:08, Norman Maurer wrote:

:

[1] https://bugs.openjdk.java.net/browse/JDK-8203937

Also let me know if you need anything else or want me to test something

I saw your other mail where you posted a link to giithub. I should have 
replied to ask you to attach the test so that it comes via OpenJDK 
infrastructure.


In any case, I was able to create another test case to demonstrate the 
behavior difference between JDK 10 and 11 and I've attached it to the 
bug. It's as you described: the connection reset is detected when 
writing and a subsequent reading fails eagerly when you expect to first 
consume any bytes that may have been received before the connection was 
reset. The behavior change is specific to Linux, it doesn't happen on 
macOS as the error is reported as a pipe write error; On Windows it 
consistently reports an error after the reset is detected so I doubt the 
test case ever passed there.


In summary, there is a behavior change, at least on Linux and I have a 
patch to restore the old behavior, it just unspecified behavior and not 
something that anything could really rely on.


-Alan



Re: Problem with half-closure related to connection-reset in Java 11

2018-05-31 Thread Norman Maurer



> Am 31.05.2018 um 20:41 schrieb Alan Bateman :
> 
> 
> 
>> On 31/05/2018 18:08, Norman Maurer wrote:
>> :
>>> [1] https://bugs.openjdk.java.net/browse/JDK-8203937
>> Also let me know if you need anything else or want me to test something
>> 
> I saw your other mail where you posted a link to giithub. I should have 
> replied to ask you to attach the test so that it comes via OpenJDK 
> infrastructure.
> 
> In any case, I was able to create another test case to demonstrate the 
> behavior difference between JDK 10 and 11 and I've attached it to the bug. 
> It's as you described: the connection reset is detected when writing and a 
> subsequent reading fails eagerly when you expect to first consume any bytes 
> that may have been received before the connection was reset. The behavior 
> change is specific to Linux, it doesn't happen on macOS as the error is 
> reported as a pipe write error; On Windows it consistently reports an error 
> after the reset is detected so I doubt the test case ever passed there.
> 
> In summary, there is a behavior change, at least on Linux and I have a patch 
> to restore the old behavior, it just unspecified behavior and not something 
> that anything could really rely on.
> 
> -Alan
> 

Yeah we only ran the test on Linux and MacOS so no idea about Windows here . 
Thanks for taking care, I will check and keep track of the issue.

Bye
Norman