RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException

2021-10-14 Thread Daniel Jeliński
Per Java documentation, "[Error](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/Error.java#L30) [..] indicates serious problems that a reasonable application should not try to catch". Failure to enumerate network interfaces or addresses is not a serious enough

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException

2021-10-15 Thread Daniel Jeliński
On Fri, 15 Oct 2021 03:30:49 GMT, Jaikiran Pai wrote: >> Per Java documentation, >> "[Error](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/Error.java#L30) >> [..] indicates serious problems that a reasonable application should not >> try to catch". Failure to

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException

2021-10-15 Thread Daniel Jeliński
On Fri, 15 Oct 2021 11:22:23 GMT, Daniel Fuchs wrote: > we need to examine each of these on a case-by-case basis Makes sense. 1. `MultiByteToWideChar` case: we can change this to `InternalError`, as it's not supposed to happen and apparently not happening 2. [GetIfTable](https://docs.microsof

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v2]

2021-10-18 Thread Daniel Jeliński
it. > > `tier1` tests pass, `java.net` tests pass. No new regression tests as I > couldn't find any list of steps to reproduce the problem. > > I don't have write access to JBS. I could use some help with creating a > ticket. Daniel Jeliński has updated the pull

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v2]

2021-10-18 Thread Daniel Jeliński
On Mon, 18 Oct 2021 16:03:35 GMT, Daniel Jeliński wrote: >> Per Java documentation, >> "[Error](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/Error.java#L30) >> [..] indicates serious problems that a reasonable application shou

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v3]

2021-10-18 Thread Daniel Jeliński
it. > > `tier1` tests pass, `java.net` tests pass. No new regression tests as I > couldn't find any list of steps to reproduce the problem. > > I don't have write access to JBS. I could use some help with creating a > ticket. Daniel Jeliński has updated the pull req

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v3]

2021-10-18 Thread Daniel Jeliński
On Mon, 18 Oct 2021 16:57:10 GMT, Daniel Jeliński wrote: >> Per Java documentation, >> "[Error](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/Error.java#L30) >> [..] indicates serious problems that a reasonable application shou

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v3]

2021-10-18 Thread Daniel Jeliński
On Mon, 18 Oct 2021 16:57:10 GMT, Daniel Jeliński wrote: >> Per Java documentation, >> "[Error](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/Error.java#L30) >> [..] indicates serious problems that a reasonable application shou

RFR: 8262442 (windows) use all proxy configuration sources when java.net.useSystemProxies=true

2021-10-18 Thread Daniel Jeliński
With this patch DefaultProxySelector first attempts to use proxy config autodetection (http://wpad/wpad.dat) when that is configured and available. If proxy config autodetection is unavailable, selector tries to use configured proxy script (again, if configured and available) If both the above op

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v3]

2021-10-19 Thread Daniel Jeliński
On Tue, 19 Oct 2021 06:45:58 GMT, Alan Bateman wrote: >> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix crash on GetIpAddrTable error > > src/java.base/windows/native/libnet/Net

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v3]

2021-10-19 Thread Daniel Jeliński
On Tue, 19 Oct 2021 06:42:43 GMT, Alan Bateman wrote: >> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix crash on GetIpAddrTable error > > src/java.base/windows/native/libnet/Net

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v4]

2021-10-19 Thread Daniel Jeliński
it. > > `tier1` tests pass, `java.net` tests pass. No new regression tests as I > couldn't find any list of steps to reproduce the problem. > > I don't have write access to JBS. I could use some help with creating a > ticket. Daniel Jeliński has updated the pull request

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v4]

2021-10-20 Thread Daniel Jeliński
On Wed, 20 Oct 2021 12:12:21 GMT, Daniel Fuchs wrote: >> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adapt line length to 80 column display > > Hmm... JDK-8225239 might have introduced

Integrated: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException

2021-10-20 Thread Daniel Jeliński
On Thu, 14 Oct 2021 17:29:16 GMT, Daniel Jeliński wrote: > Per Java documentation, > "[Error](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/Error.java#L30) > [..] indicates serious problems that a reasonable application should not try > to c

