Integrated: 8268294: Reusing HttpClient in a WebSocket.Listener hangs.
On Wed, 16 Jun 2021 07:56:11 GMT, Michael McMahon wrote: > Hi, > > This fixes a problem where the listener methods of a WebSocket client were > being invoked by the Selector manager thread, which is problematic, because > if the implementation of any of these methods tries to do any blocking work, > this impacts other http activity, and if the blocking work is a http client > call, then a hang can result. The fix makes the HttpClient's executor > available to WebSocketImpl and that is used to offload the listener > invocations. > > The fix also adds a more comprehensive test framework for WebSockets (in > WebSocketServer). Up to now we just had a limited server side in the tests > that can only do the handshake. This change adds an API and implementation > for server's to receive websocket messages and send replies back to clients. > To implement this, the server hooks into WebSocket's Frame, MessageEncoder > and MessageDecoder classes. Therefore, the implementations of these classes > had to be modified to allow for the encoding of server generated messages and > the decoding of client generated messages. The only difference between client > and server in this respect relates to payload masking which is only done for > messages sent from client to server. > > There's a couple of warts that I wasn't sure what to do with. 1) There is > already a copy of the Frame implementation class in the test hierarchy. I > presume this is used by other tests, but that implementation is not used by > this change. 2) The WebSocketServer is based on the existing > DummyWebSocketServer class which is used by other tests. I can't see any easy > way to refactor/combine these implementations. > > Thanks, > > Michael. This pull request has now been integrated. Changeset: 2d088fa9 Author:Michael McMahon URL: https://git.openjdk.java.net/jdk/commit/2d088fa91d18252a801db3b84ff87e261d63ebd4 Stats: 1066 lines in 12 files changed: 1054 ins; 0 del; 12 mod 8268294: Reusing HttpClient in a WebSocket.Listener hangs. Reviewed-by: dfuchs - PR: https://git.openjdk.java.net/jdk/pull/4506
Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v2]
On Wed, 16 Jun 2021 22:10:56 GMT, Mark Sheppard wrote: >> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed >> with "SocketException: Cannot allocate memory" >> >> The test java/net/MulticastSocket/Promiscuous.java has been observed to fail >> on a regular basis on macosx-aarch. >> This is typically under heavy test load on a test machine. Analysis of the >> problem have >> shown that the setsockopt for joining a multicast group will intermittently >> fail with ENOMEM. >> >> While analysis of test environment shows significant memory usage and some >> memory pressure, it is >> not excessive and as such it is deemed transition or temporary condition, >> such that a retry of the >> setsockopt system call, has been seen to mitigate the issue. This adds to >> the stability of the >> Promiscuous.java test and reduces test failure noise. >> >> The proposed fix is in >> open/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c >> in the mcast_join_leave function. That is, if setsockopt to join an mcast >> group fails, and the errno == ENOMEM, >> then re-invoke the setsockopt system call for joining a mcast group. >> The change has been applied as a conditional compilation. >> Additionally this change result in the Promiscuous.java test being removed >> from the >> ProblemList.txt. >> >> Please oblige and review the changes for a fix of the issue JDK-8265369 > > Mark Sheppard has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java > failed with "SocketException: Cannot allocate memory" > amendments as per suggestion from Chris Hegarty Thanks for the update Mark. It makes the code much easier to follow. - Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.java.net/jdk17/pull/44
RFR: 8268900: com/sun/net/httpserver/Headers.java: Fix indentation and whitespace
This cleanup-only change fixes the indentation of all members from 8 to 4 spaces and removes whitespace in method invocations (example: `foo ()` -> `foo()`). It also removes superfluous type parameters on lines 83, 168, 206. - Commit messages: - initial change Changes: https://git.openjdk.java.net/jdk/pull/4517/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4517&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8268900 Stats: 163 lines in 1 file changed: 32 ins; 33 del; 98 mod Patch: https://git.openjdk.java.net/jdk/pull/4517.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4517/head:pull/4517 PR: https://git.openjdk.java.net/jdk/pull/4517
Re: RFR: 8268900: com/sun/net/httpserver/Headers.java: Fix indentation and whitespace
On Thu, 17 Jun 2021 09:17:24 GMT, Julia Boes wrote: > This cleanup-only change fixes the indentation of all members from 8 to 4 > spaces and removes whitespace in method invocations (example: `foo ()` -> > `foo()`). It also removes superfluous type parameters on lines 83, 168, 206. Marked as reviewed by dfuchs (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/4517
[jdk17] Integrated: 8268776: Test `ADatagramSocket.java` missing /othervm from @run tag
On Wed, 16 Jun 2021 10:42:56 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my change to the test > `test/jdk/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.java`? > The test is missing `/othervm` from its @run jtreg test tag, which risks > polluting other tests that run in that VM. > > Currently, any test that runs without `/othervm` after this test would find > the `DatagramSocketImpl` factory created by this test, and therefore any call > made to new `DatagramSocket()` would return/use a `NetMulticastSocket` > instead of `DatagramSocketAdaptor`. This could make tests that create > `DatagramSocket`/`MulticastSocket` fail intermittently in unexplainable ways. > Adding in `/othervm` to the @run tag will avoid this problem. > > Kind regards, > Patrick This pull request has now been integrated. Changeset: 7d7bdbe1 Author:Patrick Concannon URL: https://git.openjdk.java.net/jdk17/commit/7d7bdbe135018f1452fa133b294575014e3e871b Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8268776: Test `ADatagramSocket.java` missing /othervm from @run tag Reviewed-by: dfuchs - PR: https://git.openjdk.java.net/jdk17/pull/75
Re: RFR: 8268900: com/sun/net/httpserver/Headers.java: Fix indentation and whitespace
On Thu, 17 Jun 2021 09:17:24 GMT, Julia Boes wrote: > This cleanup-only change fixes the indentation of all members from 8 to 4 > spaces and removes whitespace in method invocations (example: `foo ()` -> > `foo()`). It also removes superfluous type parameters on lines 83, 168, 206. Marked as reviewed by chegar (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/4517
Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v2]
On Wed, 16 Jun 2021 22:10:56 GMT, Mark Sheppard wrote: >> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed >> with "SocketException: Cannot allocate memory" >> >> The test java/net/MulticastSocket/Promiscuous.java has been observed to fail >> on a regular basis on macosx-aarch. >> This is typically under heavy test load on a test machine. Analysis of the >> problem have >> shown that the setsockopt for joining a multicast group will intermittently >> fail with ENOMEM. >> >> While analysis of test environment shows significant memory usage and some >> memory pressure, it is >> not excessive and as such it is deemed transition or temporary condition, >> such that a retry of the >> setsockopt system call, has been seen to mitigate the issue. This adds to >> the stability of the >> Promiscuous.java test and reduces test failure noise. >> >> The proposed fix is in >> open/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c >> in the mcast_join_leave function. That is, if setsockopt to join an mcast >> group fails, and the errno == ENOMEM, >> then re-invoke the setsockopt system call for joining a mcast group. >> The change has been applied as a conditional compilation. >> Additionally this change result in the Promiscuous.java test being removed >> from the >> ProblemList.txt. >> >> Please oblige and review the changes for a fix of the issue JDK-8265369 > > Mark Sheppard has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java > failed with "SocketException: Cannot allocate memory" > amendments as per suggestion from Chris Hegarty src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c line 1843: > 1841: int res; > 1842: #endif > 1843: res will need to be declared unconditionally, no? ( since it is used on all platforms ) src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c line 2122: > 2120: if (join) { > 2121: NET_ThrowCurrent(env, "setsockopt " > S_ADD_MEMBERSHIP " failed"); > 2122: } else { Accidental indentation here? ( four spaces added in front of NET_ThrowCurrent ) - PR: https://git.openjdk.java.net/jdk17/pull/44
Re: RFR: 8268900: com/sun/net/httpserver/Headers.java: Fix indentation and whitespace
On Thu, 17 Jun 2021 09:17:24 GMT, Julia Boes wrote: > This cleanup-only change fixes the indentation of all members from 8 to 4 > spaces and removes whitespace in method invocations (example: `foo ()` -> > `foo()`). It also removes superfluous type parameters on lines 83, 168, 206. Marked as reviewed by michaelm (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/4517
Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v2]
On Wed, 16 Jun 2021 22:10:56 GMT, Mark Sheppard wrote: >> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed >> with "SocketException: Cannot allocate memory" >> >> The test java/net/MulticastSocket/Promiscuous.java has been observed to fail >> on a regular basis on macosx-aarch. >> This is typically under heavy test load on a test machine. Analysis of the >> problem have >> shown that the setsockopt for joining a multicast group will intermittently >> fail with ENOMEM. >> >> While analysis of test environment shows significant memory usage and some >> memory pressure, it is >> not excessive and as such it is deemed transition or temporary condition, >> such that a retry of the >> setsockopt system call, has been seen to mitigate the issue. This adds to >> the stability of the >> Promiscuous.java test and reduces test failure noise. >> >> The proposed fix is in >> open/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c >> in the mcast_join_leave function. That is, if setsockopt to join an mcast >> group fails, and the errno == ENOMEM, >> then re-invoke the setsockopt system call for joining a mcast group. >> The change has been applied as a conditional compilation. >> Additionally this change result in the Promiscuous.java test being removed >> from the >> ProblemList.txt. >> >> Please oblige and review the changes for a fix of the issue JDK-8265369 > > Mark Sheppard has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java > failed with "SocketException: Cannot allocate memory" > amendments as per suggestion from Chris Hegarty src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c line 2112: > 2110: res = setsockopt(fd, IPPROTO_IPV6, (join ? ADD_MEMBERSHIP : > DRP_MEMBERSHIP), > 2111:(char *) &mname6, sizeof (mname6)); > 2112: Seems to be an extraneous space after sizeof here. - PR: https://git.openjdk.java.net/jdk17/pull/44
Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v2]
On Thu, 17 Jun 2021 12:37:59 GMT, Michael McMahon wrote: >> Mark Sheppard has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java >> failed with "SocketException: Cannot allocate memory" >> amendments as per suggestion from Chris Hegarty > > src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c line 2112: > >> 2110: res = setsockopt(fd, IPPROTO_IPV6, (join ? ADD_MEMBERSHIP : >> DRP_MEMBERSHIP), >> 2111:(char *) &mname6, sizeof (mname6)); >> 2112: > > Seems to be an extraneous space after sizeof here. A general question. Is "__APPLE__" the preferred macro name or MACOSX? Not a big deal but MACOSX looks slightly more common. [Seems github has removed the underscores from APPLE] - PR: https://git.openjdk.java.net/jdk17/pull/44
Re: RFR: JDK-8268464 : Remove dependancy of TestHttpsServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/https/ tests [v4]
> …HttpCallback from open/test/jdk/sun/net/www/protocol/https/ tests Mahendra Chhipa has updated the pull request incrementally with one additional commit since the last revision: Implemented review comments - Changes: - all: https://git.openjdk.java.net/jdk/pull/4432/files - new: https://git.openjdk.java.net/jdk/pull/4432/files/db615030..295c2a56 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4432&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4432&range=02-03 Stats: 5 lines in 1 file changed: 1 ins; 1 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/4432.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4432/head:pull/4432 PR: https://git.openjdk.java.net/jdk/pull/4432
Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v2]
On Thu, 17 Jun 2021 11:07:23 GMT, Chris Hegarty wrote: >> Mark Sheppard has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java >> failed with "SocketException: Cannot allocate memory" >> amendments as per suggestion from Chris Hegarty > > src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c line 1843: > >> 1841: int res; >> 1842: #endif >> 1843: > > res will need to be declared unconditionally, no? ( since it is used on all > platforms ) yes ... good spot 👍 . as testing has been focused on macos, this error didn't show - PR: https://git.openjdk.java.net/jdk17/pull/44
Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v2]
On Thu, 17 Jun 2021 12:39:17 GMT, Michael McMahon wrote: >> src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c line 2112: >> >>> 2110: res = setsockopt(fd, IPPROTO_IPV6, (join ? ADD_MEMBERSHIP : >>> DRP_MEMBERSHIP), >>> 2111:(char *) &mname6, sizeof (mname6)); >>> 2112: >> >> Seems to be an extraneous space after sizeof here. > > A general question. Is "__APPLE__" the preferred macro name or MACOSX? Not a > big deal but MACOSX looks slightly more common. [Seems github has removed the > underscores from APPLE] thanks ... I'll attend to the spacing I used __APPLE__ as it was already in place for a change to set socket buffer size - PR: https://git.openjdk.java.net/jdk17/pull/44
Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v3]
> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed > with "SocketException: Cannot allocate memory" > > The test java/net/MulticastSocket/Promiscuous.java has been observed to fail > on a regular basis on macosx-aarch. > This is typically under heavy test load on a test machine. Analysis of the > problem have > shown that the setsockopt for joining a multicast group will intermittently > fail with ENOMEM. > > While analysis of test environment shows significant memory usage and some > memory pressure, it is > not excessive and as such it is deemed transition or temporary condition, > such that a retry of the > setsockopt system call, has been seen to mitigate the issue. This adds to the > stability of the > Promiscuous.java test and reduces test failure noise. > > The proposed fix is in > open/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c > in the mcast_join_leave function. That is, if setsockopt to join an mcast > group fails, and the errno == ENOMEM, > then re-invoke the setsockopt system call for joining a mcast group. > The change has been applied as a conditional compilation. > Additionally this change result in the Promiscuous.java test being removed > from the > ProblemList.txt. > > Please oblige and review the changes for a fix of the issue JDK-8265369 Mark Sheppard has updated the pull request incrementally with one additional commit since the last revision: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" remove #ifdef __APPLE__ from int res; declaration, remove space and fix indentation (as per comments from CH and M3) - Changes: - all: https://git.openjdk.java.net/jdk17/pull/44/files - new: https://git.openjdk.java.net/jdk17/pull/44/files/ac82b8df..3365a31c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk17&pr=44&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk17&pr=44&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.java.net/jdk17/pull/44.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/44/head:pull/44 PR: https://git.openjdk.java.net/jdk17/pull/44
RFR: Merge jdk17
Forwardport JDK 17 -> JDK 18 - Commit messages: - Merge - 8268371: C2: assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed - 8268676: assert(!ik->is_interface() && !ik->has_subklass()) failed: inconsistent klass hierarchy - 8268265: MutableSpaceUsedHelper::take_sample() hits assert(left >= right) failed: avoid overflow - 8268971: ProblemList tools/jpackage/windows/WinInstallerIconTest.java on win-x64 - 8264843: Javac crashes with NullPointerException when finding unencoded XML in tag - 8265297: javax/net/ssl/SSLSession/TestEnabledProtocols.java failed with "RuntimeException: java.net.SocketException: Connection reset" - 8268353: Test libsvml.so is and is not present in jdk image - 8249899: jdk/javadoc/tool/InlineTagsWithBraces.java uses @ignore w/o bug-id - 8268776: Test `ADatagramSocket.java` missing /othervm from @run tag - ... and 3 more: https://git.openjdk.java.net/jdk/compare/bb24fa65...a3951c44 The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.java.net/jdk/pull/4525/files Stats: 845 lines in 26 files changed: 408 ins; 384 del; 53 mod Patch: https://git.openjdk.java.net/jdk/pull/4525.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4525/head:pull/4525 PR: https://git.openjdk.java.net/jdk/pull/4525
Integrated: Merge jdk17
On Thu, 17 Jun 2021 23:26:26 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: a051e735 Author:Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/a051e735cda0d5ee5cb6ce0738aa549a7319a28c Stats: 845 lines in 26 files changed: 408 ins; 384 del; 53 mod Merge - PR: https://git.openjdk.java.net/jdk/pull/4525