From amenkov at openjdk.org Fri Nov 1 00:53:34 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Fri, 1 Nov 2024 00:53:34 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> Message-ID: On Thu, 31 Oct 2024 12:11:41 GMT, Kevin Walls wrote: > Test update: fail when it hits an Exception. > > This test still references jmxmp and iiop, which are of course redundant, there are various tests that still do this. > I am working on http, so we may revisit these tests in future to change their list of protocols. > > For now, I'd like to simply make this test fail if any of the protocols it tests have failures. > Fix a few typos while we are here. Marked as reviewed by amenkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21804#pullrequestreview-2409308811 From kevinw at openjdk.org Fri Nov 1 07:55:27 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 1 Nov 2024 07:55:27 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: <07kSV5FDDKBnyWvsM8qELMdZ7llvUV_l_HjS4sWgT6k=.5bd99d2e-73b8-409a-a1d8-b09a69f23493@github.com> References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> <07kSV5FDDKBnyWvsM8qELMdZ7llvUV_l_HjS4sWgT6k=.5bd99d2e-73b8-409a-a1d8-b09a69f23493@github.com> Message-ID: On Thu, 31 Oct 2024 21:57:10 GMT, Chris Plummer wrote: >> I actually think it's more readable with the comma. >> If there is (one protocol failure), then that (fails the test). >> Without the comma, "failure fails" runs together, but the failure did not fail, it was a perfectly good failure. Pause for breath. What do we do now? Well, experiencing that kind of problem, fails the test. >> >> Extended discussions on language style, from the test that brought you "listner" and "should no block". 8-) > > The best way to get to the right answer here is simplify to the subject and verb: "failure fails". You don't put a comma between the subject and the verb, unless is something more much complex like "a failure, for which there can be more than one, fails the test". I think the reason you feel it reads better with the comma is because of the repetition of "fail". Would you still want a comma if the sentence was "any one protocol error fails the test"? I assume no, but the sentence is structurally identical. Right, it is the repetition that makes me want the comma. There are other ways of phrasing this which would not need the comma. Even then, I still might introduce one to imply a pause, which I still think helps make it unambiguous on first read, without making it "...causes the test to fail" which is unnecessarily lengthy. It's also a comment buried in a test, not front page news. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21804#discussion_r1825551758 From kevinw at openjdk.org Fri Nov 1 08:38:31 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 1 Nov 2024 08:38:31 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> Message-ID: On Thu, 31 Oct 2024 12:11:41 GMT, Kevin Walls wrote: > Test update: fail when it hits an Exception. > > This test still references jmxmp and iiop, which are of course redundant, there are various tests that still do this. > I am working on http, so we may revisit these tests in future to change their list of protocols. > > For now, I'd like to simply make this test fail if any of the protocols it tests have failures. > Fix a few typos while we are here. Thanks Alex! ------------- PR Comment: https://git.openjdk.org/jdk/pull/21804#issuecomment-2451512243 From kevinw at openjdk.org Fri Nov 1 08:38:31 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 1 Nov 2024 08:38:31 GMT Subject: jmx-dev Integrated: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> Message-ID: On Thu, 31 Oct 2024 12:11:41 GMT, Kevin Walls wrote: > Test update: fail when it hits an Exception. > > This test still references jmxmp and iiop, which are of course redundant, there are various tests that still do this. > I am working on http, so we may revisit these tests in future to change their list of protocols. > > For now, I'd like to simply make this test fail if any of the protocols it tests have failures. > Fix a few typos while we are here. This pull request has now been integrated. Changeset: 4a70c83b Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/4a70c83bd0c563185123ce9d8a34e006c62db7cc Stats: 11 lines in 1 file changed: 4 ins; 1 del; 6 mod 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure Reviewed-by: amenkov ------------- PR: https://git.openjdk.org/jdk/pull/21804 From cjplummer at openjdk.org Fri Nov 1 17:21:33 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Fri, 1 Nov 2024 17:21:33 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> <07kSV5FDDKBnyWvsM8qELMdZ7llvUV_l_HjS4sWgT6k=.5bd99d2e-73b8-409a-a1d8-b09a69f23493@github.com> Message-ID: On Fri, 1 Nov 2024 07:53:20 GMT, Kevin Walls wrote: >> The best way to get to the right answer here is simplify to the subject and verb: "failure fails". You don't put a comma between the subject and the verb, unless is something more much complex like "a failure, for which there can be more than one, fails the test". I think the reason you feel it reads better with the comma is because of the repetition of "fail". Would you still want a comma if the sentence was "any one protocol error fails the test"? I assume no, but the sentence is structurally identical. > > Right, it is the repetition that makes me want the comma. There are other ways of phrasing this which would not need the comma. Even then, I still might introduce one to imply a pause, which I still think helps make it unambiguous on first read, without making it "...causes the test to fail" which is unnecessarily lengthy. It's also a comment buried in a test, not front page news. My 8th grade grammar teacher took no pity on students with "comma-itis" as he called it. They got penalized harshly for gratuitous use of commas. He definitely got through to me though. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21804#discussion_r1826091908 From kevinw at openjdk.org Fri Nov 1 17:40:31 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 1 Nov 2024 17:40:31 GMT Subject: jmx-dev RFR: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure In-Reply-To: References: <-gJdcK0JYzbY92LW6AhSuhNbf5wRF-RdsYYCoHdhIfI=.54d5b240-e7c2-42e7-82d0-93835a141bd4@github.com> <07kSV5FDDKBnyWvsM8qELMdZ7llvUV_l_HjS4sWgT6k=.5bd99d2e-73b8-409a-a1d8-b09a69f23493@github.com> Message-ID: On Fri, 1 Nov 2024 17:18:50 GMT, Chris Plummer wrote: >> Right, it is the repetition that makes me want the comma. There are other ways of phrasing this which would not need the comma. Even then, I still might introduce one to imply a pause, which I still think helps make it unambiguous on first read, without making it "...causes the test to fail" which is unnecessarily lengthy. It's also a comment buried in a test, not front page news. > > My 8th grade grammar teacher took no pity on students with "comma-itis" as he called it. They got penalized harshly for gratuitous use of commas. He definitely got through to me though. I think he should meet my parents, Jay-Z and Beyonce. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21804#discussion_r1826111791 From acobbs at openjdk.org Sat Nov 2 16:09:56 2024 From: acobbs at openjdk.org (Archie Cobbs) Date: Sat, 2 Nov 2024 16:09:56 GMT Subject: jmx-dev RFR: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) Message-ID: @SuppressWarnings annotations that don't actually suppress any warnings create a potential pathway for future bugs to creep in unnoticed. They should be removed if possible. This issue is for those JDK files with the "serviceability" label. ------------- Commit messages: - Remove unnecessary @SuppressWarnings annotations. Changes: https://git.openjdk.org/jdk/pull/21857/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21857&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8343483 Stats: 21 lines in 16 files changed: 0 ins; 16 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/21857.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21857/head:pull/21857 PR: https://git.openjdk.org/jdk/pull/21857 From acobbs at openjdk.org Sun Nov 3 03:11:54 2024 From: acobbs at openjdk.org (Archie Cobbs) Date: Sun, 3 Nov 2024 03:11:54 GMT Subject: jmx-dev RFR: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) [v2] In-Reply-To: References: Message-ID: > Please review this patch which removes unnecessary `@SuppressWarnings` annotations. Archie Cobbs 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 four additional commits since the last revision: - Update copyright years. - Merge branch 'master' into SuppressWarningsCleanup-serviceability - Merge branch 'master' into SuppressWarningsCleanup-serviceability - Remove unnecessary @SuppressWarnings annotations. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/21857/files - new: https://git.openjdk.org/jdk/pull/21857/files/4de38fe6..a8e438be Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=21857&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21857&range=00-01 Stats: 3237 lines in 135 files changed: 2078 ins; 749 del; 410 mod Patch: https://git.openjdk.org/jdk/pull/21857.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21857/head:pull/21857 PR: https://git.openjdk.org/jdk/pull/21857 From kevinw at openjdk.org Mon Nov 4 18:23:20 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 4 Nov 2024 18:23:20 GMT Subject: jmx-dev RFR: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table Message-ID: This test is sensitive to timing, and should not run with -Xcomp (like NotifReconnectDeadlockTest.java). With -Xcomp, this test can fail on the the conn.getDefaultDomain() call, but if we handle that, it can also fail on the first iteration through the loop, at the call: JMXConnector client = JMXConnectorFactory.connect(addr, env); This test sets a short timeout value for connections, and -Xcomp slows things down greatly. RMI is gone before the connection is established. ------------- Commit messages: - 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table Changes: https://git.openjdk.org/jdk/pull/21884/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21884&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8343491 Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/21884.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21884/head:pull/21884 PR: https://git.openjdk.org/jdk/pull/21884 From lmesnik at openjdk.org Thu Nov 7 16:06:45 2024 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Thu, 7 Nov 2024 16:06:45 GMT Subject: jmx-dev RFR: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table In-Reply-To: References: Message-ID: On Mon, 4 Nov 2024 18:15:37 GMT, Kevin Walls wrote: > This test is sensitive to timing, and should not run with -Xcomp (like NotifReconnectDeadlockTest.java). > > With -Xcomp, this test can fail on the the conn.getDefaultDomain() call, but if we handle that, it can also fail on the first iteration through the loop, at the call: JMXConnector client = JMXConnectorFactory.connect(addr, env); > > This test sets a short timeout value for connections, and -Xcomp slows things down greatly. RMI is gone before the connection is established. Marked as reviewed by lmesnik (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21884#pullrequestreview-2421433057 From cjplummer at openjdk.org Thu Nov 7 16:11:43 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Thu, 7 Nov 2024 16:11:43 GMT Subject: jmx-dev RFR: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table In-Reply-To: References: Message-ID: On Mon, 4 Nov 2024 18:15:37 GMT, Kevin Walls wrote: > This test is sensitive to timing, and should not run with -Xcomp (like NotifReconnectDeadlockTest.java). > > With -Xcomp, this test can fail on the the conn.getDefaultDomain() call, but if we handle that, it can also fail on the first iteration through the loop, at the call: JMXConnector client = JMXConnectorFactory.connect(addr, env); > > This test sets a short timeout value for connections, and -Xcomp slows things down greatly. RMI is gone before the connection is established. What changed that caused it to suddenly start failing a lot? ------------- PR Comment: https://git.openjdk.org/jdk/pull/21884#issuecomment-2462631378 From kevinw at openjdk.org Thu Nov 7 16:45:43 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 7 Nov 2024 16:45:43 GMT Subject: jmx-dev RFR: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table In-Reply-To: References: Message-ID: On Thu, 7 Nov 2024 16:09:22 GMT, Chris Plummer wrote: > What changed that caused it to suddenly start failing a lot? This is the test I changed recently in JDK-8343378 -- it used to not fail even if it threw an Exception. So I make that change, test, and see no failures. But of course -Xcomp testing comes around in tier8 and that can fail... Test sets a short connection timeout so is very timing-sensitive... (I've now linked the bugs.) ------------- PR Comment: https://git.openjdk.org/jdk/pull/21884#issuecomment-2462722488 From sspitsyn at openjdk.org Thu Nov 7 17:51:45 2024 From: sspitsyn at openjdk.org (Serguei Spitsyn) Date: Thu, 7 Nov 2024 17:51:45 GMT Subject: jmx-dev RFR: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table In-Reply-To: References: Message-ID: On Mon, 4 Nov 2024 18:15:37 GMT, Kevin Walls wrote: > This test is sensitive to timing, and should not run with -Xcomp (like NotifReconnectDeadlockTest.java). > > With -Xcomp, this test can fail on the the conn.getDefaultDomain() call, but if we handle that, it can also fail on the first iteration through the loop, at the call: JMXConnector client = JMXConnectorFactory.connect(addr, env); > > This test sets a short timeout value for connections, and -Xcomp slows things down greatly. RMI is gone before the connection is established. Looks good. ------------- Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21884#pullrequestreview-2421751960 From cjplummer at openjdk.org Thu Nov 7 18:06:42 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Thu, 7 Nov 2024 18:06:42 GMT Subject: jmx-dev RFR: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table In-Reply-To: References: Message-ID: On Mon, 4 Nov 2024 18:15:37 GMT, Kevin Walls wrote: > This test is sensitive to timing, and should not run with -Xcomp (like NotifReconnectDeadlockTest.java). > > With -Xcomp, this test can fail on the the conn.getDefaultDomain() call, but if we handle that, it can also fail on the first iteration through the loop, at the call: JMXConnector client = JMXConnectorFactory.connect(addr, env); > > This test sets a short timeout value for connections, and -Xcomp slows things down greatly. RMI is gone before the connection is established. Ok. Looks good. ------------- Marked as reviewed by cjplummer (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21884#pullrequestreview-2421780061 From kevinw at openjdk.org Thu Nov 7 18:16:54 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 7 Nov 2024 18:16:54 GMT Subject: jmx-dev RFR: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table In-Reply-To: References: Message-ID: On Mon, 4 Nov 2024 18:15:37 GMT, Kevin Walls wrote: > This test is sensitive to timing, and should not run with -Xcomp (like NotifReconnectDeadlockTest.java). > > With -Xcomp, this test can fail on the the conn.getDefaultDomain() call, but if we handle that, it can also fail on the first iteration through the loop, at the call: JMXConnector client = JMXConnectorFactory.connect(addr, env); > > This test sets a short timeout value for connections, and -Xcomp slows things down greatly. RMI is gone before the connection is established. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/21884#issuecomment-2462919164 From kevinw at openjdk.org Thu Nov 7 18:16:54 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 7 Nov 2024 18:16:54 GMT Subject: jmx-dev Integrated: 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table In-Reply-To: References: Message-ID: On Mon, 4 Nov 2024 18:15:37 GMT, Kevin Walls wrote: > This test is sensitive to timing, and should not run with -Xcomp (like NotifReconnectDeadlockTest.java). > > With -Xcomp, this test can fail on the the conn.getDefaultDomain() call, but if we handle that, it can also fail on the first iteration through the loop, at the call: JMXConnector client = JMXConnectorFactory.connect(addr, env); > > This test sets a short timeout value for connections, and -Xcomp slows things down greatly. RMI is gone before the connection is established. This pull request has now been integrated. Changeset: 4f5a241e Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/4f5a241ec11981bcb5f8ab0936b0e821ec5a03ce Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod 8343491: javax/management/remote/mandatory/connection/DeadLockTest.java failing with NoSuchObjectException: no such object in table Reviewed-by: lmesnik, sspitsyn, cjplummer ------------- PR: https://git.openjdk.org/jdk/pull/21884 From acobbs at openjdk.org Fri Nov 8 19:07:34 2024 From: acobbs at openjdk.org (Archie Cobbs) Date: Fri, 8 Nov 2024 19:07:34 GMT Subject: jmx-dev RFR: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) [v3] In-Reply-To: References: Message-ID: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> > Please review this patch which removes unnecessary `@SuppressWarnings` annotations. Archie Cobbs 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 five additional commits since the last revision: - Merge branch 'master' into SuppressWarningsCleanup-serviceability - Update copyright years. - Merge branch 'master' into SuppressWarningsCleanup-serviceability - Merge branch 'master' into SuppressWarningsCleanup-serviceability - Remove unnecessary @SuppressWarnings annotations. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/21857/files - new: https://git.openjdk.org/jdk/pull/21857/files/a8e438be..d41ae604 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=21857&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21857&range=01-02 Stats: 131587 lines in 749 files changed: 103986 ins; 9680 del; 17921 mod Patch: https://git.openjdk.org/jdk/pull/21857.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21857/head:pull/21857 PR: https://git.openjdk.org/jdk/pull/21857 From kevinw at openjdk.org Mon Nov 11 12:39:37 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 11 Nov 2024 12:39:37 GMT Subject: jmx-dev RFR: 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java Message-ID: Test timeout change to cope with -Xcomp runs. Long-standing problemlisted test. With -Xcomp locally I could see a failure on the second attempt. After this change, ran more runs locally and 40 runs per platform in CI are OK. ------------- Commit messages: - Merge remote-tracking branch 'upstream/master' into 8042211_DerivedGaugeMonitorTest - 8042211: javax/management/monitor/DerivedGaugeMonitorTest.java AByte: Count down not reached Changes: https://git.openjdk.org/jdk/pull/22008/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22008&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8343936 Stats: 6 lines in 2 files changed: 2 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/22008.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22008/head:pull/22008 PR: https://git.openjdk.org/jdk/pull/22008 From dfuchs at openjdk.org Mon Nov 11 14:49:12 2024 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 11 Nov 2024 14:49:12 GMT Subject: jmx-dev RFR: 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java In-Reply-To: References: Message-ID: On Mon, 11 Nov 2024 11:06:17 GMT, Kevin Walls wrote: > Test timeout change to cope with -Xcomp runs. > Long-standing problemlisted test. > > With -Xcomp locally I could see a failure on the second attempt. > After this change, ran more runs locally and 40 runs per platform in CI are OK. Looks reasonable to me. A possible alternative would be to use `jdk.test.lib.Utils.adjustTimeout(long)` to take into account the `timeoutFactor`. IIRC tests run with an icreased `timeoutFactor` when run with -Xcomp ------------- PR Review: https://git.openjdk.org/jdk/pull/22008#pullrequestreview-2427486147 From kevinw at openjdk.org Mon Nov 11 17:45:02 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 11 Nov 2024 17:45:02 GMT Subject: jmx-dev RFR: 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java [v2] In-Reply-To: References: Message-ID: > Test timeout change to cope with -Xcomp runs. > Long-standing problemlisted test. > > With -Xcomp locally I could see a failure on the second attempt. > After this change, ran more runs locally and 40 runs per platform in CI are OK. Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: Use adjustTimeout / test.timeout.factor ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22008/files - new: https://git.openjdk.org/jdk/pull/22008/files/84e285a5..1bb1cbba Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22008&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22008&range=00-01 Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/22008.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22008/head:pull/22008 PR: https://git.openjdk.org/jdk/pull/22008 From kevinw at openjdk.org Mon Nov 11 17:45:02 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 11 Nov 2024 17:45:02 GMT Subject: jmx-dev RFR: 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java [v2] In-Reply-To: References: Message-ID: On Mon, 11 Nov 2024 14:46:28 GMT, Daniel Fuchs wrote: > `jdk.test.lib.Utils.adjustTimeout(long)` to take into account the `timeoutFactor`. IIRC tests run with an icreased `timeoutFactor` when run with -Xcomp OK sure 8-) ------------- PR Comment: https://git.openjdk.org/jdk/pull/22008#issuecomment-2468714269 From dfuchs at openjdk.org Mon Nov 11 17:50:20 2024 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 11 Nov 2024 17:50:20 GMT Subject: jmx-dev RFR: 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java [v2] In-Reply-To: References: Message-ID: On Mon, 11 Nov 2024 17:45:02 GMT, Kevin Walls wrote: >> Test timeout change to cope with -Xcomp runs. >> Long-standing problemlisted test. >> >> With -Xcomp locally I could see a failure on the second attempt. >> After this change, ran more runs locally and 40 runs per platform in CI are OK. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Use adjustTimeout / test.timeout.factor Marked as reviewed by dfuchs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22008#pullrequestreview-2427850408 From kevinw at openjdk.org Mon Nov 11 17:50:20 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 11 Nov 2024 17:50:20 GMT Subject: jmx-dev RFR: 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java [v2] In-Reply-To: References: Message-ID: On Mon, 11 Nov 2024 17:45:02 GMT, Kevin Walls wrote: >> Test timeout change to cope with -Xcomp runs. >> Long-standing problemlisted test. >> >> With -Xcomp locally I could see a failure on the second attempt. >> After this change, ran more runs locally and 40 runs per platform in CI are OK. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Use adjustTimeout / test.timeout.factor Thanks Daniel! ------------- PR Comment: https://git.openjdk.org/jdk/pull/22008#issuecomment-2468723167 From kevinw at openjdk.org Tue Nov 12 09:17:13 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 12 Nov 2024 09:17:13 GMT Subject: jmx-dev Integrated: 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java In-Reply-To: References: Message-ID: On Mon, 11 Nov 2024 11:06:17 GMT, Kevin Walls wrote: > Test timeout change to cope with -Xcomp runs. > Long-standing problemlisted test. > > With -Xcomp locally I could see a failure on the second attempt. > After this change, ran more runs locally and 40 runs per platform in CI are OK. This pull request has now been integrated. Changeset: 4fa760a1 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/4fa760a1ed24ad2e6fba6dca51c5cf7dc7436719 Stats: 9 lines in 2 files changed: 5 ins; 2 del; 2 mod 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java Reviewed-by: dfuchs ------------- PR: https://git.openjdk.org/jdk/pull/22008 From cjplummer at openjdk.org Tue Nov 12 18:58:45 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Tue, 12 Nov 2024 18:58:45 GMT Subject: jmx-dev RFR: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) [v3] In-Reply-To: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> References: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> Message-ID: On Fri, 8 Nov 2024 19:07:34 GMT, Archie Cobbs wrote: >> Please review this patch which removes unnecessary `@SuppressWarnings` annotations. > > Archie Cobbs 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 five additional commits since the last revision: > > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Update copyright years. > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Remove unnecessary @SuppressWarnings annotations. How were these discovered and what testing did you do? ------------- PR Comment: https://git.openjdk.org/jdk/pull/21857#issuecomment-2471320752 From acobbs at openjdk.org Tue Nov 12 19:07:30 2024 From: acobbs at openjdk.org (Archie Cobbs) Date: Tue, 12 Nov 2024 19:07:30 GMT Subject: jmx-dev RFR: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) [v3] In-Reply-To: References: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> Message-ID: On Tue, 12 Nov 2024 18:54:30 GMT, Chris Plummer wrote: >> Archie Cobbs 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 five additional commits since the last revision: >> >> - Merge branch 'master' into SuppressWarningsCleanup-serviceability >> - Update copyright years. >> - Merge branch 'master' into SuppressWarningsCleanup-serviceability >> - Merge branch 'master' into SuppressWarningsCleanup-serviceability >> - Remove unnecessary @SuppressWarnings annotations. > > How were these discovered and what testing did you do? Hi @plummercj, > How were these discovered See [this thread](https://mail.openjdk.org/pipermail/compiler-dev/2024-November/028573.html). There is a proposal to add a new compiler lint warning for unnecessary `@SuppressWarnings` annotations and these were flagged by the prototype. > and what testing did you do? The only testing done was verifying that the JDK still builds and passes the Github checks without them. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21857#issuecomment-2471340369 From cjplummer at openjdk.org Tue Nov 12 19:49:36 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Tue, 12 Nov 2024 19:49:36 GMT Subject: jmx-dev RFR: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) [v3] In-Reply-To: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> References: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> Message-ID: On Fri, 8 Nov 2024 19:07:34 GMT, Archie Cobbs wrote: >> Please review this patch which removes unnecessary `@SuppressWarnings` annotations. > > Archie Cobbs 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 five additional commits since the last revision: > > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Update copyright years. > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Remove unnecessary @SuppressWarnings annotations. Marked as reviewed by cjplummer (Reviewer). Ok. I suppose this is really only a build concern and not a testing concern, so passing the builds should be enough. ------------- PR Review: https://git.openjdk.org/jdk/pull/21857#pullrequestreview-2430534537 PR Comment: https://git.openjdk.org/jdk/pull/21857#issuecomment-2471425071 From acobbs at openjdk.org Wed Nov 13 17:00:45 2024 From: acobbs at openjdk.org (Archie Cobbs) Date: Wed, 13 Nov 2024 17:00:45 GMT Subject: jmx-dev RFR: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) [v3] In-Reply-To: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> References: <_4If4-yI_2rJlVYS-46qWRN0jioXUaTQss5kwiKOZKA=.81964925-b455-49a3-b226-29a3c5052b35@github.com> Message-ID: On Fri, 8 Nov 2024 19:07:34 GMT, Archie Cobbs wrote: >> Please review this patch which removes unnecessary `@SuppressWarnings` annotations. > > Archie Cobbs 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 five additional commits since the last revision: > > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Update copyright years. > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Merge branch 'master' into SuppressWarningsCleanup-serviceability > - Remove unnecessary @SuppressWarnings annotations. Thanks for the review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21857#issuecomment-2474200300 From acobbs at openjdk.org Wed Nov 13 17:00:45 2024 From: acobbs at openjdk.org (Archie Cobbs) Date: Wed, 13 Nov 2024 17:00:45 GMT Subject: jmx-dev Integrated: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) In-Reply-To: References: Message-ID: On Sat, 2 Nov 2024 16:04:10 GMT, Archie Cobbs wrote: > Please review this patch which removes unnecessary `@SuppressWarnings` annotations. This pull request has now been integrated. Changeset: a5f11b5f Author: Archie Cobbs URL: https://git.openjdk.org/jdk/commit/a5f11b5f775be6c1d9593562ba65912261efdf52 Stats: 35 lines in 16 files changed: 0 ins; 16 del; 19 mod 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability) Reviewed-by: cjplummer ------------- PR: https://git.openjdk.org/jdk/pull/21857 From kevinw at openjdk.org Mon Nov 18 11:10:28 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 18 Nov 2024 11:10:28 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent Message-ID: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Remove redundant SecurityManager, AccessController references (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. ------------- Commit messages: - oops - 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent Changes: https://git.openjdk.org/jdk/pull/22155/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8344181 Stats: 119 lines in 9 files changed: 0 ins; 78 del; 41 mod Patch: https://git.openjdk.org/jdk/pull/22155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22155/head:pull/22155 PR: https://git.openjdk.org/jdk/pull/22155 From amenkov at openjdk.org Mon Nov 18 19:41:54 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Mon, 18 Nov 2024 19:41:54 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent In-Reply-To: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: On Fri, 15 Nov 2024 17:36:30 GMT, Kevin Walls wrote: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java > There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... > > src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java > Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java line 72: > 70: Field f = cl.getDeclaredField("builder"); > 71: f.setAccessible(true); > 72: builder = (GcInfoBuilder) f.get(gcNotifInfo.getGcInfo()); Suggestion: builder = (GcInfoBuilder)f.get(gcNotifInfo.getGcInfo()); src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java line 77: > 75: Field f = cl.getDeclaredField("builder"); > 76: f.setAccessible(true); > 77: builder = (GcInfoBuilder)f.get(info); Suggestion: builder = (GcInfoBuilder)f.get(info); src/jdk.management/share/classes/com/sun/management/internal/HotSpotDiagnostic.java line 52: > 50: > 51: String propertyName = "jdk.management.heapdump.allowAnyFileSuffix"; > 52: boolean allowAnyFileSuffix = Boolean.parseBoolean(System.getProperty(propertyName, "false")); can be simplified to `Boolean.getBoolean(propertyName)` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1847129967 PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1847133367 PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1847140386 From kevinw at openjdk.org Tue Nov 19 14:24:16 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 19 Nov 2024 14:24:16 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: <3kuJKDnBK8DoOcHtAZLhSBEuBld0wnwDYQUWHXL-tbU=.694bca26-4722-47ee-969d-21c0f0da5252@github.com> On Mon, 18 Nov 2024 19:25:36 GMT, Alex Menkov wrote: >> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: >> >> - space >> - Missed getBoolean > > src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java line 77: > >> 75: Field f = cl.getDeclaredField("builder"); >> 76: f.setAccessible(true); >> 77: builder = (GcInfoBuilder)f.get(info); > > Suggestion: > > builder = (GcInfoBuilder)f.get(info); done > src/jdk.management/share/classes/com/sun/management/internal/HotSpotDiagnostic.java line 52: > >> 50: >> 51: String propertyName = "jdk.management.heapdump.allowAnyFileSuffix"; >> 52: boolean allowAnyFileSuffix = Boolean.parseBoolean(System.getProperty(propertyName, "false")); > > can be simplified to `Boolean.getBoolean(propertyName)` Yes, missed that. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1848455057 PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1848454800 From kevinw at openjdk.org Tue Nov 19 14:24:15 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 19 Nov 2024 14:24:15 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java > There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... > > src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java > Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: - space - Missed getBoolean ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22155/files - new: https://git.openjdk.org/jdk/pull/22155/files/6922bce4..39ae0074 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/22155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22155/head:pull/22155 PR: https://git.openjdk.org/jdk/pull/22155 From kevinw at openjdk.org Tue Nov 19 14:29:55 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 19 Nov 2024 14:29:55 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: On Mon, 18 Nov 2024 19:22:30 GMT, Alex Menkov wrote: >> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: >> >> - space >> - Missed getBoolean > > src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java line 72: > >> 70: Field f = cl.getDeclaredField("builder"); >> 71: f.setAccessible(true); >> 72: builder = (GcInfoBuilder) f.get(gcNotifInfo.getGcInfo()); > > Suggestion: > > builder = (GcInfoBuilder)f.get(gcNotifInfo.getGcInfo()); OK, it was missing the space before, when moving it around I added the space, as that's what we normally have. In this directory there is a mixture of the two styles, with and without spaces. I hope it's OK to let this one migrate to the more modern style. 8-) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1848465465 From cjplummer at openjdk.org Wed Nov 20 05:03:18 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 20 Nov 2024 05:03:18 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: On Tue, 19 Nov 2024 14:24:15 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). >> >> src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java >> There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... >> >> src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java >> Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. > > Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: > > - space > - Missed getBoolean Changes requested by cjplummer (Reviewer). src/jdk.management/share/classes/com/sun/management/internal/HotSpotDiagnostic.java line 189: > 187: if (cause instanceof RuntimeException e) > 188: throw e; > 189: throw new RuntimeException(cause); I think you've made an assumption that these are all related to lack of prividleges. I don't think that is the case, and they are all exceptions that can result from calling dumpThreads(). I think you need a try block around the dumpThreads() call that handles all these exceptions in the same manner. ------------- PR Review: https://git.openjdk.org/jdk/pull/22155#pullrequestreview-2447385562 PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1849535744 From cjplummer at openjdk.org Wed Nov 20 05:22:19 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 20 Nov 2024 05:22:19 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: <6lSK4gg7iYXgLFOq0cNUUy0cNh7KWAqdNUyppdMQZrA=.46163af1-3b92-4844-86e3-298633fe7c06@github.com> On Tue, 19 Nov 2024 14:24:15 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). >> >> src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java >> There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... >> >> src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java >> Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. > > Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: > > - space > - Missed getBoolean src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java line 39: > 37: import java.net.UnknownHostException; > 38: import java.nio.BufferUnderflowException; > 39: import java.security.PrivilegedAction; It doesn't look like java.security.PrivilegedAction is needed. src/jdk.management/share/classes/com/sun/management/internal/DiagnosticCommandImpl.java line 152: > 150: > 151: public String execute(String[] args) { > 152: if (permission != null) { There is a lot of code that remains related to assigning a value to `permission`. It looks like it should also be removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1849523979 PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1849529065 From kevinw at openjdk.org Wed Nov 20 10:32:27 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 20 Nov 2024 10:32:27 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: <6lSK4gg7iYXgLFOq0cNUUy0cNh7KWAqdNUyppdMQZrA=.46163af1-3b92-4844-86e3-298633fe7c06@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> <6lSK4gg7iYXgLFOq0cNUUy0cNh7KWAqdNUyppdMQZrA=.46163af1-3b92-4844-86e3-298633fe7c06@github.com> Message-ID: On Wed, 20 Nov 2024 04:51:44 GMT, Chris Plummer wrote: >> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: >> >> - space >> - Missed getBoolean > > src/jdk.management/share/classes/com/sun/management/internal/DiagnosticCommandImpl.java line 152: > >> 150: >> 151: public String execute(String[] args) { >> 152: if (permission != null) { > > There is a lot of code that remains related to assigning a value to `permission`. It looks like it should also be removed. Right, Permission in the class Wrapper, commandDescriptor manipulates a map with permission info, there's native code that passes this between the JVM and library code.... Would like to do that separately in: JDK-8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1850042500 From kevinw at openjdk.org Wed Nov 20 12:17:21 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 20 Nov 2024 12:17:21 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: On Wed, 20 Nov 2024 05:00:13 GMT, Chris Plummer wrote: >> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: >> >> - space >> - Missed getBoolean > > src/jdk.management/share/classes/com/sun/management/internal/HotSpotDiagnostic.java line 189: > >> 187: if (cause instanceof RuntimeException e) >> 188: throw e; >> 189: throw new RuntimeException(cause); > > I think you've made an assumption that these are all related to lack of prividleges. I don't think that is the case, and they are all exceptions that can result from calling dumpThreads(). I think you need a try block around the dumpThreads() call that handles all these exceptions in the same manner. OK yes it looks that way but I think we're OK: Previously, IOException and RuntimeException were rethrown, and that is I think everything we expected to see wrapped in an PrivilegedActionException. Anything else was wrapped in a RuntimeException, but outside of IOException which was declared to be thrown, surely it's going to be an unchecked RuntimeException... Here in dumpThreads we declare IOException and Runtime is unchecked. So those two get thrown as before, not sure if we need to catch anything else. Experimenting: invoking dumpHeap through the HotSpotDiagnostic MBean, I can see: javax.management.RuntimeMBeanException: java.lang.IllegalArgumentException: heapdump file must have .hprof extension or javax.management.MBeanException: java.io.IOException: Permission denied It looks like IO or IAException (which is a RuntimeException) get handled OK, and the MBean invocation, which called dumpHeap, wraps them in other exceptions. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1850214900 From kevinw at openjdk.org Wed Nov 20 12:22:56 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 20 Nov 2024 12:22:56 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2] In-Reply-To: <6lSK4gg7iYXgLFOq0cNUUy0cNh7KWAqdNUyppdMQZrA=.46163af1-3b92-4844-86e3-298633fe7c06@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> <6lSK4gg7iYXgLFOq0cNUUy0cNh7KWAqdNUyppdMQZrA=.46163af1-3b92-4844-86e3-298633fe7c06@github.com> Message-ID: On Wed, 20 Nov 2024 04:46:32 GMT, Chris Plummer wrote: >> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: >> >> - space >> - Missed getBoolean > > src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java line 39: > >> 37: import java.net.UnknownHostException; >> 38: import java.nio.BufferUnderflowException; >> 39: import java.security.PrivilegedAction; > > It doesn't look like java.security.PrivilegedAction is needed. thanks, and found one more in PlatformMBeanProviderImpl.java, will add it to the PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1850219824 From kevinw at openjdk.org Wed Nov 20 12:22:55 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 20 Nov 2024 12:22:55 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v3] In-Reply-To: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: <9k99zxpp-SH2SDFAOI4QmZbrMiK5o4s4ffL-MrvuJnI=.591b3e47-d8be-466b-8940-8df928753b6a@github.com> > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java > There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... > > src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java > Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: missed PrivAction removal ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22155/files - new: https://git.openjdk.org/jdk/pull/22155/files/39ae0074..be4dfc4f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=01-02 Stats: 3 lines in 3 files changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/22155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22155/head:pull/22155 PR: https://git.openjdk.org/jdk/pull/22155 From kevinw at openjdk.org Wed Nov 20 14:53:54 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 20 Nov 2024 14:53:54 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v4] In-Reply-To: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java > There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... > > src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java > Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: Remove a Util.checkControlAccess ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22155/files - new: https://git.openjdk.org/jdk/pull/22155/files/be4dfc4f..84d59ac3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/22155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22155/head:pull/22155 PR: https://git.openjdk.org/jdk/pull/22155 From alanb at openjdk.org Wed Nov 20 15:00:38 2024 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 20 Nov 2024 15:00:38 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v4] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: On Wed, 20 Nov 2024 14:53:54 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). >> >> src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java >> There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... >> >> src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java >> Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Remove a Util.checkControlAccess src/jdk.management/share/classes/com/sun/management/internal/VirtualThreadSchedulerImpls.java line 62: > 60: @Override > 61: public final void setParallelism(int size) { > 62: Util.checkControlAccess(); Dropping this means that we don't need setParallelism in the base class no need for implSetParallelism. In its place we just rename implSetParallelism to setParallelism in the subclasses. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1850469072 From cjplummer at openjdk.org Wed Nov 20 22:20:08 2024 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 20 Nov 2024 22:20:08 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v4] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: On Wed, 20 Nov 2024 14:53:54 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). >> >> src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java >> There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... >> >> src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java >> Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Remove a Util.checkControlAccess Marked as reviewed by cjplummer (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22155#pullrequestreview-2449801031 From kevinw at openjdk.org Thu Nov 21 10:17:36 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 21 Nov 2024 10:17:36 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v5] In-Reply-To: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: <9_6BfhJv7DEZuPS9S-hdF35DufF3018wMK3EFkgca90=.c345a98a-9a5b-4844-8ebf-181996896504@github.com> > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java > There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... > > src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java > Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: - newline - remove implSetParallelism from VSThreadSchedulers ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22155/files - new: https://git.openjdk.org/jdk/pull/22155/files/84d59ac3..7149d173 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22155&range=03-04 Stats: 10 lines in 1 file changed: 1 ins; 7 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/22155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22155/head:pull/22155 PR: https://git.openjdk.org/jdk/pull/22155 From kevinw at openjdk.org Thu Nov 21 10:17:36 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 21 Nov 2024 10:17:36 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v5] In-Reply-To: References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: On Wed, 20 Nov 2024 14:57:12 GMT, Alan Bateman wrote: >> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: >> >> - newline >> - remove implSetParallelism from VSThreadSchedulers > > src/jdk.management/share/classes/com/sun/management/internal/VirtualThreadSchedulerImpls.java line 62: > >> 60: @Override >> 61: public final void setParallelism(int size) { >> 62: Util.checkControlAccess(); > > Dropping this means that we don't need setParallelism in the base class no need for implSetParallelism. In its place we just rename implSetParallelism to setParallelism in the subclasses. Got it, yes can remove implSetParallelism. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1851754072 From kevinw at openjdk.org Thu Nov 21 18:24:45 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 21 Nov 2024 18:24:45 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi Message-ID: Remove redundant SecurityManager, AccessController references (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). ------------- Commit messages: - imports - unwrap, exception handling - ReflectUtil removal - tweak - 8344394: Remove SecurityManager and related calls from java.management.rmi Changes: https://git.openjdk.org/jdk/pull/22270/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22270&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8344394 Stats: 290 lines in 3 files changed: 52 ins; 198 del; 40 mod Patch: https://git.openjdk.org/jdk/pull/22270.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22270/head:pull/22270 PR: https://git.openjdk.org/jdk/pull/22270 From kevinw at openjdk.org Thu Nov 21 18:24:45 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 21 Nov 2024 18:24:45 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi In-Reply-To: References: Message-ID: <9gDJu0vJFzvcSuNi1s5HIB9EFU4PzT15PvHrDdv2984=.ca936c70-d367-47c4-a42f-96e7e86d6f50@github.com> On Wed, 20 Nov 2024 10:14:40 GMT, Kevin Walls wrote: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). Notes: 1 RMIConnectionImpl.java In the method unwrap(..) at the old line 1565 We used to be able to return null from this method: when you catch a PrivActionException, get the cause, and it's not IOException (which we throw) or ClassNotFoundException, which we throw in an UnmarshalException. Other exceptions, we may log, and return null. We have tests that check the behaviour of these exceptions, and what I have here passes it all. Trying to reinstate something that can return a null has so far failed! 2 RMIConnectionImpl.java There is still a local method named doPrivilegedOperation in here, but it no longer uses AccessController.doPrivileged. It is now not correctly named, should be cleaned up. As there are so many call sites and there is much Exception-handling here, I'd like to do that further tidyup separately. i.e. fully remove PrivilegedActionException. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22270#issuecomment-2491958271 From kevinw at openjdk.org Fri Nov 22 12:24:42 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 22 Nov 2024 12:24:42 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands Message-ID: Remove redundant SecurityManager Permission references (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). ------------- Commit messages: - 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands Changes: https://git.openjdk.org/jdk/pull/22315/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22315&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8334493 Stats: 402 lines in 17 files changed: 0 ins; 386 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/22315.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22315/head:pull/22315 PR: https://git.openjdk.org/jdk/pull/22315 From coleenp at openjdk.org Fri Nov 22 12:31:14 2024 From: coleenp at openjdk.org (Coleen Phillimore) Date: Fri, 22 Nov 2024 12:31:14 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Fri, 22 Nov 2024 09:14:30 GMT, Kevin Walls wrote: > Remove redundant SecurityManager Permission references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). Looks good! ------------- Marked as reviewed by coleenp (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/22315#pullrequestreview-2454314366 From dfuchs at openjdk.org Fri Nov 22 16:22:17 2024 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Fri, 22 Nov 2024 16:22:17 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi In-Reply-To: References: Message-ID: On Wed, 20 Nov 2024 10:14:40 GMT, Kevin Walls wrote: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 32: > 30: import java.rmi.UnmarshalException; > 31: import java.rmi.server.Unreferenced; > 32: import java.security.PrivilegedActionException; should this be removed too? src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1286: > 1284: > 1285: /** @throws UnsupportedOperationException {@inheritDoc} */ > 1286: private Object doPrivilegedOperation(final int operation, Maybe rename "doPrivilegedOperation" into an overload of "doOperation" ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1854188609 PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1854196303 From kevinw at openjdk.org Fri Nov 22 17:32:18 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 22 Nov 2024 17:32:18 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi In-Reply-To: References: Message-ID: On Wed, 20 Nov 2024 10:14:40 GMT, Kevin Walls wrote: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). Thanks @dfuch - both comments relate to my note: There are still some PrivilegedActionException references at this point, where an Exception is wrapped in a PrivilegedActionException as it always has been. Ideally (for me) would be to update that in a separate change, and leaving the method called doPrivilegedOperation will force me to come back here and change that. 8-) ------------- PR Comment: https://git.openjdk.org/jdk/pull/22270#issuecomment-2494377049 From amenkov at openjdk.org Fri Nov 22 19:10:29 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Fri, 22 Nov 2024 19:10:29 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v5] In-Reply-To: <9_6BfhJv7DEZuPS9S-hdF35DufF3018wMK3EFkgca90=.c345a98a-9a5b-4844-8ebf-181996896504@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> <9_6BfhJv7DEZuPS9S-hdF35DufF3018wMK3EFkgca90=.c345a98a-9a5b-4844-8ebf-181996896504@github.com> Message-ID: On Thu, 21 Nov 2024 10:17:36 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). >> >> src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java >> There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... >> >> src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java >> Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. > > Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: > > - newline > - remove implSetParallelism from VSThreadSchedulers Marked as reviewed by amenkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22155#pullrequestreview-2455435291 From kevinw at openjdk.org Fri Nov 22 19:19:38 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 22 Nov 2024 19:19:38 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi In-Reply-To: References: Message-ID: On Wed, 20 Nov 2024 10:14:40 GMT, Kevin Walls wrote: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). As mentioned in https://github.com/openjdk/jdk/pull/22100 java.management.rmi is be done with its use of sun.reflect.misc, updating to remove the last import. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22270#issuecomment-2494615946 From kevinw at openjdk.org Fri Nov 22 19:19:37 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 22 Nov 2024 19:19:37 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v2] In-Reply-To: References: Message-ID: <1A8GHsmbepdWb6Q86waU06UJRRBYF-4qhd1WnWmdY_k=.d593bc0f-c73d-4230-b9b3-7e9cb2c7fa00@github.com> > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: Remove last import sun.reflect.misc.ReflectUtil ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22270/files - new: https://git.openjdk.org/jdk/pull/22270/files/3e4a7179..8582eb97 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22270&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22270&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/22270.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22270/head:pull/22270 PR: https://git.openjdk.org/jdk/pull/22270 From lmesnik at openjdk.org Fri Nov 22 19:43:14 2024 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Fri, 22 Nov 2024 19:43:14 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Fri, 22 Nov 2024 09:14:30 GMT, Kevin Walls wrote: > Remove redundant SecurityManager Permission references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). Marked as reviewed by lmesnik (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22315#pullrequestreview-2455494106 From amenkov at openjdk.org Fri Nov 22 22:29:17 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Fri, 22 Nov 2024 22:29:17 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v2] In-Reply-To: <1A8GHsmbepdWb6Q86waU06UJRRBYF-4qhd1WnWmdY_k=.d593bc0f-c73d-4230-b9b3-7e9cb2c7fa00@github.com> References: <1A8GHsmbepdWb6Q86waU06UJRRBYF-4qhd1WnWmdY_k=.d593bc0f-c73d-4230-b9b3-7e9cb2c7fa00@github.com> Message-ID: On Fri, 22 Nov 2024 19:19:37 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Remove last import sun.reflect.misc.ReflectUtil src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 108: > 106: ClassLoaderRepository repository = mbeanServer.getClassLoaderRepository(); > 107: this.classLoaderWithRepository = new ClassLoaderWithRepository(repository, dcl); > 108: this.defaultContextClassLoader = new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), dcl); `this.` are not needed src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1231: > 1229: return getServerNotifFwd().fetchNotifs(clientSequenceNumber, timeout, maxNotifications); > 1230: } else { > 1231: return Subject.callAs(subject, () -> getServerNotifFwd().fetchNotifs(clientSequenceNumber, timeout, maxNotifications)); This call may throw CompletionException instead of PrivilegedActionException That's strange that this case does not go through standard `doPrivilegedOperation` way. I think this class needs to be improved (most likely as a separate PR). For most of operations it created "operation id" and creates array of arguments, but then `doOperation` parses the id and arguments and performs required action. It would be much simpler if doPrivilegedOperation/doOperation accept Callable. src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1313: > 1311: Throwable e = ce.getCause(); > 1312: if (e instanceof SecurityException) { > 1313: throw (SecurityException) e; Suggestion: if (e instanceof SecurityException se) { throw se; src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1315: > 1313: throw (SecurityException) e; > 1314: } else if (e instanceof Exception) { > 1315: throw new PrivilegedActionException((Exception) e); Suggestion: } else if (e instanceof Exception e1) { throw new PrivilegedActionException(e1); src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1484: > 1482: setCcl(old); > 1483: } > 1484: } catch (Exception e) { Need to handle CompletionException (or maybe at Subject.callAs call)? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1854766377 PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1854784308 PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1854786790 PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1854787507 PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1854789725 From alanb at openjdk.org Sat Nov 23 10:03:31 2024 From: alanb at openjdk.org (Alan Bateman) Date: Sat, 23 Nov 2024 10:03:31 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Fri, 22 Nov 2024 09:14:30 GMT, Kevin Walls wrote: > Remove redundant SecurityManager Permission references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). This is a change to the spec of a JDK specific API so I think should be tracked by a CSR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22315#issuecomment-2495367950 From kevinw at openjdk.org Mon Nov 25 09:54:15 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 25 Nov 2024 09:54:15 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Sat, 23 Nov 2024 06:37:23 GMT, Alan Bateman wrote: > This is a change to the spec of a JDK specific API so I think should be tracked by a CSR. OK yes, I was looking for opinions on whether this needed a CSR. To be clear, the interface jdk.management / com.sun.management.DiagnosticCommandMBean has a method getDescriptor() which returns a Descriptor, which "is a collection of fields containing additional meta-data for a JMX element". This unfortunately does not say any of the metadata are optional, so now that a permission is meaningless we want to remove dcmd.permissionName, dcmd.permissionAction, dcmd.arguments. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22315#issuecomment-2497457131 From kevinw at openjdk.org Mon Nov 25 12:43:22 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 25 Nov 2024 12:43:22 GMT Subject: jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v5] In-Reply-To: <9_6BfhJv7DEZuPS9S-hdF35DufF3018wMK3EFkgca90=.c345a98a-9a5b-4844-8ebf-181996896504@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> <9_6BfhJv7DEZuPS9S-hdF35DufF3018wMK3EFkgca90=.c345a98a-9a5b-4844-8ebf-181996896504@github.com> Message-ID: On Thu, 21 Nov 2024 10:17:36 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). >> >> src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java >> There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... >> >> src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java >> Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. > > Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: > > - newline > - remove implSetParallelism from VSThreadSchedulers Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/22155#issuecomment-2497915512 From kevinw at openjdk.org Mon Nov 25 12:56:23 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 25 Nov 2024 12:56:23 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v2] In-Reply-To: References: <1A8GHsmbepdWb6Q86waU06UJRRBYF-4qhd1WnWmdY_k=.d593bc0f-c73d-4230-b9b3-7e9cb2c7fa00@github.com> Message-ID: <8pSgf4L0CduRgaLjKqAZbUucVtkb2CqGgxjypmfqHGc=.87e39a00-de46-4f33-b820-3c7f0fd82c0b@github.com> On Fri, 22 Nov 2024 21:50:12 GMT, Alex Menkov wrote: >> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove last import sun.reflect.misc.ReflectUtil > > src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 108: > >> 106: ClassLoaderRepository repository = mbeanServer.getClassLoaderRepository(); >> 107: this.classLoaderWithRepository = new ClassLoaderWithRepository(repository, dcl); >> 108: this.defaultContextClassLoader = new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), dcl); > > `this.` are not needed Sure, they are the way it already was but happy to take them out. "this.mbeanServer =" does not need the "this" either, but I'm not touching that line so it would be odd to remove it now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1856568255 From kevinw at openjdk.org Mon Nov 25 12:59:19 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 25 Nov 2024 12:59:19 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v2] In-Reply-To: References: <1A8GHsmbepdWb6Q86waU06UJRRBYF-4qhd1WnWmdY_k=.d593bc0f-c73d-4230-b9b3-7e9cb2c7fa00@github.com> Message-ID: On Fri, 22 Nov 2024 22:08:28 GMT, Alex Menkov wrote: >> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove last import sun.reflect.misc.ReflectUtil > > src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1231: > >> 1229: return getServerNotifFwd().fetchNotifs(clientSequenceNumber, timeout, maxNotifications); >> 1230: } else { >> 1231: return Subject.callAs(subject, () -> getServerNotifFwd().fetchNotifs(clientSequenceNumber, timeout, maxNotifications)); > > This call may throw CompletionException instead of PrivilegedActionException > That's strange that this case does not go through standard `doPrivilegedOperation` way. > I think this class needs to be improved (most likely as a separate PR). > For most of operations it created "operation id" and creates array of arguments, but then `doOperation` parses the id and arguments and performs required action. It would be much simpler if doPrivilegedOperation/doOperation accept Callable. Yes thanks, can unwrap CompletionException here like in the other callAs() usage in doPrivilegedOperation(). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1856572506 From kevinw at openjdk.org Mon Nov 25 13:53:22 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 25 Nov 2024 13:53:22 GMT Subject: jmx-dev Integrated: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent In-Reply-To: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> References: <-488Kn_ugScUVK5D0Qujk_sx0ZSRD-xYs-Z5bcPSYGA=.d5b26be9-b913-45ce-9d32-3b7437ffb878@github.com> Message-ID: <4RqizkVZN8QWjmke3vqaOrKtJjwLQ3BsfCnSdObCts4=.8c07a12a-1610-4bb3-a1c5-f9b2013f3974@github.com> On Fri, 15 Nov 2024 17:36:30 GMT, Kevin Walls wrote: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java > There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists... > > src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java > Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds. This pull request has now been integrated. Changeset: e29b0edc Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/e29b0edc9739801c8371ac601a466428916d60b4 Stats: 134 lines in 10 files changed: 1 ins; 89 del; 44 mod 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent Reviewed-by: amenkov, cjplummer ------------- PR: https://git.openjdk.org/jdk/pull/22155 From kevinw at openjdk.org Mon Nov 25 14:47:00 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 25 Nov 2024 14:47:00 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v3] In-Reply-To: References: Message-ID: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). Kevin Walls 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 eight additional commits since the last revision: - Exeption handling feedback - Merge remote-tracking branch 'upstream/master' into 8344394_Management_rmi_post_sm - Remove last import sun.reflect.misc.ReflectUtil - imports - unwrap, exception handling - ReflectUtil removal - tweak - 8344394: Remove SecurityManager and related calls from java.management.rmi ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22270/files - new: https://git.openjdk.org/jdk/pull/22270/files/8582eb97..9d0b6a8b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22270&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22270&range=01-02 Stats: 36812 lines in 984 files changed: 15943 ins; 16668 del; 4201 mod Patch: https://git.openjdk.org/jdk/pull/22270.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22270/head:pull/22270 PR: https://git.openjdk.org/jdk/pull/22270 From kevinw at openjdk.org Mon Nov 25 14:47:00 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 25 Nov 2024 14:47:00 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v2] In-Reply-To: <1A8GHsmbepdWb6Q86waU06UJRRBYF-4qhd1WnWmdY_k=.d593bc0f-c73d-4230-b9b3-7e9cb2c7fa00@github.com> References: <1A8GHsmbepdWb6Q86waU06UJRRBYF-4qhd1WnWmdY_k=.d593bc0f-c73d-4230-b9b3-7e9cb2c7fa00@github.com> Message-ID: On Fri, 22 Nov 2024 19:19:37 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Remove last import sun.reflect.misc.ReflectUtil Thanks @alexmenkov - I'm making the callAs calls handle and unwrap the CompletionException, and pass it on to existing exception handling. Yes, the existing fetchNotifications() doesn't use the doPrivOperation style. Seems relevant that it is part of RMIConnection interface, but not part of MBeanServerConnection. RMIConnector defines an RMINotifClient to loop, calling fetchNotifications, i.e. it's not what user code normally calls. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22270#issuecomment-2498210052 From amenkov at openjdk.org Tue Nov 26 00:04:41 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Tue, 26 Nov 2024 00:04:41 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v3] In-Reply-To: References: Message-ID: On Mon, 25 Nov 2024 14:47:00 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > Kevin Walls 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 eight additional commits since the last revision: > > - Exeption handling feedback > - Merge remote-tracking branch 'upstream/master' into 8344394_Management_rmi_post_sm > - Remove last import sun.reflect.misc.ReflectUtil > - imports > - unwrap, exception handling > - ReflectUtil removal > - tweak > - 8344394: Remove SecurityManager and related calls from java.management.rmi Marked as reviewed by amenkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22270#pullrequestreview-2459861552 From alanb at openjdk.org Tue Nov 26 17:05:48 2024 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 26 Nov 2024 17:05:48 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Fri, 22 Nov 2024 09:14:30 GMT, Kevin Walls wrote: > Remove redundant SecurityManager Permission references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). src/jdk.management/share/classes/com/sun/management/internal/DiagnosticCommandImpl.java line 112: > 110: this.cmd = cmd; > 111: this.info = info; > 112: Exception cause = null; I assume cause can be deleted too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22315#discussion_r1858929672 From kevinw at openjdk.org Tue Nov 26 20:47:45 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 26 Nov 2024 20:47:45 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v3] In-Reply-To: References: Message-ID: On Mon, 25 Nov 2024 14:47:00 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager, AccessController references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > Kevin Walls 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 eight additional commits since the last revision: > > - Exeption handling feedback > - Merge remote-tracking branch 'upstream/master' into 8344394_Management_rmi_post_sm > - Remove last import sun.reflect.misc.ReflectUtil > - imports > - unwrap, exception handling > - ReflectUtil removal > - tweak > - 8344394: Remove SecurityManager and related calls from java.management.rmi The follow-on for further Exceptional cleanup is https://bugs.openjdk.org/browse/JDK-8345079 ------------- PR Comment: https://git.openjdk.org/jdk/pull/22270#issuecomment-2501902128 From kevinw at openjdk.org Tue Nov 26 21:31:52 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 26 Nov 2024 21:31:52 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands [v2] In-Reply-To: References: Message-ID: > Remove redundant SecurityManager Permission references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: Remove 'cause' ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22315/files - new: https://git.openjdk.org/jdk/pull/22315/files/d173aec7..8486bbe4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22315&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22315&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/22315.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22315/head:pull/22315 PR: https://git.openjdk.org/jdk/pull/22315 From kevinw at openjdk.org Tue Nov 26 21:31:53 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 26 Nov 2024 21:31:53 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands [v2] In-Reply-To: References: Message-ID: On Tue, 26 Nov 2024 17:03:22 GMT, Alan Bateman wrote: >> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove 'cause' > > src/jdk.management/share/classes/com/sun/management/internal/DiagnosticCommandImpl.java line 112: > >> 110: this.cmd = cmd; >> 111: this.info = info; >> 112: Exception cause = null; > > I assume cause can be deleted too. Yes, thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22315#discussion_r1859250311 From darcy at openjdk.org Tue Nov 26 23:25:39 2024 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 26 Nov 2024 23:25:39 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Mon, 25 Nov 2024 09:51:10 GMT, Kevin Walls wrote: > > This is a change to the spec of a JDK specific API so I think should be tracked by a CSR. > > OK yes, I was looking for opinions on whether this needed a CSR. > > To be clear, the interface jdk.management / com.sun.management.DiagnosticCommandMBean has a method getDescriptor() which returns a Descriptor, which "is a collection of fields containing additional meta-data for a JMX element". > > This unfortunately does not say any of the metadata are optional, so now that a permission is meaningless we want to remove dcmd.permissionName, dcmd.permissionAction, dcmd.arguments. Yes; please file a quick CSR. Thanks for asking. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22315#issuecomment-2502171504 From kevinw at openjdk.org Wed Nov 27 09:57:42 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 27 Nov 2024 09:57:42 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Sat, 23 Nov 2024 06:37:23 GMT, Alan Bateman wrote: >> Remove redundant SecurityManager Permission references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > This is a change to the spec of a JDK specific API so I think should be tracked by a CSR. Thanks, (@AlanBateman and @jddarcy), have added the diff of the doc to the CSR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22315#issuecomment-2503427053 From alanb at openjdk.org Wed Nov 27 17:44:40 2024 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 27 Nov 2024 17:44:40 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands [v2] In-Reply-To: References: Message-ID: On Tue, 26 Nov 2024 21:31:52 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager Permission references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Remove 'cause' Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22315#pullrequestreview-2465652474 From lmesnik at openjdk.org Wed Nov 27 17:52:38 2024 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Wed, 27 Nov 2024 17:52:38 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands [v2] In-Reply-To: References: Message-ID: On Tue, 26 Nov 2024 21:31:52 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager Permission references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Remove 'cause' Marked as reviewed by lmesnik (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22315#pullrequestreview-2465666546 From kevinw at openjdk.org Thu Nov 28 09:57:42 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 28 Nov 2024 09:57:42 GMT Subject: jmx-dev RFR: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands [v2] In-Reply-To: References: Message-ID: On Tue, 26 Nov 2024 21:31:52 GMT, Kevin Walls wrote: >> Remove redundant SecurityManager Permission references >> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). > > Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: > > Remove 'cause' Thanks for all the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/22315#issuecomment-2505697101 From kevinw at openjdk.org Thu Nov 28 09:57:42 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 28 Nov 2024 09:57:42 GMT Subject: jmx-dev Integrated: 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands In-Reply-To: References: Message-ID: On Fri, 22 Nov 2024 09:14:30 GMT, Kevin Walls wrote: > Remove redundant SecurityManager Permission references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). This pull request has now been integrated. Changeset: d33ad07c Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/d33ad07c32f23aee799750c9964ab26d0cbe56f4 Stats: 396 lines in 17 files changed: 0 ins; 380 del; 16 mod 8334493: Remove SecurityManager Permissions infrastructure from DiagnosticCommands Reviewed-by: lmesnik, alanb, coleenp ------------- PR: https://git.openjdk.org/jdk/pull/22315 From kevinw at openjdk.org Thu Nov 28 14:40:47 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 28 Nov 2024 14:40:47 GMT Subject: jmx-dev RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v3] In-Reply-To: References: Message-ID: On Fri, 22 Nov 2024 16:04:34 GMT, Daniel Fuchs wrote: >> Kevin Walls 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 eight additional commits since the last revision: >> >> - Exeption handling feedback >> - Merge remote-tracking branch 'upstream/master' into 8344394_Management_rmi_post_sm >> - Remove last import sun.reflect.misc.ReflectUtil >> - imports >> - unwrap, exception handling >> - ReflectUtil removal >> - tweak >> - 8344394: Remove SecurityManager and related calls from java.management.rmi > > src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 32: > >> 30: import java.rmi.UnmarshalException; >> 31: import java.rmi.server.Unreferenced; >> 32: import java.security.PrivilegedActionException; > > should this be removed too? To be addressed in JDK-8345079 > src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1286: > >> 1284: >> 1285: /** @throws UnsupportedOperationException {@inheritDoc} */ >> 1286: private Object doPrivilegedOperation(final int operation, > > Maybe rename "doPrivilegedOperation" into an overload of "doOperation" To be addressed in JDK-8345079 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1862310359 PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1862310553 From kevinw at openjdk.org Thu Nov 28 17:19:44 2024 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 28 Nov 2024 17:19:44 GMT Subject: jmx-dev Integrated: 8344394: Remove SecurityManager and related calls from java.management.rmi In-Reply-To: References: Message-ID: On Wed, 20 Nov 2024 10:14:40 GMT, Kevin Walls wrote: > Remove redundant SecurityManager, AccessController references > (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager). This pull request has now been integrated. Changeset: fd742af0 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/fd742af0b76bdd7e6e14bd02ddc0d9bd921c90b2 Stats: 314 lines in 4 files changed: 74 ins; 200 del; 40 mod 8344394: Remove SecurityManager and related calls from java.management.rmi Reviewed-by: amenkov ------------- PR: https://git.openjdk.org/jdk/pull/22270