Re: RFR: 8275319 java.net.NetworkInterface throws java.lang.Error instead of SocketException [v4]

2021-10-20 Thread Daniel Jeliński
On Wed, 20 Oct 2021 13:53:21 GMT, Daniel Fuchs wrote: >> Thanks @dfuch and @AlanBateman for the review and all your help. >> >> @dfuch I'd rather follow up on the remaining issues in a separate PR. This >> one is already doing more than the PR title advertises. > > @djelinski I have no objectio

RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments

2021-10-23 Thread Daniel Jeliński
Clean up of various issues related to error handling and memory management - Commit messages: - Fix memory leak - Fixup getAllInterfacesAndAddresses - Fixup getAddrsFromAdapter - Fixup enumAddresses_win - Fixup enumAddresses_win_ipaddrtable - Remove special handling for GetIfTab

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments

2021-10-27 Thread Daniel Jeliński
On Sat, 23 Oct 2021 10:26:34 GMT, Daniel Jeliński wrote: > Clean up of various issues related to error handling and memory management Hi, I wasn't able to run the test yet; need to find a machine where I could run this test without worrying about restoring it to a working state.

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v2]

2021-10-28 Thread Daniel Jeliński
> Clean up of various issues related to error handling and memory management Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision: Restore support for IPv6-only operation - Changes: - all: https://git.openjdk.java.

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v2]

2021-10-28 Thread Daniel Jeliński
On Thu, 28 Oct 2021 07:20:38 GMT, Daniel Jeliński wrote: >> Clean up of various issues related to error handling and memory management > > Daniel Jeliński has updated the pull request incrementally with one > additional commit since the last revision: > > Restore

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v2]

2021-10-28 Thread Daniel Jeliński
On Thu, 28 Oct 2021 07:20:38 GMT, Daniel Jeliński wrote: >> Clean up of various issues related to error handling and memory management > > Daniel Jeliński has updated the pull request incrementally with one > additional commit since the last revision: > > Restore

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v2]

2021-10-28 Thread Daniel Jeliński
On Thu, 28 Oct 2021 14:27:15 GMT, Daniel Fuchs wrote: > I still need to review it though Each commit tries to fix one function (memory allocation / deallocation / return values); it may be easier to review them one by one. > I assume we're talking about using `GetIfTable2` and `GetIfEntry2` Y

Re: RFR: 8262442 (windows) use all proxy configuration sources when java.net.useSystemProxies=true

2021-10-31 Thread Daniel Jeliński
On Mon, 18 Oct 2021 19:25:12 GMT, Daniel Jeliński wrote: > With this patch DefaultProxySelector first attempts to use proxy config > autodetection (http://wpad/wpad.dat) when that is configured and available. > If proxy config autodetection is unavailable, selector tries to use >

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v2]

2021-11-22 Thread Daniel Jeliński
On Thu, 28 Oct 2021 14:27:15 GMT, Daniel Fuchs wrote: >> Just to clarify, no tests were run. The failure was reported by JTReg >> itself. As of now building Java on Windows requires IPv4. >> >> On a side note, Microsoft created a completely new set of network >> interface-related APIs in Windo

Re: RFR: 8262442 (windows) use all proxy configuration sources when java.net.useSystemProxies=true

2021-11-22 Thread Daniel Jeliński
On Mon, 18 Oct 2021 19:25:12 GMT, Daniel Jeliński wrote: > With this patch DefaultProxySelector first attempts to use proxy config > autodetection (http://wpad/wpad.dat) when that is configured and available. > If proxy config autodetection is unavailable, selector tries to use >

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v2]

2021-11-29 Thread Daniel Jeliński
On Thu, 28 Oct 2021 07:20:38 GMT, Daniel Jeliński wrote: >> Clean up of various issues related to error handling and memory management > > Daniel Jeliński has updated the pull request incrementally with one > additional commit since the last revision: > > Restore

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v2]

2021-12-14 Thread Daniel Jeliński
On Thu, 28 Oct 2021 07:20:38 GMT, Daniel Jeliński wrote: >> Clean up of various issues related to error handling and memory management > > Daniel Jeliński has updated the pull request incrementally with one > additional commit since the last revision: > > Restore

