From kevinw at openjdk.org Wed Jul 3 08:29:40 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 3 Jul 2024 08:29:40 GMT Subject: jmx-dev [jdk23] RFR: 8335124: com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed with CPU time out of expected range Message-ID: <7JorVYHv2FWSlD4ZQ3cEK_jQfKJweCJkH5jaNG_nsFw=.8e697bb4-260f-4ac6-bb86-6f6fb6e03f60@github.com> Clean backport to jdk23 of a simple test update, to try and avoid spurious failures. ------------- Commit messages: - Backport 79a3554e1da604627b3a010dc269c1bd914c79d3 Changes: https://git.openjdk.org/jdk/pull/19999/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19999&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8335124 Stats: 3 lines in 1 file changed: 2 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/19999.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19999/head:pull/19999 PR: https://git.openjdk.org/jdk/pull/19999 From duke at openjdk.org Wed Jul 3 14:24:31 2024 From: duke at openjdk.org (duke) Date: Wed, 3 Jul 2024 14:24:31 GMT Subject: jmx-dev RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks In-Reply-To: References: Message-ID: On Thu, 17 Nov 2022 06:28:37 GMT, Poison wrote: > As the title says, add the volatile modifier. @tianshuang Your change (at version dd4599661ab209ef1a77c36be066a2af61304156) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/11199#issuecomment-1318340110 From duke at openjdk.org Wed Jul 3 14:24:32 2024 From: duke at openjdk.org (duke) Date: Wed, 3 Jul 2024 14:24:32 GMT Subject: jmx-dev RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks [v2] In-Reply-To: <__C9hdFdiGwECNQ9NBVry5dNseFyVSlHQSN8GYdlVf8=.65b8af68-5327-42e4-9445-e2237cb38aa7@github.com> References: <__C9hdFdiGwECNQ9NBVry5dNseFyVSlHQSN8GYdlVf8=.65b8af68-5327-42e4-9445-e2237cb38aa7@github.com> Message-ID: On Thu, 17 Nov 2022 09:43:39 GMT, Poison wrote: >> As the title says, add the volatile modifier. > > Poison has updated the pull request incrementally with one additional commit since the last revision: > > 8297173: usageTicks and totalTicks should be volatile @tianshuang Your change (at version f6b19bb0ea59165a59be600f615f0896f18b9f4c) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/11199#issuecomment-1319829256 From kevinw at openjdk.org Thu Jul 4 14:47:27 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 4 Jul 2024 14:47:27 GMT Subject: jmx-dev RFR: 8207908: JMXStatusTest.java fails assertion intermittently Message-ID: Test failure, reproducible running batches of tests at the same time on the same machine. The use of "jcmd TestApp ..." gathers more output that the test wants. Using the PID to match only the wanted process, my batches of 25 tests at the same time run in parallel without failure. ------------- Commit messages: - oops - 8207908: JMXStatusTest.java fails assertion intermittently - DiagnosticFramework: CmdLine::is_executable() correction Changes: https://git.openjdk.org/jdk/pull/20037/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20037&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8207908 Stats: 9 lines in 2 files changed: 1 ins; 2 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/20037.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20037/head:pull/20037 PR: https://git.openjdk.org/jdk/pull/20037 From kevinw at openjdk.org Fri Jul 5 14:27:22 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 5 Jul 2024 14:27:22 GMT Subject: jmx-dev RFR: 8267887: RMIConnector_NPETest.java fails after removal of RMI Activation (JDK-8267123) Message-ID: The test test/jdk/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java should be removed. This test was added when 6984520 was fixed in 6u25. It has been problemlisted since JDK-8267123 removed RMI Activation (it does not use RMI Activation, it just wanted something "RMI" to connect with). Looking at the change it tested, the code is no longer the same, and is no longer at risk of this NPE. The original NPE fix was to check that jxmServerviceURL was not null before calling methods on it, but the current RMIConnector.java does not make those same calls. It is best to remove the test and its problemlist entry. ------------- Commit messages: - 8267887: RMIConnector_NPETest.java fails after removal of RMI Activation (JDK-8267123) Changes: https://git.openjdk.org/jdk/pull/20054/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20054&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8267887 Stats: 79 lines in 2 files changed: 0 ins; 79 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/20054.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20054/head:pull/20054 PR: https://git.openjdk.org/jdk/pull/20054 From cjplummer at openjdk.org Mon Jul 8 18:12:33 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Mon, 8 Jul 2024 18:12:33 GMT Subject: jmx-dev [jdk23] RFR: 8335124: com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed with CPU time out of expected range In-Reply-To: <7JorVYHv2FWSlD4ZQ3cEK_jQfKJweCJkH5jaNG_nsFw=.8e697bb4-260f-4ac6-bb86-6f6fb6e03f60@github.com> References: <7JorVYHv2FWSlD4ZQ3cEK_jQfKJweCJkH5jaNG_nsFw=.8e697bb4-260f-4ac6-bb86-6f6fb6e03f60@github.com> Message-ID: On Wed, 3 Jul 2024 08:24:43 GMT, Kevin Walls wrote: > Clean backport to jdk23 of a simple test update, to try and avoid spurious failures. Looks good. ------------- Marked as reviewed by cjplummer (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19999#pullrequestreview-2164031769 From dholmes at openjdk.org Tue Jul 9 08:24:34 2024 From: dholmes at openjdk.org (David Holmes) Date: Tue, 9 Jul 2024 08:24:34 GMT Subject: jmx-dev RFR: 8334777: Test javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java failed with NullPointerException [v2] In-Reply-To: <9FY2VW_Ny11qLW-J2zNcCVxJegPctIFXsWd7Q4VACQ4=.49014b43-0ff1-4bf4-a505-5633934c86b0@github.com> References: <-_HSPKzz3cGo1YpDj_lpT_hhg59LbEfXSzJ6tnltcBA=.03bfeffb-260f-4ba2-8a2a-87d03b884995@github.com> <9FY2VW_Ny11qLW-J2zNcCVxJegPctIFXsWd7Q4VACQ4=.49014b43-0ff1-4bf4-a505-5633934c86b0@github.com> Message-ID: On Fri, 28 Jun 2024 18:14:59 GMT, Kevin Walls wrote: >> Disable running this test with -Xcomp. >> >> The NPE seen in this test is due to a timeout establishing the connection. ServerCommunicatorAdmin hits its timeout, during an addNotificationListener call on a new connection. >> >> -Xcomp causes this slowdown and the failure is reproducible. There is no need to test this test with -Xcomp, we should exclude it as we do for various other tests. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > comment Okay ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19930#pullrequestreview-2165445432 From kevinw at openjdk.org Tue Jul 9 08:24:34 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 9 Jul 2024 08:24:34 GMT Subject: jmx-dev RFR: 8334777: Test javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java failed with NullPointerException [v2] In-Reply-To: <9FY2VW_Ny11qLW-J2zNcCVxJegPctIFXsWd7Q4VACQ4=.49014b43-0ff1-4bf4-a505-5633934c86b0@github.com> References: <-_HSPKzz3cGo1YpDj_lpT_hhg59LbEfXSzJ6tnltcBA=.03bfeffb-260f-4ba2-8a2a-87d03b884995@github.com> <9FY2VW_Ny11qLW-J2zNcCVxJegPctIFXsWd7Q4VACQ4=.49014b43-0ff1-4bf4-a505-5633934c86b0@github.com> Message-ID: On Fri, 28 Jun 2024 18:14:59 GMT, Kevin Walls wrote: >> Disable running this test with -Xcomp. >> >> The NPE seen in this test is due to a timeout establishing the connection. ServerCommunicatorAdmin hits its timeout, during an addNotificationListener call on a new connection. >> >> -Xcomp causes this slowdown and the failure is reproducible. There is no need to test this test with -Xcomp, we should exclude it as we do for various other tests. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > comment Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/19930#issuecomment-2216919357 From kevinw at openjdk.org Tue Jul 9 08:27:40 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 9 Jul 2024 08:27:40 GMT Subject: jmx-dev Integrated: 8334777: Test javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java failed with NullPointerException In-Reply-To: <-_HSPKzz3cGo1YpDj_lpT_hhg59LbEfXSzJ6tnltcBA=.03bfeffb-260f-4ba2-8a2a-87d03b884995@github.com> References: <-_HSPKzz3cGo1YpDj_lpT_hhg59LbEfXSzJ6tnltcBA=.03bfeffb-260f-4ba2-8a2a-87d03b884995@github.com> Message-ID: On Thu, 27 Jun 2024 15:53:09 GMT, Kevin Walls wrote: > Disable running this test with -Xcomp. > > The NPE seen in this test is due to a timeout establishing the connection. ServerCommunicatorAdmin hits its timeout, during an addNotificationListener call on a new connection. > > -Xcomp causes this slowdown and the failure is reproducible. There is no need to test this test with -Xcomp, we should exclude it as we do for various other tests. This pull request has now been integrated. Changeset: 2a296475 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/2a2964759c73b3b9ab6afaad109383c89952977b Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod 8334777: Test javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java failed with NullPointerException Reviewed-by: cjplummer, dholmes ------------- PR: https://git.openjdk.org/jdk/pull/19930 From kevinw at openjdk.org Tue Jul 9 19:42:19 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 9 Jul 2024 19:42:19 GMT Subject: jmx-dev [jdk23] Integrated: 8335124: com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed with CPU time out of expected range In-Reply-To: <7JorVYHv2FWSlD4ZQ3cEK_jQfKJweCJkH5jaNG_nsFw=.8e697bb4-260f-4ac6-bb86-6f6fb6e03f60@github.com> References: <7JorVYHv2FWSlD4ZQ3cEK_jQfKJweCJkH5jaNG_nsFw=.8e697bb4-260f-4ac6-bb86-6f6fb6e03f60@github.com> Message-ID: On Wed, 3 Jul 2024 08:24:43 GMT, Kevin Walls wrote: > Clean backport to jdk23 of a simple test update, to try and avoid spurious failures. This pull request has now been integrated. Changeset: 70ad622b Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/70ad622bc23fc5a1808466193fd6c7ea2f178ec9 Stats: 3 lines in 1 file changed: 2 ins; 1 del; 0 mod 8335124: com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed with CPU time out of expected range Reviewed-by: cjplummer Backport-of: 79a3554e1da604627b3a010dc269c1bd914c79d3 ------------- PR: https://git.openjdk.org/jdk/pull/19999 From cjplummer at openjdk.org Wed Jul 10 20:43:57 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 10 Jul 2024 20:43:57 GMT Subject: jmx-dev RFR: 8207908: JMXStatusTest.java fails assertion intermittently In-Reply-To: References: Message-ID: <6ztLJGdO276EPGtFWS7zgJHeRnVNX5o3RRimPGDGXvs=.ffc50758-9984-448e-b6c3-d1e84f279a95@github.com> On Thu, 4 Jul 2024 14:39:50 GMT, Kevin Walls wrote: > Test failure, reproducible running batches of tests at the same time on the same machine. > The use of "jcmd TestApp ..." gathers more output than the test wants and than its regexes can handle. > > Using the PID to match only the wanted process, my batches of 25 tests at the same time run in parallel without failure. Looks good. ------------- Marked as reviewed by cjplummer (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20037#pullrequestreview-2170245406 From cjplummer at openjdk.org Wed Jul 10 20:51:56 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 10 Jul 2024 20:51:56 GMT Subject: jmx-dev RFR: 8267887: RMIConnector_NPETest.java fails after removal of RMI Activation (JDK-8267123) In-Reply-To: References: Message-ID: On Fri, 5 Jul 2024 14:06:39 GMT, Kevin Walls wrote: > The test test/jdk/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java should be removed. > > This test was added when 6984520 was fixed in 6u25. It has been problemlisted since JDK-8267123 removed RMI Activation (it does not use RMI Activation, it just wanted something "RMI" to connect with). > > Looking at the change it tested, the code is no longer the same, and is no longer at risk of this NPE. > > The original NPE fix was to check that jxmServerviceURL was not null before calling methods on it, but the current RMIConnector.java does not make those same calls. > > It is best to remove the test and its problemlist entry. Looks good. ------------- Marked as reviewed by cjplummer (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20054#pullrequestreview-2170267350 From amenkov at openjdk.org Wed Jul 10 21:03:55 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Wed, 10 Jul 2024 21:03:55 GMT Subject: jmx-dev RFR: 8207908: JMXStatusTest.java fails assertion intermittently In-Reply-To: References: Message-ID: On Thu, 4 Jul 2024 14:39:50 GMT, Kevin Walls wrote: > Test failure, reproducible running batches of tests at the same time on the same machine. > The use of "jcmd TestApp ..." gathers more output than the test wants and than its regexes can handle. > > Using the PID to match only the wanted process, my batches of 25 tests at the same time run in parallel without failure. Marked as reviewed by amenkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/20037#pullrequestreview-2170309586 From kevinw at openjdk.org Wed Jul 10 21:26:56 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 10 Jul 2024 21:26:56 GMT Subject: jmx-dev RFR: 8207908: JMXStatusTest.java fails assertion intermittently In-Reply-To: References: Message-ID: On Thu, 4 Jul 2024 14:39:50 GMT, Kevin Walls wrote: > Test failure, reproducible running batches of tests at the same time on the same machine. > The use of "jcmd TestApp ..." gathers more output than the test wants and than its regexes can handle. > > Using the PID to match only the wanted process, my batches of 25 tests at the same time run in parallel without failure. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/20037#issuecomment-2221516370 From kevinw at openjdk.org Thu Jul 11 07:32:00 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 11 Jul 2024 07:32:00 GMT Subject: jmx-dev Integrated: 8207908: JMXStatusTest.java fails assertion intermittently In-Reply-To: References: Message-ID: On Thu, 4 Jul 2024 14:39:50 GMT, Kevin Walls wrote: > Test failure, reproducible running batches of tests at the same time on the same machine. > The use of "jcmd TestApp ..." gathers more output than the test wants and than its regexes can handle. > > Using the PID to match only the wanted process, my batches of 25 tests at the same time run in parallel without failure. This pull request has now been integrated. Changeset: b7d0eff5 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/b7d0eff5ad77e338b237773d2fc047eea3d2ac12 Stats: 9 lines in 2 files changed: 1 ins; 2 del; 6 mod 8207908: JMXStatusTest.java fails assertion intermittently Reviewed-by: cjplummer, amenkov ------------- PR: https://git.openjdk.org/jdk/pull/20037 From kevinw at openjdk.org Thu Jul 11 15:03:25 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 11 Jul 2024 15:03:25 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name Message-ID: Follow-on from JDK-8207908. Two tests are broken by that change: sun/management/jmxremote/startstop/JMXStartStopTest.java sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java These are additional tests which use jcmd and an application name pattern to find a process. They should use the PID to avoid finding a process from some other concurrent test invocation. So it's good to have the same kind of change applied here too. ------------- Commit messages: - 8336257: Additional tests in jmxremote/startstop to match on PID not app name Changes: https://git.openjdk.org/jdk/pull/20138/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20138&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8336257 Stats: 7 lines in 2 files changed: 3 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/20138.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20138/head:pull/20138 PR: https://git.openjdk.org/jdk/pull/20138 From cjplummer at openjdk.org Thu Jul 11 15:25:55 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Thu, 11 Jul 2024 15:25:55 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name In-Reply-To: References: Message-ID: On Thu, 11 Jul 2024 14:51:18 GMT, Kevin Walls wrote: > Follow-on from JDK-8207908. > > Two tests are broken by that change: > sun/management/jmxremote/startstop/JMXStartStopTest.java > sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java > > These are additional tests which use jcmd and an application name pattern to find a process. > They should use the PID to avoid finding a process from some other concurrent test invocation. > So it's good to have the same kind of change applied here too. test/jdk/sun/management/jmxremote/startstop/JMXStartStopTest.java line 351: > 349: pid = p.pid(); > 350: jcmd = new ManagementAgentJcmd(p, verbose); > 351: I don't think you want a blank line here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20138#discussion_r1674217138 From kevinw at openjdk.org Thu Jul 11 15:38:29 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 11 Jul 2024 15:38:29 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name [v2] In-Reply-To: References: Message-ID: > Follow-on from JDK-8207908. > > Two tests are broken by that change: > sun/management/jmxremote/startstop/JMXStartStopTest.java > sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java > > These are additional tests which use jcmd and an application name pattern to find a process. > They should use the PID to avoid finding a process from some other concurrent test invocation. > So it's good to have the same kind of change applied here too. Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: line ------------- Changes: - all: https://git.openjdk.org/jdk/pull/20138/files - new: https://git.openjdk.org/jdk/pull/20138/files/caaf27a0..9c025ea7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=20138&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20138&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/20138.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20138/head:pull/20138 PR: https://git.openjdk.org/jdk/pull/20138 From kevinw at openjdk.org Thu Jul 11 15:38:30 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 11 Jul 2024 15:38:30 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name [v2] In-Reply-To: References: Message-ID: <08TPoYWhaKMcUaJP6b1iE1JTfTBVokmnCHmestvg1lg=.14f71877-00d6-41b5-9e47-3aa92903c760@github.com> On Thu, 11 Jul 2024 15:22:54 GMT, Chris Plummer wrote: >> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: >> >> line > > test/jdk/sun/management/jmxremote/startstop/JMXStartStopTest.java line 351: > >> 349: pid = p.pid(); >> 350: jcmd = new ManagementAgentJcmd(p, verbose); >> 351: > > I don't think you want a blank line here. I don't mind the additional space, but ok have removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20138#discussion_r1674239544 From cjplummer at openjdk.org Thu Jul 11 16:01:57 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Thu, 11 Jul 2024 16:01:57 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name [v2] In-Reply-To: References: Message-ID: On Thu, 11 Jul 2024 15:38:29 GMT, Kevin Walls wrote: >> Follow-on from JDK-8207908. >> >> Two tests are broken by that change: >> sun/management/jmxremote/startstop/JMXStartStopTest.java >> sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java >> >> These are additional tests which use jcmd and an application name pattern to find a process. >> They should use the PID to avoid finding a process from some other concurrent test invocation. >> So it's good to have the same kind of change applied here too. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > line Marked as reviewed by cjplummer (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/20138#pullrequestreview-2172367956 From alanb at openjdk.org Thu Jul 11 16:48:56 2024 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 11 Jul 2024 16:48:56 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name [v2] In-Reply-To: References: Message-ID: <9So0cdd_2xrkZY99DfBsjDNj4d6PxVpjd1XfNzrKo98=.ed13266c-fc17-4d93-bf17-c6ff1a46506c@github.com> On Thu, 11 Jul 2024 15:38:29 GMT, Kevin Walls wrote: >> Follow-on from JDK-8207908. >> >> Two tests are broken by that change: >> sun/management/jmxremote/startstop/JMXStartStopTest.java >> sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java >> >> These are additional tests which use jcmd and an application name pattern to find a process. >> They should use the PID to avoid finding a process from some other concurrent test invocation. >> So it's good to have the same kind of change applied here too. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > line Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/20138#pullrequestreview-2172467658 From amenkov at openjdk.org Thu Jul 11 18:46:59 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Thu, 11 Jul 2024 18:46:59 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name [v2] In-Reply-To: References: Message-ID: On Thu, 11 Jul 2024 15:38:29 GMT, Kevin Walls wrote: >> Follow-on from JDK-8207908. >> >> Two tests are broken by that change: >> sun/management/jmxremote/startstop/JMXStartStopTest.java >> sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java >> >> These are additional tests which use jcmd and an application name pattern to find a process. >> They should use the PID to avoid finding a process from some other concurrent test invocation. >> So it's good to have the same kind of change applied here too. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > line Marked as reviewed by amenkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/20138#pullrequestreview-2172761638 From dcubed at openjdk.org Thu Jul 11 20:34:58 2024 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Thu, 11 Jul 2024 20:34:58 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name [v2] In-Reply-To: References: Message-ID: <5z16povNL44HwKLPQjIm-ypQm4dSD4TWCU8iguwZP6M=.2dcaab38-badb-42d6-8858-20e833a6e0fd@github.com> On Thu, 11 Jul 2024 15:38:29 GMT, Kevin Walls wrote: >> Follow-on from JDK-8207908. >> >> Two tests are broken by that change: >> sun/management/jmxremote/startstop/JMXStartStopTest.java >> sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java >> >> These are additional tests which use jcmd and an application name pattern to find a process. >> They should use the PID to avoid finding a process from some other concurrent test invocation. >> So it's good to have the same kind of change applied here too. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > line The fix looks good to me. I presume it has been tested with a Mach5 Tier3 job set. @kevinjwalls - When do you expect to integrate this fix? It looks like we're seeing 34 failures per Tier3 job set due to this issue. ------------- Marked as reviewed by dcubed (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20138#pullrequestreview-2172977359 PR Comment: https://git.openjdk.org/jdk/pull/20138#issuecomment-2223872373 From kevinw at openjdk.org Thu Jul 11 20:47:55 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 11 Jul 2024 20:47:55 GMT Subject: jmx-dev RFR: 8336257: Additional tests in jmxremote/startstop to match on PID not app name [v2] In-Reply-To: References: Message-ID: On Thu, 11 Jul 2024 15:38:29 GMT, Kevin Walls wrote: >> Follow-on from JDK-8207908. >> >> Two tests are broken by that change: >> sun/management/jmxremote/startstop/JMXStartStopTest.java >> sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java >> >> These are additional tests which use jcmd and an application name pattern to find a process. >> They should use the PID to avoid finding a process from some other concurrent test invocation. >> So it's good to have the same kind of change applied here too. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > line Yes, tier3 test job came back ok, will integrate now. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/20138#issuecomment-2223909205 From kevinw at openjdk.org Thu Jul 11 20:47:56 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 11 Jul 2024 20:47:56 GMT Subject: jmx-dev Integrated: 8336257: Additional tests in jmxremote/startstop to match on PID not app name In-Reply-To: References: Message-ID: On Thu, 11 Jul 2024 14:51:18 GMT, Kevin Walls wrote: > Follow-on from JDK-8207908. > > Two tests are broken by that change: > sun/management/jmxremote/startstop/JMXStartStopTest.java > sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java > > These are additional tests which use jcmd and an application name pattern to find a process. > They should use the PID to avoid finding a process from some other concurrent test invocation. > So it's good to have the same kind of change applied here too. This pull request has now been integrated. Changeset: 687601eb Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/687601ebcaedf133fd4d5cecc42c5aadf9c73f3c Stats: 6 lines in 2 files changed: 2 ins; 1 del; 3 mod 8336257: Additional tests in jmxremote/startstop to match on PID not app name Reviewed-by: cjplummer, alanb, amenkov, dcubed ------------- PR: https://git.openjdk.org/jdk/pull/20138 From sspitsyn at openjdk.org Fri Jul 12 03:32:51 2024 From: sspitsyn at openjdk.org (Serguei Spitsyn) Date: Fri, 12 Jul 2024 03:32:51 GMT Subject: jmx-dev RFR: 8267887: RMIConnector_NPETest.java fails after removal of RMI Activation (JDK-8267123) In-Reply-To: References: Message-ID: On Fri, 5 Jul 2024 14:06:39 GMT, Kevin Walls wrote: > The test test/jdk/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java should be removed. > > This test was added when 6984520 was fixed in 6u25. It has been problemlisted since JDK-8267123 removed RMI Activation (it does not use RMI Activation, it just wanted something "RMI" to connect with). > > Looking at the change it tested, the code is no longer the same, and is no longer at risk of this NPE. > > The original NPE fix was to check that jxmServerviceURL was not null before calling methods on it, but the current RMIConnector.java does not make those same calls. > > It is best to remove the test and its problemlist entry. Marked as reviewed by sspitsyn (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/20054#pullrequestreview-2173628927 From jwaters at openjdk.org Fri Jul 12 06:40:20 2024 From: jwaters at openjdk.org (Julian Waters) Date: Fri, 12 Jul 2024 06:40:20 GMT Subject: jmx-dev RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK Message-ID: snprintf has been available for all officially and unofficially supported compilers for Windows, Visual Studio since version 2015 and gcc since, well, forever. snprintf is conforming to C99 since the start when compiling using gcc, and 2015 when using Visual Studio. Since it conforms to C99 and provides better semantics than _snprintf, and is not compiler specific, we should use it in most places where we currently use _snprintf. This makes JDK code where this is used more robust due to the null terminating guarantee of snprintf. Since most of the changes are extremely simple, I've included all of them hoping to get this all done in one shot. The only places _snprintf is not replaced is places where I'm not sure whether the code is ours or not (As in, imported source code for external libraries). Note that the existing checks in place for the size of the characters written still work, as the return value of snprintf works mostly the same as _snprintf. The only difference is the null terminating character at the end and the returning of the number of written characters if the buffer was terminated early, as seen here: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170 Reviews Required: 2 for HotSpot, jdk.hotspot.agent, and jdk.jdwp.agent, 1 for awt and jdk.accessibility, 1 for java.base, 1 for security, 1 for jdk.management(?) ------------- Commit messages: - Obliterate most references to _snprintf in the Windows JDK Changes: https://git.openjdk.org/jdk/pull/20153/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20153&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8336289 Stats: 35 lines in 12 files changed: 0 ins; 16 del; 19 mod Patch: https://git.openjdk.org/jdk/pull/20153.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20153/head:pull/20153 PR: https://git.openjdk.org/jdk/pull/20153 From kevinw at openjdk.org Fri Jul 12 08:21:54 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 12 Jul 2024 08:21:54 GMT Subject: jmx-dev RFR: 8267887: RMIConnector_NPETest.java fails after removal of RMI Activation (JDK-8267123) In-Reply-To: References: Message-ID: On Fri, 5 Jul 2024 14:06:39 GMT, Kevin Walls wrote: > The test test/jdk/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java should be removed. > > This test was added when 6984520 was fixed in 6u25. It has been problemlisted since JDK-8267123 removed RMI Activation (it does not use RMI Activation, it just wanted something "RMI" to connect with). > > Looking at the change it tested, the code is no longer the same, and is no longer at risk of this NPE. > > The original NPE fix was to check that jxmServerviceURL was not null before calling methods on it, but the current RMIConnector.java does not make those same calls. > > It is best to remove the test and its problemlist entry. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/20054#issuecomment-2225065743 From kevinw at openjdk.org Fri Jul 12 08:21:54 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 12 Jul 2024 08:21:54 GMT Subject: jmx-dev Integrated: 8267887: RMIConnector_NPETest.java fails after removal of RMI Activation (JDK-8267123) In-Reply-To: References: Message-ID: On Fri, 5 Jul 2024 14:06:39 GMT, Kevin Walls wrote: > The test test/jdk/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java should be removed. > > This test was added when 6984520 was fixed in 6u25. It has been problemlisted since JDK-8267123 removed RMI Activation (it does not use RMI Activation, it just wanted something "RMI" to connect with). > > Looking at the change it tested, the code is no longer the same, and is no longer at risk of this NPE. > > The original NPE fix was to check that jxmServerviceURL was not null before calling methods on it, but the current RMIConnector.java does not make those same calls. > > It is best to remove the test and its problemlist entry. This pull request has now been integrated. Changeset: f677b90e Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/f677b90eb93026d3fdfd4ae19d48415a7d8318e8 Stats: 79 lines in 2 files changed: 0 ins; 79 del; 0 mod 8267887: RMIConnector_NPETest.java fails after removal of RMI Activation (JDK-8267123) Reviewed-by: cjplummer, sspitsyn ------------- PR: https://git.openjdk.org/jdk/pull/20054 From kbarrett at openjdk.org Fri Jul 12 19:20:51 2024 From: kbarrett at openjdk.org (Kim Barrett) Date: Fri, 12 Jul 2024 19:20:51 GMT Subject: jmx-dev RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK In-Reply-To: References: Message-ID: On Fri, 12 Jul 2024 06:29:34 GMT, Julian Waters wrote: > snprintf has been available for all officially and unofficially supported compilers for Windows, Visual Studio since version 2015 and gcc since, well, forever. snprintf is conforming to C99 since the start when compiling using gcc, and 2015 when using Visual Studio. Since it conforms to C99 and provides better semantics than _snprintf, and is not compiler specific, we should use it in most places where we currently use _snprintf. This makes JDK code where this is used more robust due to the null terminating guarantee of snprintf. Since most of the changes are extremely simple, I've included all of them hoping to get this all done in one shot. The only places _snprintf is not replaced is places where I'm not sure whether the code is ours or not (As in, imported source code for external libraries). Note that the existing checks in place for the size of the characters written still work, as the return value of snprintf works mostly the same as _snprintf. The only difference is the nul l terminating character at the end and the returning of the number of written characters if the buffer was terminated early, as seen here: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170 > > Reviews Required: 2 for HotSpot, jdk.hotspot.agent, and jdk.jdwp.agent, 1 for awt and jdk.accessibility, 1 for java.base, 1 for security, 1 for jdk.management(?) This should be using `os::snprintf` rather than `snprintf`. Rationale is in the comment here: https://github.com/openjdk/jdk/blob/1f6e106b45e5109224e13d70f1a40c9e666ec2ab/src/hotspot/share/runtime/os.cpp#L118-L126 And yes, I know there are lots of bare uses of snprintf (about 125?), including in shared code. That's why it isn't currently in the forbidden list. There's some cleanup to do there. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20153#issuecomment-2226218368 From jwaters at openjdk.org Sat Jul 13 05:14:52 2024 From: jwaters at openjdk.org (Julian Waters) Date: Sat, 13 Jul 2024 05:14:52 GMT Subject: jmx-dev RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK In-Reply-To: References: Message-ID: On Fri, 12 Jul 2024 19:18:09 GMT, Kim Barrett wrote: > This should be using `os::snprintf` rather than `snprintf`. Rationale is in the comment here: > > https://github.com/openjdk/jdk/blob/1f6e106b45e5109224e13d70f1a40c9e666ec2ab/src/hotspot/share/runtime/os.cpp#L118-L126 > > And yes, I know there are lots of bare uses of snprintf (about 125?), including in shared code. That's why it isn't currently in the forbidden list. There's some cleanup to do there. Ah, I'd assumed that the places where bare _snprintf was used had a reason for using it directly. I'll change all the usages in this Pull Request to use os::snprintf ------------- PR Comment: https://git.openjdk.org/jdk/pull/20153#issuecomment-2226776993 From jwaters at openjdk.org Sat Jul 13 05:34:24 2024 From: jwaters at openjdk.org (Julian Waters) Date: Sat, 13 Jul 2024 05:34:24 GMT Subject: jmx-dev RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v2] In-Reply-To: References: Message-ID: > snprintf has been available for all officially and unofficially supported compilers for Windows, Visual Studio since version 2015 and gcc since, well, forever. snprintf is conforming to C99 since the start when compiling using gcc, and 2015 when using Visual Studio. Since it conforms to C99 and provides better semantics than _snprintf, and is not compiler specific, we should use it in most places where we currently use _snprintf. This makes JDK code where this is used more robust due to the null terminating guarantee of snprintf. Since most of the changes are extremely simple, I've included all of them hoping to get this all done in one shot. The only places _snprintf is not replaced is places where I'm not sure whether the code is ours or not (As in, imported source code for external libraries). Note that the existing checks in place for the size of the characters written still work, as the return value of snprintf works mostly the same as _snprintf. The only difference is the nul l terminating character at the end and the returning of the number of written characters if the buffer was terminated early, as seen here: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170 > > Reviews Required: 2 for HotSpot, jdk.hotspot.agent, and jdk.jdwp.agent, 1 for awt and jdk.accessibility, 1 for java.base, 1 for security, 1 for jdk.management(?) Julian Waters has updated the pull request incrementally with one additional commit since the last revision: USe os::snprintf in HotSpot ------------- Changes: - all: https://git.openjdk.org/jdk/pull/20153/files - new: https://git.openjdk.org/jdk/pull/20153/files/20a8e2a0..1bd6bc09 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=20153&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20153&range=00-01 Stats: 6 lines in 3 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/20153.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20153/head:pull/20153 PR: https://git.openjdk.org/jdk/pull/20153 From jwaters at openjdk.org Sat Jul 13 05:36:50 2024 From: jwaters at openjdk.org (Julian Waters) Date: Sat, 13 Jul 2024 05:36:50 GMT Subject: jmx-dev RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK In-Reply-To: References: Message-ID: On Fri, 12 Jul 2024 06:29:34 GMT, Julian Waters wrote: > snprintf has been available for all officially and unofficially supported compilers for Windows, Visual Studio since version 2015 and gcc since, well, forever. snprintf is conforming to C99 since the start when compiling using gcc, and 2015 when using Visual Studio. Since it conforms to C99 and provides better semantics than _snprintf, and is not compiler specific, we should use it in most places where we currently use _snprintf. This makes JDK code where this is used more robust due to the null terminating guarantee of snprintf. Since most of the changes are extremely simple, I've included all of them hoping to get this all done in one shot. The only places _snprintf is not replaced is places where I'm not sure whether the code is ours or not (As in, imported source code for external libraries). Note that the existing checks in place for the size of the characters written still work, as the return value of snprintf works mostly the same as _snprintf. The only difference is the nul l terminating character at the end and the returning of the number of written characters if the buffer was terminated early, as seen here: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170 > > Reviews Required: 2 for HotSpot, jdk.hotspot.agent, and jdk.jdwp.agent, 1 for awt and jdk.accessibility, 1 for java.base, 1 for security, 1 for jdk.management(?) I would add a FORBID_C_FUNCTION for _snprintf for Windows, but unfortunately that would be completely useless since there's no way to restrict methods on Visual Studio ------------- PR Comment: https://git.openjdk.org/jdk/pull/20153#issuecomment-2226782288 From mcimadamore at openjdk.org Mon Jul 15 13:24:20 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 15 Jul 2024 13:24:20 GMT Subject: jmx-dev RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v9] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore 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 contains 12 additional commits since the last revision: - Merge branch 'master' into restricted_jni - Address review comments - Add note on --illegal-native-access default value in the launcher help - Address review comment - Refine warning text for JNI method binding - Address review comments Improve warning for JNI methods, similar to what's described in JEP 472 Beef up tests - Address review comments - Fix another typo - Fix typo - Add more comments - ... and 2 more: https://git.openjdk.org/jdk/compare/2ced23fe...ff51ac6a ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/789bdf48..ff51ac6a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=07-08 Stats: 168976 lines in 3271 files changed: 114666 ins; 38249 del; 16061 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From mcimadamore at openjdk.org Mon Jul 15 13:24:20 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 15 Jul 2024 13:24:20 GMT Subject: jmx-dev RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: <1f6cPvfYhyTzqeYoeA6uQi2WULB_Bq49AhF_RoEVWDQ=.9577a65e-b626-43fd-ab03-09783b978d94@github.com> On Fri, 17 May 2024 13:38:25 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comments keep alive ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2228489298