Re: [12] 8194899: Remove unused sun.net classes
On Jul 2, 2018, at 10:23 AM, Alan Bateman wrote: > On 02/07/2018 18:21, Brian Burkhalter wrote: >> https://bugs.openjdk.java.net/browse/JDK-8194899 >> >> The proposed change is to remove these classes which are unused in the JDK: >> >> sun.net.NetworkServer >> sun.net.URLCanonicalizer >> > Should be okay, assuming the JDK builds and there aren't any tests using it. It was fine before the 12 fork but I am going to rebuild and re-run the tests again to be sure. Thanks, Brian
Re: [12] 8194899: Remove unused sun.net classes
On 02/07/2018 18:21, Brian Burkhalter wrote: https://bugs.openjdk.java.net/browse/JDK-8194899 The proposed change is to remove these classes which are unused in the JDK: sun.net.NetworkServer sun.net.URLCanonicalizer Should be okay, assuming the JDK builds and there aren't any tests using it. -Alan
[12] 8194899: Remove unused sun.net classes
https://bugs.openjdk.java.net/browse/JDK-8194899 The proposed change is to remove these classes which are unused in the JDK: sun.net.NetworkServer sun.net.URLCanonicalizer Thanks, Brian
8206145 : dbgsysSocketClose - do not restart close if errno is EINTR [linux] - was : RE: RFR : 8205959 : Do not restart close if errno is EINTR
I created a bug and a webrev , please review . https://bugs.openjdk.java.net/browse/JDK-8206145 http://cr.openjdk.java.net/~mbaesken/webrevs/8206145/ ( The other bug where a similar issue was addressed is https://bugs.openjdk.java.net/browse/JDK-8205959 ) Best regards, Matthias > -Original Message- > From: Thomas Stüfe [mailto:thomas.stu...@gmail.com] > Sent: Montag, 2. Juli 2018 12:08 > To: Baesken, Matthias ; Langer, Christoph > > Cc: serviceability-dev (serviceability-...@openjdk.java.net) d...@openjdk.java.net>; Stuefe, Thomas ; net- > d...@openjdk.java.net > Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > > +1. Please fix this for Linux! Thanks. > > On Mon, Jul 2, 2018 at 11:03 AM, Langer, Christoph > wrote: > > Hi Matthias, > > > > forwarding to serviceability-dev, because debugging is usually discussed > there. > > > > Yes, I would think this coding should be fixed, too. Can you open a bug and > prepare a change? > > > > Thanks > > Christoph > > > >> -Original Message- > >> From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > >> Norman Maurer > >> Sent: Montag, 2. Juli 2018 10:23 > >> To: Baesken, Matthias > >> Cc: Stuefe, Thomas ; net- > d...@openjdk.java.net > >> Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > >> > >> +1 retry a close on EINTR has most likely not the outcome you expect and > >> may even close a wrong FD if the same FD is reused already (as even if > EINTR > >> is returned it may have closed the FD) > >> > >> > Am 02.07.2018 um 10:17 schrieb Baesken, Matthias > >> : > >> > > >> > Hello , there is a similar pattern (attempt to restart close in case of > EINTR) > >> in the coding as well in socket_md.c : > >> > > >> > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-147-int rv; > >> > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-148-do { > >> > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-149-rv = > >> close(fd); > >> > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:150:} while > (rv > >> == -1 && errno == EINTR); > >> > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-151- > >> > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-152-return > rv; > >> > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-153-} > >> > > >> > Do you think this needs adjustment (on LINUX) as well ? > >> > > >> > Best regards, Matthias > >> > > >> > > >> >> Message: 2 > >> >> Date: Thu, 28 Jun 2018 18:19:46 +0100 > >> >> From: Alan Bateman > >> >> To: David Lloyd , > ivan.gerasi...@oracle.com > >> >> Cc: OpenJDK Network Dev list > >> >> Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > >> >> Message-ID: <3fd1496f-ab83-a2d5-0699-13c8b735d...@oracle.com> > >> >> Content-Type: text/plain; charset=utf-8; format=flowed > >> >> > >> >>> On 28/06/2018 17:35, David Lloyd wrote: > >> >>> : > >> >>> Do you (or Alan) think that this might have accounted for real-world > >> >>> connection problems? > >> >>> > >> >> In the file I/O area, with NFS I think, we had an issue a long time ago > >> >> where close was retried after EIO. That issue was fixed a long time ago > >> >> but it's one that comes to mind in this general area. > >> >> > >> >> -Alan > >> >> > >> >
Re: RFR : 8205959 : Do not restart close if errno is EINTR
I think because the only two possible outcomes are either that the FD was not dup'd, in which case things carry on as before, or that it was dup'd, in which case (at least in the JVM) re-dupping won't really do anything harmful since the target FD already references the dead socket FD. The POSIX manpage doesn't seem to include any other possibilities. On Mon, Jul 2, 2018 at 7:04 AM David Holmes wrote: > > In reference to 8205959, where is it stated that dup2 is any more > restartable than close ?? > > AFAICS both leave things undefined/unspecified if they set EINTR. > > David > > On 2/07/2018 7:03 PM, Langer, Christoph wrote: > > Hi Matthias, > > > > forwarding to serviceability-dev, because debugging is usually discussed > > there. > > > > Yes, I would think this coding should be fixed, too. Can you open a bug and > > prepare a change? > > > > Thanks > > Christoph > > > >> -Original Message- > >> From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > >> Norman Maurer > >> Sent: Montag, 2. Juli 2018 10:23 > >> To: Baesken, Matthias > >> Cc: Stuefe, Thomas ; net-dev@openjdk.java.net > >> Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > >> > >> +1 retry a close on EINTR has most likely not the outcome you expect and > >> may even close a wrong FD if the same FD is reused already (as even if > >> EINTR > >> is returned it may have closed the FD) > >> > >>> Am 02.07.2018 um 10:17 schrieb Baesken, Matthias > >> : > >>> > >>> Hello , there is a similar pattern (attempt to restart close in case of > >>> EINTR) > >> in the coding as well in socket_md.c : > >>> > >>> src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-147-int rv; > >>> src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-148-do { > >>> src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-149-rv = > >> close(fd); > >>> src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:150:} while > >>> (rv > >> == -1 && errno == EINTR); > >>> src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-151- > >>> src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-152-return rv; > >>> src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-153-} > >>> > >>> Do you think this needs adjustment (on LINUX) as well ? > >>> > >>> Best regards, Matthias > >>> > >>> > Message: 2 > Date: Thu, 28 Jun 2018 18:19:46 +0100 > From: Alan Bateman > To: David Lloyd , ivan.gerasi...@oracle.com > Cc: OpenJDK Network Dev list > Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > Message-ID: <3fd1496f-ab83-a2d5-0699-13c8b735d...@oracle.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > > On 28/06/2018 17:35, David Lloyd wrote: > > : > > Do you (or Alan) think that this might have accounted for real-world > > connection problems? > > > In the file I/O area, with NFS I think, we had an issue a long time ago > where close was retried after EIO. That issue was fixed a long time ago > but it's one that comes to mind in this general area. > > -Alan > > >>> -- - DML
Re: RFR : 8205959 : Do not restart close if errno is EINTR
In reference to 8205959, where is it stated that dup2 is any more restartable than close ?? AFAICS both leave things undefined/unspecified if they set EINTR. David On 2/07/2018 7:03 PM, Langer, Christoph wrote: Hi Matthias, forwarding to serviceability-dev, because debugging is usually discussed there. Yes, I would think this coding should be fixed, too. Can you open a bug and prepare a change? Thanks Christoph -Original Message- From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of Norman Maurer Sent: Montag, 2. Juli 2018 10:23 To: Baesken, Matthias Cc: Stuefe, Thomas ; net-dev@openjdk.java.net Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR +1 retry a close on EINTR has most likely not the outcome you expect and may even close a wrong FD if the same FD is reused already (as even if EINTR is returned it may have closed the FD) Am 02.07.2018 um 10:17 schrieb Baesken, Matthias : Hello , there is a similar pattern (attempt to restart close in case of EINTR) in the coding as well in socket_md.c : src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-147-int rv; src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-148-do { src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-149-rv = close(fd); src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:150:} while (rv == -1 && errno == EINTR); src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-151- src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-152-return rv; src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-153-} Do you think this needs adjustment (on LINUX) as well ? Best regards, Matthias Message: 2 Date: Thu, 28 Jun 2018 18:19:46 +0100 From: Alan Bateman To: David Lloyd , ivan.gerasi...@oracle.com Cc: OpenJDK Network Dev list Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR Message-ID: <3fd1496f-ab83-a2d5-0699-13c8b735d...@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed On 28/06/2018 17:35, David Lloyd wrote: : Do you (or Alan) think that this might have accounted for real-world connection problems? In the file I/O area, with NFS I think, we had an issue a long time ago where close was retried after EIO. That issue was fixed a long time ago but it's one that comes to mind in this general area. -Alan
RE: RFR : 8205959 : Do not restart close if errno is EINTR
Hi Matthias, forwarding to serviceability-dev, because debugging is usually discussed there. Yes, I would think this coding should be fixed, too. Can you open a bug and prepare a change? Thanks Christoph > -Original Message- > From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > Norman Maurer > Sent: Montag, 2. Juli 2018 10:23 > To: Baesken, Matthias > Cc: Stuefe, Thomas ; net-dev@openjdk.java.net > Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > > +1 retry a close on EINTR has most likely not the outcome you expect and > may even close a wrong FD if the same FD is reused already (as even if EINTR > is returned it may have closed the FD) > > > Am 02.07.2018 um 10:17 schrieb Baesken, Matthias > : > > > > Hello , there is a similar pattern (attempt to restart close in case of > > EINTR) > in the coding as well in socket_md.c : > > > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-147-int rv; > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-148-do { > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-149-rv = > close(fd); > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:150:} while (rv > == -1 && errno == EINTR); > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-151- > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-152-return rv; > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-153-} > > > > Do you think this needs adjustment (on LINUX) as well ? > > > > Best regards, Matthias > > > > > >> Message: 2 > >> Date: Thu, 28 Jun 2018 18:19:46 +0100 > >> From: Alan Bateman > >> To: David Lloyd , ivan.gerasi...@oracle.com > >> Cc: OpenJDK Network Dev list > >> Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > >> Message-ID: <3fd1496f-ab83-a2d5-0699-13c8b735d...@oracle.com> > >> Content-Type: text/plain; charset=utf-8; format=flowed > >> > >>> On 28/06/2018 17:35, David Lloyd wrote: > >>> : > >>> Do you (or Alan) think that this might have accounted for real-world > >>> connection problems? > >>> > >> In the file I/O area, with NFS I think, we had an issue a long time ago > >> where close was retried after EIO. That issue was fixed a long time ago > >> but it's one that comes to mind in this general area. > >> > >> -Alan > >> > >
Re: RFR : 8205959 : Do not restart close if errno is EINTR
+1 retry a close on EINTR has most likely not the outcome you expect and may even close a wrong FD if the same FD is reused already (as even if EINTR is returned it may have closed the FD) > Am 02.07.2018 um 10:17 schrieb Baesken, Matthias : > > Hello , there is a similar pattern (attempt to restart close in case of > EINTR) in the coding as well in socket_md.c : > > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-147-int rv; > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-148-do { > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-149-rv = > close(fd); > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:150:} while (rv > == -1 && errno == EINTR); > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-151- > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-152-return rv; > src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-153-} > > Do you think this needs adjustment (on LINUX) as well ? > > Best regards, Matthias > > >> Message: 2 >> Date: Thu, 28 Jun 2018 18:19:46 +0100 >> From: Alan Bateman >> To: David Lloyd , ivan.gerasi...@oracle.com >> Cc: OpenJDK Network Dev list >> Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR >> Message-ID: <3fd1496f-ab83-a2d5-0699-13c8b735d...@oracle.com> >> Content-Type: text/plain; charset=utf-8; format=flowed >> >>> On 28/06/2018 17:35, David Lloyd wrote: >>> : >>> Do you (or Alan) think that this might have accounted for real-world >>> connection problems? >>> >> In the file I/O area, with NFS I think, we had an issue a long time ago >> where close was retried after EIO. That issue was fixed a long time ago >> but it's one that comes to mind in this general area. >> >> -Alan >> >
RE: RFR : 8205959 : Do not restart close if errno is EINTR
Hello , there is a similar pattern (attempt to restart close in case of EINTR) in the coding as well in socket_md.c : src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-147-int rv; src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-148-do { src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-149-rv = close(fd); src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:150:} while (rv == -1 && errno == EINTR); src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-151- src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-152-return rv; src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c-153-} Do you think this needs adjustment (on LINUX) as well ? Best regards, Matthias > Message: 2 > Date: Thu, 28 Jun 2018 18:19:46 +0100 > From: Alan Bateman > To: David Lloyd , ivan.gerasi...@oracle.com > Cc: OpenJDK Network Dev list > Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR > Message-ID: <3fd1496f-ab83-a2d5-0699-13c8b735d...@oracle.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > On 28/06/2018 17:35, David Lloyd wrote: > > : > > Do you (or Alan) think that this might have accounted for real-world > > connection problems? > > > In the file I/O area, with NFS I think, we had an issue a long time ago > where close was retried after EIO. That issue was fixed a long time ago > but it's one that comes to mind in this general area. > > -Alan >