Re: RFR: 8278961: Enable debug logging in java/net/DatagramSocket/SendDatagramToBadAddress.java

2021-12-17 Thread Daniel Jeliński
On Fri, 17 Dec 2021 14:52:53 GMT, Jaikiran Pai wrote: > Can I please get a review for this test only change which proposes to enable > debug logs from the test that failed intermittently? This change addresses > https://bugs.openjdk.java.net/browse/JDK-8278961. > > The change passes the (test

Re: RFR: 8278961: Enable debug logging in java/net/DatagramSocket/SendDatagramToBadAddress.java

2021-12-20 Thread Daniel Jeliński
On Fri, 17 Dec 2021 14:52:53 GMT, Jaikiran Pai wrote: > Can I please get a review for this test only change which proposes to enable > debug logs from the test that failed intermittently? This change addresses > https://bugs.openjdk.java.net/browse/JDK-8278961. > > The change passes the (test

Re: RFR: 8278961: Enable debug logging in java/net/DatagramSocket/SendDatagramToBadAddress.java

2021-12-20 Thread Daniel Jeliński
On Sat, 18 Dec 2021 02:35:24 GMT, Jaikiran Pai wrote: >> test/jdk/java/net/DatagramSocket/SendDatagramToBadAddress.java line 182: >> >>> 180: } catch (InterruptedIOException ex) { >>> 181: print ("socket timeout"); >>> 182: } catch (Exception ex) { >> >>

Re: RFR: 8262442 (windows) use all proxy configuration sources when java.net.useSystemProxies=true

2022-01-04 Thread Daniel Jeliński
On Mon, 18 Oct 2021 19:25:12 GMT, Daniel Jeliński wrote: > With this patch DefaultProxySelector first attempts to use proxy config > autodetection (http://wpad/wpad.dat) when that is configured and available. > If proxy config autodetection is unavailable, selector tries to use >

RFR: 8280414: Memory leak in DefaultProxySelector

2022-01-21 Thread Daniel Jeliński
We were leaking the list returned by `createProxyList`. Verified that the leak is no longer present with this patch. Also removed a few unused variables. Reported by clang-tidy. - Commit messages: - Fix memory leak Changes: https://git.openjdk.java.net/jdk/pull/7172/files Webrev:

Re: RFR: 8280414: Memory leak in DefaultProxySelector

2022-01-21 Thread Daniel Jeliński
On Fri, 21 Jan 2022 08:25:30 GMT, Daniel Jeliński wrote: > We were leaking the list returned by `createProxyList`. Verified that the > leak is no longer present with this patch. Also removed a few unused > variables. > > Reported by clang-tidy. Tested locally. Returned valu

Re: RFR: 8280414: Memory leak in DefaultProxySelector

2022-01-21 Thread Daniel Jeliński
On Fri, 21 Jan 2022 08:25:30 GMT, Daniel Jeliński wrote: > We were leaking the list returned by `createProxyList`. Verified that the > leak is no longer present with this patch. Also removed a few unused > variables. > > Reported by clang-tidy. tier1 and tier2 also passed. --

Re: RFR: 8280414: Memory leak in DefaultProxySelector

2022-01-21 Thread Daniel Jeliński
On Fri, 21 Jan 2022 08:25:30 GMT, Daniel Jeliński wrote: > We were leaking the list returned by `createProxyList`. Verified that the > leak is no longer present with this patch. Also removed a few unused > variables. > > Reported by clang-tidy. Thanks for reviewing! -

RFR: 8163921: HttpURLConnection default Accept header is malformed according to HTTP/1.1 RFC

2022-01-21 Thread Daniel Jeliński
Fix RFC compliance. Tier1 and tier2 passed. - Commit messages: - Fix default Accept header Changes: https://git.openjdk.java.net/jdk/pull/7181/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7181&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8163921 Stats

Re: RFR: 8163921: HttpURLConnection default Accept header is malformed according to HTTP/1.1 RFC [v2]

2022-01-21 Thread Daniel Jeliński
> Fix RFC compliance. > Tier1 and tier2 passed. Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision: Update copyright year - Changes: - all: https://git.openjdk.java.net/jdk/pull/7181/files - new:

Re: RFR: 8163921: HttpURLConnection default Accept header is malformed according to HTTP/1.1 RFC [v2]

2022-01-24 Thread Daniel Jeliński
On Mon, 24 Jan 2022 15:21:44 GMT, Michael McMahon wrote: >> src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java >> line 293: >> >>> 291: static final String acceptString = >>> 292: "text/html, image/gif, image/jpeg, */*; q=0.2"; >>> 293: >> >> It looks syn

Re: RFR: 8163921: HttpURLConnection default Accept header is malformed according to HTTP/1.1 RFC [v3]

2022-01-24 Thread Daniel Jeliński
> Fix RFC compliance. > Tier1 and tier2 passed. Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision: Update accept header to */* - Changes: - all: https://git.openjdk.java.net/jdk/pull/7181/files - new:

Integrated: 8163921: HttpURLConnection default Accept header is malformed according to HTTP/1.1 RFC

2022-01-25 Thread Daniel Jeliński
On Fri, 21 Jan 2022 16:51:20 GMT, Daniel Jeliński wrote: > Fix RFC compliance. > Tier1 and tier2 passed. This pull request has now been integrated. Changeset: 28796cbd Author:Daniel Jeliński Committer: Michael McMahon URL: https://git.openjdk.java.net/jdk/

Integrated: 8280414: Memory leak in DefaultProxySelector

2022-01-25 Thread Daniel Jeliński
On Fri, 21 Jan 2022 08:25:30 GMT, Daniel Jeliński wrote: > We were leaking the list returned by `createProxyList`. Verified that the > leak is no longer present with this patch. Also removed a few unused > variables. > > Reported by clang-tidy. This pull request has now

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v6]

2022-01-26 Thread Daniel Jeliński
On Wed, 26 Jan 2022 18:25:19 GMT, Daniel Fuchs wrote: >> Daniel Jeliński has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request cont

Re: RFR: 8279329: Remove hardcoded IPv4 available policy on Windows

2022-02-02 Thread Daniel Jeliński
On Wed, 2 Feb 2022 08:31:08 GMT, Masanori Yano wrote: > I added socket connection check same as IPv6_supported(). > Before this fix, when IPv4 is uninstalled (called `netsh interface ipv4 > uninstall`), and set property `-Djava.net.preferIPv4Stack=true`, > java.net.InetAddress.PLATFORM_LOOKUP_P

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v7]

2022-02-07 Thread Daniel Jeliński
> Clean up of various issues related to error handling and memory management Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision: Initialize return value in all cases - Changes: - all: https://git.openjdk.java.net/

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v4]

2022-02-07 Thread Daniel Jeliński
On Wed, 19 Jan 2022 08:15:46 GMT, Daniel Jeliński wrote: >> Why? >> No users of `enumInterfaces` rely on the value returned in the second >> parameter when `enumInterfaces` returns a negative result. The same is true >> for `getAllInterfacesAndAddresses`. >>

Re: RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v7]

2022-03-07 Thread Daniel Jeliński
On Mon, 7 Feb 2022 09:14:51 GMT, Daniel Jeliński wrote: >> Clean up of various issues related to error handling and memory management > > Daniel Jeliński has updated the pull request incrementally with one > additional commit since the last revision: > > Initialize retu

Integrated: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments

2022-03-08 Thread Daniel Jeliński
On Sat, 23 Oct 2021 10:26:34 GMT, Daniel Jeliński wrote: > Clean up of various issues related to error handling and memory management This pull request has now been integrated. Changeset: 2549e550 Author: Daniel Jeliński Committer: Daniel Fuchs URL: https://git.openjdk.java.net/

Re: RFR: 8283544: HttpClient GET method adds Content-Length: 0 header

2022-03-29 Thread Daniel Jeliński
On Tue, 29 Mar 2022 15:44:58 GMT, Conor Cleary wrote: > **Issue** > When using the `HttpClient.send()` to send a GET request created using the > `HttpRequest.newBuilder()`, a `Content-length: 0` header is set. This > behaviour causes issues with many services as a body related header is > usua

Integrated: 8282506: Clean up remaining references to TwoStacksPlain*SocketImpl

2022-04-05 Thread Daniel Jeliński
On Tue, 5 Apr 2022 10:10:15 GMT, Daniel Jeliński wrote: > The classes `TwoStacksPlainDatagramSocketImpl` and `TwoStacksPlainSocketImpl` > were removed long ago. This patch cleans up the remaining references from the > test code. This pull request has now been integrated. Changeset:

Re: RFR: 8284892: java/net/httpclient/http2/TLSConnection.java fails intermittently [v2]

2022-04-14 Thread Daniel Jeliński
On Thu, 14 Apr 2022 18:41:08 GMT, Daniel Fuchs wrote: >> java/net/httpclient/http2/TLSConnection.java has been observed failing (even >> though rarely) in test jobs. >> >> The issue is that the handler used on the the server sides maintains a >> volatile `sslSession` field which it sets when r

Re: RFR: 8284890: Support for Do not fragment IP socket options

2022-04-15 Thread Daniel Jeliński
On Thu, 14 Apr 2022 16:04:22 GMT, Michael McMahon wrote: > Hi, > > Could I get the following PR review please? It adds a new JDK specific > extended socket option > called IP_DONTFRAGMENT, which disables IP packet fragmentation in both IPv4 > and IPv6 > UDP sockets (NIO DatagramChannels). For

RFR: 8286873: Improve websocket test execution time

2022-05-17 Thread Daniel Jeliński
This PR improves the execution time of jdk_net tests (and, by extension, tier2) by about 3 minutes. Tests located under `jdk/java/net/httpclient/websocket` are never run in parallel. Each of the 8 modified `Pending***` tests originally required 40 seconds to complete. After the proposed changes

Re: RFR: 8286873: Improve websocket test execution time

2022-05-19 Thread Daniel Jeliński
On Tue, 17 May 2022 14:55:11 GMT, Daniel Fuchs wrote: > I am a bit less sure about moving the post-asserts inside the loop I moved them because they too can fail if the original blocked future suddenly completes. Side effect of this change is that any failures that happen after websocket.abort

Re: RFR: 8286873: Improve websocket test execution time

2022-05-19 Thread Daniel Jeliński
On Thu, 19 May 2022 09:22:57 GMT, Pavel Rappo wrote: > What looks questionable is rearrangement of asserts: when `assertHangs` moves > down. assertNotDone(cfClose) can transitorry pass even if ping has not hung. `assertHangs` either waits for 5 seconds or throws an exception, so `assertNotDone

Re: RFR: 8286873: Improve websocket test execution time [v2]

2022-05-19 Thread Daniel Jeliński
odified tests were executed at least 10 times on each of: Windows, Linux > (both x64 and aarch64), MacOS (both x64 and aarch64). No failures were > observed. Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision: Fix wo

Re: RFR: 8286873: Improve websocket test execution time [v3]

2022-05-19 Thread Daniel Jeliński
odified tests were executed at least 10 times on each of: Windows, Linux > (both x64 and aarch64), MacOS (both x64 and aarch64). No failures were > observed. Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision: Make it clear t

Re: RFR: 8286873: Improve websocket test execution time [v3]

2022-05-19 Thread Daniel Jeliński
On Thu, 19 May 2022 10:46:35 GMT, Pavel Rappo wrote: > > > What looks questionable is rearrangement of asserts: when `assertHangs` > > > moves down. assertNotDone(cfClose) can transitorry pass even if ping has > > > not hung. > > > > > > `assertHangs` either waits for 5 seconds or throws an e

Integrated: 8286873: Improve websocket test execution time

2022-05-19 Thread Daniel Jeliński
On Tue, 17 May 2022 12:45:52 GMT, Daniel Jeliński wrote: > This PR improves the execution time of jdk_net tests (and, by extension, > tier2) by about 3 minutes. > > Tests located under `jdk/java/net/httpclient/websocket` are never run in > parallel. Each of the 8 modified `Pe