Re: RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Alan Bateman
On 14/03/2018 15:11, Chris Hegarty wrote: On 14/03/18 14:58, Alan Bateman wrote: We can add a toString() to SelectionKeyImpl if needed as it can access the interest and readys ops without concern for cancel. Yes, that would be fine either. Since you have an outstanding review that contains ch

RE: 8199329: Remove code that attempts to read bytes after connection reset reported

2018-03-14 Thread Langer, Christoph
Hi Alan, looks good to me, +1. Best regards Christoph > -Original Message- > From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > Alan Bateman > Sent: Mittwoch, 14. März 2018 15:31 > To: OpenJDK Network Dev list > Subject: 8199329: Remove code that attempts to read byt

Re: 8199329: Remove code that attempts to read bytes after connection reset reported

2018-03-14 Thread Chris Hegarty
On 14/03/18 14:30, Alan Bateman wrote: Classic networking has some curious code to deal with connection resets. I needed to dig into ancient history to find the issues and original motivations. When a connection reset is reported (usually ECONNRESET) then further attempts to read from the

Re: RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Chris Hegarty
On 14/03/18 14:58, Alan Bateman wrote: We can add a toString() to SelectionKeyImpl if needed as it can access the interest and readys ops without concern for cancel. Yes, that would be fine either. Since you have an outstanding review that contains changes to SelectionKeyImpl, do you wanna inc

Re: 8199329: Remove code that attempts to read bytes after connection reset reported

2018-03-14 Thread Claes Redestad
Looks good to me. /Claes On 2018-03-14 15:30, Alan Bateman wrote: Classic networking has some curious code to deal with connection resets. I needed to dig into ancient history to find the issues and original motivations. When a connection reset is reported (usually ECONNRESET) then further

Re: RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Alan Bateman
We can add a toString() to SelectionKeyImpl if needed as it can access the interest and readys ops without concern for cancel. -Alan On 14/03/2018 14:51, Chris Hegarty wrote: On 14/03/18 14:39, Daniel Fuchs wrote: Hi Chris, key.interestOps() might throw CancelledKeyException in which case yo

Re: RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Daniel Fuchs
Looks good Chris! cheers, -- daniel On 14/03/2018 14:51, Chris Hegarty wrote: On 14/03/18 14:39, Daniel Fuchs wrote: Hi Chris, key.interestOps() might throw CancelledKeyException in which case you may trade an AssertionError for a CancelledKeyException when building the assertion message. M

Re: RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Chris Hegarty
On 14/03/18 14:39, Daniel Fuchs wrote: Hi Chris, key.interestOps() might throw CancelledKeyException in which case you may trade an AssertionError for a CancelledKeyException when building the assertion message. Maybe some of the other methods you call on key need to be checked as well. Good

Re: 8199329: Remove code that attempts to read bytes after connection reset reported

2018-03-14 Thread David Lloyd
+1 from me (non-reviewer). Semantically, it is impossible to distinguish the difference between the OS dropping bytes when it receives an RST compared to Java doing the same thing, so there is no observable behavior change here AFAICT. On Wed, Mar 14, 2018 at 9:30 AM, Alan Bateman wrote: > > Cla

Re: RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Daniel Fuchs
Hi Chris, key.interestOps() might throw CancelledKeyException in which case you may trade an AssertionError for a CancelledKeyException when building the assertion message. Maybe some of the other methods you call on key need to be checked as well. best regards, -- daniel On 14/03/2018 14:05,

8199329: Remove code that attempts to read bytes after connection reset reported

2018-03-14 Thread Alan Bateman
Classic networking has some curious code to deal with connection resets. I needed to dig into ancient history to find the issues and original motivations. When a connection reset is reported (usually ECONNRESET) then further attempts to read from the socket will typically return -1 (EOF). Cl

Re: RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Alan Bateman
Looks good. On 14/03/2018 13:16, Chris Hegarty wrote: An odd assertion has been observed in the com.sun.net HTTP Server code, that is currently unexplainable. I'd like to add some additional diagnostics information to the assertion so that it may be more helpful if seen again. --- a/src/jdk.ht

RFR 8199437 [11]Improve diagnostic system assertion message in com.sun.net.httpserver impl

2018-03-14 Thread Chris Hegarty
An odd assertion has been observed in the com.sun.net HTTP Server code, that is currently unexplainable. I'd like to add some additional diagnostics information to the assertion so that it may be more helpful if seen again. --- a/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.jav