Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-13 Thread Vyom Tewari
i [ mailto:vyom.tew...@oracle.com ] Sent: Donnerstag, 8. September 2016 05:20 To: Langer, Christoph Cc: net-dev@openjdk.java.net Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set Hi All, Please find the latest webrev( http://cr.openjdk.java.net/~vt

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-13 Thread Langer, Christoph
. September 2016 10:48 > To: Vyom Tewari > Cc: net-dev@openjdk.java.net > Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with > soTimeout set > > Vyom, > > > On 13 Sep 2016, at 04:00, Vyom Tewari wrote: > > > > any comment on latest > w

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-13 Thread Chris Hegarty
needed in SocketInputStream.c - >>> maybe not even now as it is. >>> >>> Best regards >>> Christoph >>> >>> >>>> -----Original Message- >>>> From: Vyom Tewari [ >>>> mailto:vyom.tew...@oracle.com >

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-12 Thread Vyom Tewari
e should probably be a static function inside net_util_md.c (static long getCurrentTime()). Best Christoph -Original Message- From: Vyom Tewari [mailto:vyom.tew...@oracle.com] Sent: Mittwoch, 7. September 2016 18:31 To: Langer, Christoph Cc:net-dev@openjdk.java.net; Chris Hegarty Subject: Re: RFR 8075

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-08 Thread Vyom Tewari
stag, 8. September 2016 05:20 To: Langer, Christoph Cc: net-dev@openjdk.java.net Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set Hi All, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.5/index.html <http://cr.openjdk.java.net/%7

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-08 Thread Langer, Christoph
-dev@openjdk.java.net > Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with > soTimeout set > > Hi All, > > Please find the latest > webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.5/index.html > <http://cr.openjdk.java.net/%7Evtewari/8

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-08 Thread Vyom Tewari
Chris Hegarty Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set Hi Chris, Sorry I was mostly focusing on our test failure first, i will check your suggestions. Thanks, Vyom On Wednesday 07 September 2016 08:44 PM, Langer, Christoph wrote: Hi Vyom,

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-08 Thread Vyom Tewari
ph -Original Message- From: Vyom Tewari [mailto:vyom.tew...@oracle.com] Sent: Mittwoch, 7. September 2016 18:31 To: Langer, Christoph Cc: net-dev@openjdk.java.net; Chris Hegarty Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set Hi Chris, Sorry I

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-08 Thread Langer, Christoph
rom: Vyom Tewari [mailto:vyom.tew...@oracle.com] > Sent: Mittwoch, 7. September 2016 18:31 > To: Langer, Christoph > Cc: net-dev@openjdk.java.net; Chris Hegarty > Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with > soTimeout set > > Hi Chris, > &

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-07 Thread Vyom Tewari
75484:SocketInputStream.socketRead0 can hang even with soTimeout set Hi All, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.4/index.html <http://cr.openjdk.java.net/%7Evtewari/8075484/webrev0.4/index.html>). there were some test failures in JPRT and Chris also pointed the sa

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-07 Thread Langer, Christoph
Tewari > Sent: Mittwoch, 7. September 2016 17:10 > To: Chris Hegarty > Cc: net-dev@openjdk.java.net > Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with > soTimeout set > > Hi All, > > Please find the latest > webrev(http://cr.openjdk.java.net/~

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-07 Thread Vyom Tewari
Hi All, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.4/index.html ). there were some test failures in JPRT and Chris also pointed the same issue in modified code. Now with latest code JPRT

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-07 Thread Langer, Christoph
mber 2016 11:20 > To: 'Vyom Tewari' > Cc: net-dev@openjdk.java.net; Chris Hegarty > Subject: RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with > soTimeout set > > Hi Vyom, > > I'll do an AIX build with your patch and let you know later today.

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-07 Thread Chris Hegarty
On 07/09/16 07:45, Vyom Tewari wrote: Hi Chris, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.3/index.html ). I did some code refactoring, JPRT is in progress. In terms of NET_Timeout**, I

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-07 Thread Langer, Christoph
garty > Cc: net-dev@openjdk.java.net > Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with > soTimeout set > > Hi Chris, > > Please find the latest > webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.3/index.html > <http://cr.openjdk.jav

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-06 Thread Vyom Tewari
Hi Chris, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.3/index.html ). I did some code refactoring, JPRT is in progress. I need help from some one to build and test latest changes on AIX,

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-06 Thread Mark Sheppard
my error ... i perceived NET_Timeout as a common function across all platforms otherwise I would have suggested a NET_TimeoutWithCurrentTime for each platform. providing a version of NET_Timeout with a recv function sound good, but will require a version per platform (NET_TimeoutWithRecv) and

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-06 Thread Vyom Tewari
On Tuesday 06 September 2016 06:25 PM, Chris Hegarty wrote: Vyom, On 6 Sep 2016, at 10:20, Vyom Tewari wrote: Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.2/index.html ). I have

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-06 Thread Chris Hegarty
Vyom, > On 6 Sep 2016, at 10:20, Vyom Tewari wrote: > > Hi, > > Please find the latest > webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.2/index.html > ). I have > incorporated the review comments. Your changes c

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-06 Thread Dmitry Samersoff
Vyom, Looks good for me! SocketInputStream.c:68 It's better to check for both EAGAIN and EINTR after poll() (no need to re-review). -Dmitry On 2016-09-06 12:20, Vyom Tewari wrote: > Hi, > > Please find the latest > webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.2/index.html >

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-06 Thread Mark Sheppard
looks fine ... thanks regards Mark On 06/09/2016 10:20, Vyom Tewari wrote: Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.2/index.html ). I have incorporated the review comments. Th

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-06 Thread Vyom Tewari
Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.2/index.html ). I have incorporated the review comments. Thanks, Vyom On Monday 05 September 2016 08:37 PM, Chris Hegarty wrote: On 05

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-05 Thread Chris Hegarty
On 05/09/16 15:37, Mark Sheppard wrote: if the desire is to avoid making double calls on gettimeofday in the NET_ReadWithTimeout's while loop for its main call flow, Yes, the desire is to make no more calls to gettimeofday, than are already done. then consider a modification to NET_Timeout a

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-05 Thread Mark Sheppard
if the desire is to avoid making double calls on gettimeofday in the NET_ReadWithTimeout's while loop for its main call flow, then consider a modification to NET_Timeout and create a version int NET_TimeoutWithCurrentTime(int s, long timeout, stuct timeval * current_time) int NET_TimeoutWith

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-05 Thread Chris Hegarty
Vyom, >>> webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.1/index.html There is some concern about the potential performance effect, etc, of gettimeofday, maybe there is a way out of this. The reuse of NET_Timeout is good, but it also calls gettimeofday. It seems that a specific NET_R

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-02 Thread Dmitry Samersoff
Vyom, > thanks for review, I did consider to use a monotonically increasing > clock like "clock_gettime" but existing nearby code("NET_Timeout") > uses "gettimeofday" so i choose to be consistent with the existing > code. OK. The fix looks good for me. -Dmitry On 2016-09-02 06:39, Vyom Tewa

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-01 Thread Vyom Tewari
hi Dimitry, thanks for review, I did consider to use a monotonically increasing clock like "clock_gettime" but existing nearby code("NET_Timeout") uses "gettimeofday" so i choose to be consistent with the existing code. Thanks, Vyom On Friday 02 September 2016 01:38 AM, Dmitry Samersoff

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-01 Thread Bernd Eckenfels
Am Thu, 1 Sep 2016 23:08:15 +0300 schrieb Dmitry Samersoff : > gettimeofday is affected by system time changes, so running ntpd can > cause unpredictable behavior of this code. Also it's rather expensive > syscall. At least on Linux It is actually not a syscall at all and very performant (on Linu

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-01 Thread Dmitry Samersoff
Vyom, Did you consider to use select() to calculate timeout instead of gettimeofday ? gettimeofday is affected by system time changes, so running ntpd can cause unpredictable behavior of this code. Also it's rather expensive syscall. -Dmitry On 2016-09-01 19:03, Vyom Tewari wrote: > please find

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-01 Thread Langer, Christoph
+1 From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of Mark Sheppard Sent: Donnerstag, 1. September 2016 19:51 To: Vyom Tewari ; net-dev@openjdk.java.net Subject: Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set Hi Vyom, thanks for doing the

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-01 Thread Mark Sheppard
Hi Vyom, thanks for doing the refactoring. changes look OK to me regards Mark On 01/09/2016 17:03, Vyom Tewari wrote: please find the updated webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.1/index.html ). I

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-09-01 Thread Vyom Tewari
please find the updated webrev(http://cr.openjdk.java.net/~vtewari/8075484/webrev0.1/index.html ). I incorporated the review comments. Thanks, Vyom On Tuesday 30 August 2016 04:11 PM, Mark Sheppard wrote: Hi perhaps the

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-08-30 Thread Vyom Tewari
Hi Mark, Thanks for the review, even i don't like "goto" , i wanted to do code changes as less as possible(not even refactoring) and "goto" helped me in this. I will incorporate the review comment and send the modified webrev. Thanks, Vyom On 8/30/2016 4:11 PM, Mark Sheppard wrote: Hi

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-08-30 Thread Mark Sheppard
Hi perhaps there is an opportunity to do some refactoring here (... for me a "goto " carries a code smell! ) along the lines if (timeout) { nread = NET_ReadWithTimeout(...); } else { nread = NET_Read(...); } the NET_ReadWithTimeout (...) function will contain a restructuring of

Re: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-08-29 Thread Vyom Tewari
gentle reminder, please review the below code change. Vyom On Monday 22 August 2016 05:12 PM, Vyom Tewari wrote: Hi All, Please review the code changes for below issue. Bug : https://bugs.openjdk.java.net/browse/JDK-8075484 webrev: http://cr.openjdk.java.net/~vtewari/8075484/we

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-08-22 Thread Langer, Christoph
> > From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > Vyom > > Tewari > > Sent: Montag, 22. August 2016 13:42 > > To: net-dev > > Subject: RFR 8075484:SocketInputStream.socketRead0 can hang even with > > soTimeout set > > > >

RE: RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-08-22 Thread Langer, Christoph
I'l llet you know. Please also not, that I'm not an official reviewer. Best regards Christoph > -Original Message- > From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of Vyom > Tewari > Sent: Montag, 22. August 2016 13:42 > To: net-dev > Subjec

RFR 8075484:SocketInputStream.socketRead0 can hang even with soTimeout set

2016-08-22 Thread Vyom Tewari
Hi All, Please review the code changes for below issue. Bug : https://bugs.openjdk.java.net/browse/JDK-8075484 webrev: http://cr.openjdk.java.net/~vtewari/8075484/webrev0.0/index.html This issue is SocketInputS