From kevinw at openjdk.org Fri Dec 1 10:06:23 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 1 Dec 2023 10:06:23 GMT Subject: jmx-dev RFR: 8316649: JMX connection timeout cannot be changed and uses the default of 0 (infinite) In-Reply-To: References: Message-ID: On Tue, 28 Nov 2023 16:21:29 GMT, Kevin Walls wrote: > JMX RMI Connections should use a timeout on the Socket connect call by default. > > JMX Connections use RMI and some connection failures never terminate. The hang described in 8316649 is hard to reproduce manually: the description says it can be caused by a firewall that never returns a response. > > Changing the base RMI implementation may not be desirable at this time. > > JMX can use a new ClientSocketFactory for RMI which implements the connect timeout, which can recognise a new JMX-specific property `com.sun.management.jmxremote.rmi.tcpConnectTimeout` > (named like the existing com.sun.management.jmxremote... properties) > > Defaulting to a 1 minute timeout on connect has no effect on existing tests, and should go unnoticed unless there really is a significant connection delay. Specifying zero for the new System Property will use the old technique of a connect with no timeout. > > This can be tested, but it is not realistically usable: although specifying a 1 millisecond timeout will often fail (as expected/desired for the test), it will very often pass as the connection happens immediately. Thanks, that's right it is a bad interoperability problem! The alternative SocketFactory needs to be available at all clients, so this is not workable. The other possibility was use of RMISocketFactory::setSocketFactory on the JMX client end. This lets us substitute in a preferred socket factory before making a connection, and one which can implement its own timeout. This is awkward as it affects the whole process. For JMX apps such as JConsole etc this is fine, but in other situations it may have side-effects on other RMI activity. At the moment the demand for the timeout is not strong, and the behaviour is what it has been for many years, so I am going to close this without progressing it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16856#issuecomment-1835810085 From kevinw at openjdk.org Fri Dec 1 10:06:23 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 1 Dec 2023 10:06:23 GMT Subject: jmx-dev Withdrawn: 8316649: JMX connection timeout cannot be changed and uses the default of 0 (infinite) In-Reply-To: References: Message-ID: <2k_cWi2SndOeX1WGX71-27gjAQTQLwtUANCO6kfI_fk=.162522b0-d92c-416a-b207-5020b8973bd5@github.com> On Tue, 28 Nov 2023 16:21:29 GMT, Kevin Walls wrote: > JMX RMI Connections should use a timeout on the Socket connect call by default. > > JMX Connections use RMI and some connection failures never terminate. The hang described in 8316649 is hard to reproduce manually: the description says it can be caused by a firewall that never returns a response. > > Changing the base RMI implementation may not be desirable at this time. > > JMX can use a new ClientSocketFactory for RMI which implements the connect timeout, which can recognise a new JMX-specific property `com.sun.management.jmxremote.rmi.tcpConnectTimeout` > (named like the existing com.sun.management.jmxremote... properties) > > Defaulting to a 1 minute timeout on connect has no effect on existing tests, and should go unnoticed unless there really is a significant connection delay. Specifying zero for the new System Property will use the old technique of a connect with no timeout. > > This can be tested, but it is not realistically usable: although specifying a 1 millisecond timeout will often fail (as expected/desired for the test), it will very often pass as the connection happens immediately. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/16856 From kevinw at openjdk.org Mon Dec 11 12:03:22 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 11 Dec 2023 12:03:22 GMT Subject: jmx-dev RFR: 8311306: Test com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed: out of expected range Message-ID: Trivial test update to run in "othervm". This test has failed due to interrupted threads: the interruption interferes with timing, but also the test is designed to fail if interrupted. Other tests in the same directory have the same requirement that threads/sleeps are not interrupted, and they run with othervm and are not known to fail. ------------- Commit messages: - 8311306: Test com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed: out of expected range Changes: https://git.openjdk.org/jdk/pull/17054/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17054&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8311306 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/17054.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17054/head:pull/17054 PR: https://git.openjdk.org/jdk/pull/17054 From kevinw at openjdk.org Mon Dec 11 13:09:31 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 11 Dec 2023 13:09:31 GMT Subject: jmx-dev RFR: 8321729: Remove 'orb' field in RMIConnector Message-ID: Tidyup change, looks like this field was not removed when IIOP was removed from RMIConnector. The field is not required for interoperability: with the field removed, I can still connect an older JMX client to a running app with the updated JDK. Since the JDK9 change https://hg.openjdk.org/jdk9/jdk9/jdk/rev/09daaf1e4c53 did not change serialVersionUID, this update does not either. Tests continue to pass, e.g. javax/management (including remote which has RMI tests) jdk/com/sun/management ------------- Commit messages: - 8321729: Remove orb field in RMIConnector Changes: https://git.openjdk.org/jdk/pull/17055/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17055&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8321729 Stats: 6 lines in 1 file changed: 0 ins; 6 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/17055.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17055/head:pull/17055 PR: https://git.openjdk.org/jdk/pull/17055 From rriggs at openjdk.org Mon Dec 11 14:54:14 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 11 Dec 2023 14:54:14 GMT Subject: jmx-dev RFR: 8321729: Remove 'orb' field in RMIConnector In-Reply-To: References: Message-ID: On Mon, 11 Dec 2023 12:50:38 GMT, Kevin Walls wrote: > Tidyup change, looks like this field was not removed when IIOP was removed from RMIConnector. > > The field is not required for interoperability: > with the field removed, I can still connect an older JMX client to a running app with the updated JDK. > > Since the JDK9 change https://hg.openjdk.org/jdk9/jdk9/jdk/rev/09daaf1e4c53 > did not change serialVersionUID, this update does not either. > > Tests continue to pass, e.g. > javax/management (including remote which has RMI tests) > jdk/com/sun/management Tidy! ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/17055#pullrequestreview-1775335414 From dfuchs at openjdk.org Mon Dec 11 17:56:25 2023 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 11 Dec 2023 17:56:25 GMT Subject: jmx-dev RFR: 8321729: Remove 'orb' field in RMIConnector In-Reply-To: References: Message-ID: On Mon, 11 Dec 2023 12:50:38 GMT, Kevin Walls wrote: > Tidyup change, looks like this field was not removed when IIOP was removed from RMIConnector. > > The field is not required for interoperability: > with the field removed, I can still connect an older JMX client to a running app with the updated JDK. > > Since the JDK9 change https://hg.openjdk.org/jdk9/jdk9/jdk/rev/09daaf1e4c53 > did not change serialVersionUID, this update does not either. > > Tests continue to pass, e.g. > javax/management (including remote which has RMI tests) > jdk/com/sun/management Marked as reviewed by dfuchs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/17055#pullrequestreview-1775807650 From sspitsyn at openjdk.org Tue Dec 12 01:36:34 2023 From: sspitsyn at openjdk.org (Serguei Spitsyn) Date: Tue, 12 Dec 2023 01:36:34 GMT Subject: jmx-dev RFR: 8311306: Test com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed: out of expected range In-Reply-To: References: Message-ID: On Mon, 11 Dec 2023 11:33:08 GMT, Kevin Walls wrote: > Trivial test update to run in "othervm". This test has failed due to interrupted threads: the interruption interferes with timing, but also the test is designed to fail if interrupted. > > Other tests in the same directory have the same requirement that threads/sleeps are not interrupted, and they run with othervm and are not known to fail. Looks okay. ------------- Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/17054#pullrequestreview-1776450680 From kevinw at openjdk.org Tue Dec 12 10:01:33 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 12 Dec 2023 10:01:33 GMT Subject: jmx-dev RFR: 8311306: Test com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed: out of expected range In-Reply-To: References: Message-ID: On Mon, 11 Dec 2023 11:33:08 GMT, Kevin Walls wrote: > Trivial test update to run in "othervm". This test has failed due to interrupted threads: the interruption interferes with timing, but also the test is designed to fail if interrupted. > > Other tests in the same directory have the same requirement that threads/sleeps are not interrupted, and they run with othervm and are not known to fail. Thanks Serguei! ------------- PR Comment: https://git.openjdk.org/jdk/pull/17054#issuecomment-1851707660 From kevinw at openjdk.org Tue Dec 12 10:01:34 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 12 Dec 2023 10:01:34 GMT Subject: jmx-dev Integrated: 8311306: Test com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed: out of expected range In-Reply-To: References: Message-ID: On Mon, 11 Dec 2023 11:33:08 GMT, Kevin Walls wrote: > Trivial test update to run in "othervm". This test has failed due to interrupted threads: the interruption interferes with timing, but also the test is designed to fail if interrupted. > > Other tests in the same directory have the same requirement that threads/sleeps are not interrupted, and they run with othervm and are not known to fail. This pull request has now been integrated. Changeset: e1fd663f Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/e1fd663f224909c09f2f6fab7ad20f7b7864b62b Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod 8311306: Test com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed: out of expected range Reviewed-by: sspitsyn ------------- PR: https://git.openjdk.org/jdk/pull/17054 From kevinw at openjdk.org Tue Dec 12 10:02:22 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 12 Dec 2023 10:02:22 GMT Subject: jmx-dev RFR: 8321729: Remove 'orb' field in RMIConnector In-Reply-To: References: Message-ID: On Mon, 11 Dec 2023 12:50:38 GMT, Kevin Walls wrote: > Tidyup change, looks like this field was not removed when IIOP was removed from RMIConnector. > > The field is not required for interoperability: > with the field removed, I can still connect an older JMX client to a running app with the updated JDK. > > Since the JDK9 change https://hg.openjdk.org/jdk9/jdk9/jdk/rev/09daaf1e4c53 > did not change serialVersionUID, this update does not either. > > Tests continue to pass, e.g. > javax/management (including remote which has RMI tests) > jdk/com/sun/management Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/17055#issuecomment-1851711307 From kevinw at openjdk.org Tue Dec 12 10:05:34 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 12 Dec 2023 10:05:34 GMT Subject: jmx-dev Integrated: 8321729: Remove 'orb' field in RMIConnector In-Reply-To: References: Message-ID: <2oeA7lalSaM4P8b_2ou3BuuoEcmpn-hLunJHn0rXIDk=.07b627f3-e714-475e-9874-2a27956539df@github.com> On Mon, 11 Dec 2023 12:50:38 GMT, Kevin Walls wrote: > Tidyup change, looks like this field was not removed when IIOP was removed from RMIConnector. > > The field is not required for interoperability: > with the field removed, I can still connect an older JMX client to a running app with the updated JDK. > > Since the JDK9 change https://hg.openjdk.org/jdk9/jdk9/jdk/rev/09daaf1e4c53 > did not change serialVersionUID, this update does not either. > > Tests continue to pass, e.g. > javax/management (including remote which has RMI tests) > jdk/com/sun/management This pull request has now been integrated. Changeset: 6f482406 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/6f4824068dbd0631ac73c79de479245e0c53ed81 Stats: 6 lines in 1 file changed: 0 ins; 6 del; 0 mod 8321729: Remove 'orb' field in RMIConnector Reviewed-by: rriggs, dfuchs ------------- PR: https://git.openjdk.org/jdk/pull/17055