From syan at openjdk.org Sun Feb 23 12:20:02 2025 From: syan at openjdk.org (SendaoYan) Date: Sun, 23 Feb 2025 12:20:02 GMT Subject: jmx-dev RFR: 8350545: Several sun/management/jdp tests fails java.net.SocketException Message-ID: Hi all, Four sun/management/jdp tests fails "java.net.SocketException: No such device" on some machines. The machine cannot connect to the Internet directly and needs to be connected to the Internet through a jump machine. The sun/management/jdp tests report "java.net.SocketException: No such device" failure do not caused by JVM bug but environmentalk issue, so this PR match the output and throw `jtreg.SkippedException` instead of report test fails. Change has been verified locally, test-fix only and make tests more robustness, no risk. ------------- Commit messages: - 8350545: Several sun/management/jdp tests fails java.net.SocketException Changes: https://git.openjdk.org/jdk/pull/23738/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23738&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8350545 Stats: 13 lines in 5 files changed: 4 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/23738.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23738/head:pull/23738 PR: https://git.openjdk.org/jdk/pull/23738 From alanb at openjdk.org Sun Feb 23 12:50:06 2025 From: alanb at openjdk.org (Alan Bateman) Date: Sun, 23 Feb 2025 12:50:06 GMT Subject: jmx-dev RFR: 8350545: Several sun/management/jdp tests fails java.net.SocketException In-Reply-To: References: Message-ID: <4aYtU0MSCFd-32URhOyyhwoq_dKUqY10eGiEzV6oDLM=.8e8fde62-b9c6-4510-bb8e-18de975daa4e@github.com> On Sun, 23 Feb 2025 12:15:13 GMT, SendaoYan wrote: > Hi all, > > Four sun/management/jdp tests fails "java.net.SocketException: No such device" on some machines. The machine cannot connect to the Internet directly and needs to be connected to the Internet through a jump machine. The sun/management/jdp tests report "java.net.SocketException: No such device" failure do not caused by JVM bug but environmentalk issue, so this PR match the output and throw `jtreg.SkippedException` instead of report test fails. > > Change has been verified locally, test-fix only and make tests more robustness, no risk. test/jdk/sun/management/jdp/DynamicLauncher.java line 66: > 64: if (output.contains("java.net.SocketException: No such device")) { > 65: throw new SkippedException("Network setup issue, skip this test"); > 66: } Something else isn't right if you are getting this error so I think further investigation is required to see if the issue is the test choosing the wrong interface or address, or a configuration issue on the test system. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23738#discussion_r1966769914 From syan at openjdk.org Sun Feb 23 13:24:00 2025 From: syan at openjdk.org (SendaoYan) Date: Sun, 23 Feb 2025 13:24:00 GMT Subject: jmx-dev Withdrawn: 8350545: Several sun/management/jdp tests fails java.net.SocketException In-Reply-To: References: Message-ID: On Sun, 23 Feb 2025 12:15:13 GMT, SendaoYan wrote: > Hi all, > > Four sun/management/jdp tests fails "java.net.SocketException: No such device" on some machines. The machine cannot connect to the Internet directly and needs to be connected to the Internet through a jump machine. The sun/management/jdp tests report "java.net.SocketException: No such device" failure do not caused by JVM bug but environmentalk issue, so this PR match the output and throw `jtreg.SkippedException` instead of report test fails. > > Change has been verified locally, test-fix only and make tests more robustness, no risk. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/23738 From syan at openjdk.org Sun Feb 23 13:35:56 2025 From: syan at openjdk.org (SendaoYan) Date: Sun, 23 Feb 2025 13:35:56 GMT Subject: jmx-dev RFR: 8350545: Several sun/management/jdp tests fails java.net.SocketException In-Reply-To: <4aYtU0MSCFd-32URhOyyhwoq_dKUqY10eGiEzV6oDLM=.8e8fde62-b9c6-4510-bb8e-18de975daa4e@github.com> References: <4aYtU0MSCFd-32URhOyyhwoq_dKUqY10eGiEzV6oDLM=.8e8fde62-b9c6-4510-bb8e-18de975daa4e@github.com> Message-ID: On Sun, 23 Feb 2025 12:46:53 GMT, Alan Bateman wrote: >> Hi all, >> >> Four sun/management/jdp tests fails "java.net.SocketException: No such device" on some machines. The machine cannot connect to the Internet directly and needs to be connected to the Internet through a jump machine. The sun/management/jdp tests report "java.net.SocketException: No such device" failure do not caused by JVM bug but environmentalk issue, so this PR match the output and throw `jtreg.SkippedException` instead of report test fails. >> >> Change has been verified locally, test-fix only and make tests more robustness, no risk. > > test/jdk/sun/management/jdp/DynamicLauncher.java line 66: > >> 64: if (output.contains("java.net.SocketException: No such device")) { >> 65: throw new SkippedException("Network setup issue, skip this test"); >> 66: } > > Something else isn't right if you are getting this error so I think further investigation is required to see if the issue is the test choosing the wrong interface or address, or a configuration issue on the test system. The tested address:port is hard code to '224.0.23.178:7095' by file test/jdk/sun/management/jdp/ClientConnection.java. This address:port work normally on most machines, but cannot work on machine which can not connect to the internet directly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23738#discussion_r1966784435 From syan at openjdk.org Mon Feb 24 10:02:52 2025 From: syan at openjdk.org (SendaoYan) Date: Mon, 24 Feb 2025 10:02:52 GMT Subject: jmx-dev RFR: 8350545: Several sun/management/jdp tests fails java.net.SocketException In-Reply-To: References: <4aYtU0MSCFd-32URhOyyhwoq_dKUqY10eGiEzV6oDLM=.8e8fde62-b9c6-4510-bb8e-18de975daa4e@github.com> Message-ID: On Sun, 23 Feb 2025 13:31:00 GMT, SendaoYan wrote: >> test/jdk/sun/management/jdp/DynamicLauncher.java line 66: >> >>> 64: if (output.contains("java.net.SocketException: No such device")) { >>> 65: throw new SkippedException("Network setup issue, skip this test"); >>> 66: } >> >> Something else isn't right if you are getting this error so I think further investigation is required to see if the issue is the test choosing the wrong interface or address, or a configuration issue on the test system. > > The tested address:port is hard code to '224.0.23.178:7095' by file test/jdk/sun/management/jdp/ClientConnection.java. This address:port work normally on most machines, but cannot work on machine which can not connect to the internet directly. Seems that the exception from src/java.base/unix/native/libnio/ch/Net.c:679. I'm not familiar with jdp feature, Could you give me some advices how to make check is the test choosing the wrong interface or address. The information test system which report test failure shows below: > ifconfig enP2p129s0f1: flags=4163 mtu 1500 inet 192.168.50.12 netmask 255.255.255.0 broadcast 192.168.50.255 inet6 fe80::1163:1d10:87a:6be4 prefixlen 64 scopeid 0x20 ether a0:36:9f:53:17:f6 txqueuelen 1000 (Ethernet) RX packets 22678271 bytes 28824464370 (26.8 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9400465 bytes 7501254087 (6.9 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 26485240 bytes 221859212049 (206.6 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 26485240 bytes 221859212049 (206.6 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > ip r 192.168.50.0/24 dev enP2p129s0f1 proto kernel scope link src 192.168.50.12 metric 100 Command wget shows that it should connect internet through a jumper machine(192.168.50.1:10991): > wget www.bing.com --2025-02-24 17:56:25-- http://www.bing.com/ Connecting to 192.168.50.1:10991... connected. Proxy request sent, awaiting response... 301 Moved Permanently Location: http://cn.bing.com/ [following] --2025-02-24 17:56:25-- http://cn.bing.com/ Reusing existing connection to 192.168.50.1:10991. Proxy request sent, awaiting response... 200 OK Length: 13006 (13K) [text/html] Saving to: ?index.html? index.html 100%[=============================================================================================================>] 12.70K --.-KB/s in 0s 2025-02-24 17:56:25 (28.7 MB/s) - ?index.html? saved [13006/13006] ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23738#discussion_r1967322056 From kevinw at openjdk.org Mon Feb 24 11:45:05 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 24 Feb 2025 11:45:05 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests Message-ID: Trivial removal of confusing "Tonga" references in comments within a few JMX tests. ------------- Commit messages: - 8350571: Remove mention of Tonga test suite from JMX tests Changes: https://git.openjdk.org/jdk/pull/23747/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23747&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8350571 Stats: 27 lines in 5 files changed: 0 ins; 20 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/23747.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23747/head:pull/23747 PR: https://git.openjdk.org/jdk/pull/23747 From cjplummer at openjdk.org Mon Feb 24 19:21:52 2025 From: cjplummer at openjdk.org (Chris Plummer) Date: Mon, 24 Feb 2025 19:21:52 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 11:40:03 GMT, Kevin Walls wrote: > Trivial removal of confusing "Tonga" references in comments within a few JMX tests. Looks good. I'd like for @lmesnik to comment on this. ------------- Marked as reviewed by cjplummer (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23747#pullrequestreview-2638207454 From lmesnik at openjdk.org Mon Feb 24 20:55:52 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Mon, 24 Feb 2025 20:55:52 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 11:40:03 GMT, Kevin Walls wrote: > Trivial removal of confusing "Tonga" references in comments within a few JMX tests. Changes requested by lmesnik (Reviewer). test/jdk/javax/management/MBeanServer/ExceptionTest.java line 227: > 225: * Reproduces the original parsing and collection of test parameters > 226: * from the DTonga JMX test suite. > 227: * There are few similar methods static Map parseParameters(String args[]) in different Utils classes. Have you considered the removal of duplication code? Also, the comment like " Reproduces the original parsing and collection of test parameters from legacy test suite" might explain why this logic is needed. But it is up to you. ------------- PR Review: https://git.openjdk.org/jdk/pull/23747#pullrequestreview-2638415485 PR Review Comment: https://git.openjdk.org/jdk/pull/23747#discussion_r1968403429 From kevinw at openjdk.org Mon Feb 24 21:32:02 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 24 Feb 2025 21:32:02 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 20:53:10 GMT, Leonid Mesnik wrote: >> Trivial removal of confusing "Tonga" references in comments within a few JMX tests. > > test/jdk/javax/management/MBeanServer/ExceptionTest.java line 227: > >> 225: * Reproduces the original parsing and collection of test parameters >> 226: * from the DTonga JMX test suite. >> 227: * > > There are few similar methods > static Map parseParameters(String args[]) > in different Utils classes. > Have you considered the removal of duplication code? > Also, the comment like > " Reproduces the original parsing and collection of test parameters from legacy test suite" > might explain why this logic is needed. But it is up to you. Thanks - For the paseParameters(arg) method, I think if I remove the reference to the mysterious legacy test suite, there is nothing left in that line worth saying. The comment goes on to say "Collects passed args and returns them in a map..etc..." which seems worthwhile. There probably is much further tidyup that we can do here, yes maybe the methods are the same, and maybe so may "Utils" classes is not great. But I just wanted to remove this one point of confusion today! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23747#discussion_r1968442691 From lmesnik at openjdk.org Mon Feb 24 21:36:54 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Mon, 24 Feb 2025 21:36:54 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 11:40:03 GMT, Kevin Walls wrote: > Trivial removal of confusing "Tonga" references in comments within a few JMX tests. Marked as reviewed by lmesnik (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/23747#pullrequestreview-2638493231 From lmesnik at openjdk.org Mon Feb 24 21:36:56 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Mon, 24 Feb 2025 21:36:56 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 21:28:57 GMT, Kevin Walls wrote: >> test/jdk/javax/management/MBeanServer/ExceptionTest.java line 227: >> >>> 225: * Reproduces the original parsing and collection of test parameters >>> 226: * from the DTonga JMX test suite. >>> 227: * >> >> There are few similar methods >> static Map parseParameters(String args[]) >> in different Utils classes. >> Have you considered the removal of duplication code? >> Also, the comment like >> " Reproduces the original parsing and collection of test parameters from legacy test suite" >> might explain why this logic is needed. But it is up to you. > > Thanks - > For the paseParameters(arg) method, I think if I remove the reference to the mysterious legacy test suite, there is nothing left in that line worth saying. > > The comment goes on to say "Collects passed args and returns them in a map..etc..." which seems worthwhile. > > There probably is much further tidyup that we can do here, yes maybe the methods are the same, and maybe so may "Utils" classes is not great. But I just wanted to remove this one point of confusion today! The link to legacy is a just good explanation why this method is realized in such way. Like note, "There is might be no logic in this method, just legacy." ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23747#discussion_r1968448707 From kevinw at openjdk.org Mon Feb 24 21:48:53 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 24 Feb 2025 21:48:53 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 21:34:41 GMT, Leonid Mesnik wrote: >> Thanks - >> For the paseParameters(arg) method, I think if I remove the reference to the mysterious legacy test suite, there is nothing left in that line worth saying. >> >> The comment goes on to say "Collects passed args and returns them in a map..etc..." which seems worthwhile. >> >> There probably is much further tidyup that we can do here, yes maybe the methods are the same, and maybe so may "Utils" classes is not great. But I just wanted to remove this one point of confusion today! > > The link to legacy is a just good explanation why this method is realized in such way. Like note, "There is might be no logic in this method, just legacy." That's a bit harsh, I wasn't going to say there was no logic to this! 8-) Code this old and quirky (and duplicated...) is kind of legacy by definition. 8-) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23747#discussion_r1968461046 From lmesnik at openjdk.org Mon Feb 24 21:55:54 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Mon, 24 Feb 2025 21:55:54 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 21:46:08 GMT, Kevin Walls wrote: >> The link to legacy is a just good explanation why this method is realized in such way. Like note, "There is might be no logic in this method, just legacy." > > That's a bit harsh, I wasn't going to say there was no logic to this! 8-) > Code this old and quirky (and duplicated...) is kind of legacy by definition. 8-) Yes, better to rewrite it of course, but now it becomes unclear why it was written at all. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23747#discussion_r1968469210 From kevinw at openjdk.org Mon Feb 24 22:02:55 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 24 Feb 2025 22:02:55 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 11:40:03 GMT, Kevin Walls wrote: > Trivial removal of confusing "Tonga" references in comments within a few JMX tests. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/23747#issuecomment-2679752104 From kevinw at openjdk.org Mon Feb 24 22:02:56 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 24 Feb 2025 22:02:56 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 21:53:24 GMT, Leonid Mesnik wrote: >> That's a bit harsh, I wasn't going to say there was no logic to this! 8-) >> Code this old and quirky (and duplicated...) is kind of legacy by definition. 8-) > > Yes, better to rewrite it of course, but now it becomes unclear why it was written at all. I will go with this change for now, maybe we can come back here! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23747#discussion_r1968476603 From sspitsyn at openjdk.org Mon Feb 24 22:54:56 2025 From: sspitsyn at openjdk.org (Serguei Spitsyn) Date: Mon, 24 Feb 2025 22:54:56 GMT Subject: jmx-dev RFR: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: <8MUZf1VSJtsosbJf34azIYpMFtRUSDOafdXI9IoAaL0=.92773edb-0fbc-4924-b5cd-ac7bce1afb08@github.com> On Mon, 24 Feb 2025 11:40:03 GMT, Kevin Walls wrote: > Trivial removal of confusing "Tonga" references in comments within a few JMX tests. Marked as reviewed by sspitsyn (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/23747#pullrequestreview-2638631761 From kevinw at openjdk.org Tue Feb 25 12:57:01 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Tue, 25 Feb 2025 12:57:01 GMT Subject: jmx-dev Integrated: 8350571: Remove mention of Tonga test suite from JMX tests In-Reply-To: References: Message-ID: On Mon, 24 Feb 2025 11:40:03 GMT, Kevin Walls wrote: > Trivial removal of confusing "Tonga" references in comments within a few JMX tests. This pull request has now been integrated. Changeset: 8cfebc41 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/8cfebc41dc8ec7b0d24d9c467b91de82d28b73fc Stats: 27 lines in 5 files changed: 0 ins; 20 del; 7 mod 8350571: Remove mention of Tonga test suite from JMX tests Reviewed-by: cjplummer, lmesnik, sspitsyn ------------- PR: https://git.openjdk.org/jdk/pull/23747 From syan at openjdk.org Wed Feb 26 01:44:55 2025 From: syan at openjdk.org (SendaoYan) Date: Wed, 26 Feb 2025 01:44:55 GMT Subject: jmx-dev RFR: 8350545: Several sun/management/jdp tests fails java.net.SocketException In-Reply-To: References: <4aYtU0MSCFd-32URhOyyhwoq_dKUqY10eGiEzV6oDLM=.8e8fde62-b9c6-4510-bb8e-18de975daa4e@github.com> Message-ID: On Mon, 24 Feb 2025 09:58:47 GMT, SendaoYan wrote: >> The tested address:port is hard code to '224.0.23.178:7095' by file test/jdk/sun/management/jdp/ClientConnection.java. This address:port work normally on most machines, but cannot work on machine which can not connect to the internet directly. > > Seems that the exception from src/java.base/unix/native/libnio/ch/Net.c:679. > I'm not familiar with jdp feature, Could you give me some advices how to make check is the test choosing the wrong interface or address. > > The information test system which report test failure shows below: > > >> ifconfig > enP2p129s0f1: flags=4163 mtu 1500 > inet 192.168.50.12 netmask 255.255.255.0 broadcast 192.168.50.255 > inet6 fe80::1163:1d10:87a:6be4 prefixlen 64 scopeid 0x20 > ether a0:36:9f:53:17:f6 txqueuelen 1000 (Ethernet) > RX packets 22678271 bytes 28824464370 (26.8 GiB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 9400465 bytes 7501254087 (6.9 GiB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > lo: flags=73 mtu 65536 > inet 127.0.0.1 netmask 255.0.0.0 > inet6 ::1 prefixlen 128 scopeid 0x10 > loop txqueuelen 1000 (Local Loopback) > RX packets 26485240 bytes 221859212049 (206.6 GiB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 26485240 bytes 221859212049 (206.6 GiB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > >> ip r > 192.168.50.0/24 dev enP2p129s0f1 proto kernel scope link src 192.168.50.12 metric 100 > > > Command wget shows that it should connect to internet through a jumper machine(192.168.50.1:10991): > > >> wget www.bing.com > --2025-02-24 17:56:25-- http://www.bing.com/ > Connecting to 192.168.50.1:10991... connected. > Proxy request sent, awaiting response... 301 Moved Permanently > Location: http://cn.bing.com/ [following] > --2025-02-24 17:56:25-- http://cn.bing.com/ > Reusing existing connection to 192.168.50.1:10991. > Proxy request sent, awaiting response... 200 OK > Length: 13006 (13K) [text/html] > Saving to: ?index.html? > > index.html 100%[=============================================================================================================>] 12.70K --.-KB/s in 0s > > 2025-02-24 17:56:25 (28.7 MB/s) - ?index.html? saved [13006/13006] The test test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java will report "MSG RTE: javax.naming.CommunicationException: example.com:1234 [Root exception is java.net.UnknownHostException: example.com]" failure on the same machine. If I add argument " -Dhttp.proxyHost=192.168.50.1 -Dhttp.proxyPort=10991 -Dhttps.proxyHost=192.168.50.1 -Dhttps.proxyPort=10991 -DsocksProxyHost=192.168.50.1 -DsocksProxyPort=10991" to jtreg, this test will run passes. Maybe we need to investigate why the proxy do not work for sun/management/jdp tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23738#discussion_r1970775057 From lmesnik at openjdk.org Fri Feb 28 00:09:31 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Fri, 28 Feb 2025 00:09:31 GMT Subject: jmx-dev RFR: 8350820: The OperatingSystemMXBean cpuLoad() methods return -1.0 in Windows Message-ID: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> The problem was introduced by the https://bugs.openjdk.org/browse/JDK-8336289 This pr just revert changes in src/jdk.management/windows/native/libmanagement_ext/OperatingSystemImpl.c The test fix is going to be pushed separately (for easy backporting) bug https://bugs.openjdk.org/browse/JDK-8350818 I verified that updated tests failed (bean returns -1.0) and now passed, also run tier1-5 testing. ------------- Commit messages: - 8350820 Changes: https://git.openjdk.org/jdk/pull/23832/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23832&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8350820 Stats: 30 lines in 1 file changed: 0 ins; 0 del; 30 mod Patch: https://git.openjdk.org/jdk/pull/23832.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23832/head:pull/23832 PR: https://git.openjdk.org/jdk/pull/23832 From lmesnik at openjdk.org Fri Feb 28 00:10:42 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Fri, 28 Feb 2025 00:10:42 GMT Subject: jmx-dev RFR: 8350818: Improve OperatingSystemMXBean cpu load tests to don't accept -1.0 by default Message-ID: The cpuLoad tests were updated to fail if -1.0 returns to catch bugs like https://bugs.openjdk.org/browse/JDK-8350820 The -1.0 means that JDK can't obtain cpu load. It shouldn't be returned. If this functionality doesn't work on certain configurations then they should be excluded. The fix should be pushed after https://bugs.openjdk.org/browse/JDK-8350820 I filed separate PR to backport fix easier. Also, I haven't changed indentation and didn't change getSystemCpuLoad to getCpuLoad. They return same. Might be it would be better. just to rename the whole test later. ------------- Commit messages: - testfix Changes: https://git.openjdk.org/jdk/pull/23833/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23833&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8350818 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/23833.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23833/head:pull/23833 PR: https://git.openjdk.org/jdk/pull/23833 From kevinw at openjdk.org Fri Feb 28 09:39:52 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 28 Feb 2025 09:39:52 GMT Subject: jmx-dev RFR: 8350820: The OperatingSystemMXBean cpuLoad() methods return -1.0 in Windows In-Reply-To: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> References: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> Message-ID: On Thu, 27 Feb 2025 23:23:07 GMT, Leonid Mesnik wrote: > The problem was introduced by the > https://bugs.openjdk.org/browse/JDK-8336289 > > This pr just revert changes in src/jdk.management/windows/native/libmanagement_ext/OperatingSystemImpl.c > > The test fix is going to be pushed separately (for easy backporting) bug https://bugs.openjdk.org/browse/JDK-8350818 > > I verified that updated tests failed (bean returns -1.0) and now passed, also run tier1-5 testing. Yes this looks good. I also built and verified in JConsole we get good data from the cpu usage monitors. ------------- Marked as reviewed by kevinw (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23832#pullrequestreview-2650240621 From kevinw at openjdk.org Fri Feb 28 09:52:01 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 28 Feb 2025 09:52:01 GMT Subject: jmx-dev RFR: 8350818: Improve OperatingSystemMXBean cpu load tests to don't accept -1.0 by default In-Reply-To: References: Message-ID: On Fri, 28 Feb 2025 00:05:23 GMT, Leonid Mesnik wrote: > The cpuLoad tests were updated to fail if -1.0 returns to catch bugs like https://bugs.openjdk.org/browse/JDK-8350820 > > The -1.0 means that JDK can't obtain cpu load. It shouldn't be returned. > If this functionality doesn't work on certain configurations then they should be excluded. > > The fix should be pushed after https://bugs.openjdk.org/browse/JDK-8350820 > I filed separate PR to backport fix easier. > Also, I haven't changed indentation and didn't change getSystemCpuLoad to getCpuLoad. They return same. > Might be it would be better. just to rename the whole test later. Looks good, yes ignoring the -1 seems like a historical issue, maybe we had platforms or builds where -1 was expected. Yes we can exclude the test if we find such configs. ------------- Marked as reviewed by kevinw (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23833#pullrequestreview-2650269373 From jwaters at openjdk.org Fri Feb 28 12:05:52 2025 From: jwaters at openjdk.org (Julian Waters) Date: Fri, 28 Feb 2025 12:05:52 GMT Subject: jmx-dev RFR: 8350820: The OperatingSystemMXBean cpuLoad() methods return -1.0 in Windows In-Reply-To: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> References: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> Message-ID: On Thu, 27 Feb 2025 23:23:07 GMT, Leonid Mesnik wrote: > The problem was introduced by the > https://bugs.openjdk.org/browse/JDK-8336289 > > This pr just revert changes in src/jdk.management/windows/native/libmanagement_ext/OperatingSystemImpl.c > > The test fix is going to be pushed separately (for easy backporting) bug https://bugs.openjdk.org/browse/JDK-8350818 > > I verified that updated tests failed (bean returns -1.0) and now passed, also run tier1-5 testing. Hopefully the standard snprintf can be reinstated in a fix quickly after this one ------------- Marked as reviewed by jwaters (Committer). PR Review: https://git.openjdk.org/jdk/pull/23832#pullrequestreview-2650552996 From kevinw at openjdk.org Fri Feb 28 18:11:10 2025 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 28 Feb 2025 18:11:10 GMT Subject: jmx-dev RFR: 8350820: OperatingSystemMXBean CpuLoad() methods return -1.0 on Windows In-Reply-To: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> References: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> Message-ID: On Thu, 27 Feb 2025 23:23:07 GMT, Leonid Mesnik wrote: > The problem was introduced by the > https://bugs.openjdk.org/browse/JDK-8336289 > > This pr just revert changes in src/jdk.management/windows/native/libmanagement_ext/OperatingSystemImpl.c > > The test fix is going to be pushed separately (for easy backporting) bug https://bugs.openjdk.org/browse/JDK-8350818 > > I verified that updated tests failed (bean returns -1.0) and now passed, also run tier1-5 testing. This should be a trivial change. It is a simple backout. We have both done some testing. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23832#issuecomment-2691260522 From duke at openjdk.org Fri Feb 28 18:11:07 2025 From: duke at openjdk.org (Abdelhak Zaaim) Date: Fri, 28 Feb 2025 18:11:07 GMT Subject: jmx-dev RFR: 8350818: Improve OperatingSystemMXBean cpu load tests to not accept -1.0 by default In-Reply-To: References: Message-ID: On Fri, 28 Feb 2025 00:05:23 GMT, Leonid Mesnik wrote: > The cpuLoad tests were updated to fail if -1.0 returns to catch bugs like https://bugs.openjdk.org/browse/JDK-8350820 > > The -1.0 means that JDK can't obtain cpu load. It shouldn't be returned. > If this functionality doesn't work on certain configurations then they should be excluded. > > The fix should be pushed after https://bugs.openjdk.org/browse/JDK-8350820 > I filed separate PR to backport fix easier. > Also, I haven't changed indentation and didn't change getSystemCpuLoad to getCpuLoad. They return same. > Might be it would be better. just to rename the whole test later. Marked as reviewed by abdelhak-zaaim at github.com (no known OpenJDK username). ------------- PR Review: https://git.openjdk.org/jdk/pull/23833#pullrequestreview-2651479664 From lmesnik at openjdk.org Fri Feb 28 18:16:59 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Fri, 28 Feb 2025 18:16:59 GMT Subject: jmx-dev Integrated: 8350820: OperatingSystemMXBean CpuLoad() methods return -1.0 on Windows In-Reply-To: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> References: <_XIjKdfr3v2O7Wl2A6TsMkxVFSHb4jKZAUcprMSJX70=.0ea99a79-9ea7-4704-af56-51fa8651dd20@github.com> Message-ID: <3ItEZBRMJOjPnEIeXNXN3cYGFtH6Xvk7EQmIaMWhFsc=.2b22b0d2-e465-43ed-b92f-901c247b7135@github.com> On Thu, 27 Feb 2025 23:23:07 GMT, Leonid Mesnik wrote: > The problem was introduced by the > https://bugs.openjdk.org/browse/JDK-8336289 > > This pr just revert changes in src/jdk.management/windows/native/libmanagement_ext/OperatingSystemImpl.c > > The test fix is going to be pushed separately (for easy backporting) bug https://bugs.openjdk.org/browse/JDK-8350818 > > I verified that updated tests failed (bean returns -1.0) and now passed, also run tier1-5 testing. This pull request has now been integrated. Changeset: 197004f4 Author: Leonid Mesnik URL: https://git.openjdk.org/jdk/commit/197004f4c621d7ab4c8b9e48362973eaa18156a4 Stats: 30 lines in 1 file changed: 0 ins; 0 del; 30 mod 8350820: OperatingSystemMXBean CpuLoad() methods return -1.0 on Windows Reviewed-by: kevinw, jwaters ------------- PR: https://git.openjdk.org/jdk/pull/23832 From lmesnik at openjdk.org Fri Feb 28 22:40:56 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Fri, 28 Feb 2025 22:40:56 GMT Subject: jmx-dev Integrated: 8350818: Improve OperatingSystemMXBean cpu load tests to not accept -1.0 by default In-Reply-To: References: Message-ID: On Fri, 28 Feb 2025 00:05:23 GMT, Leonid Mesnik wrote: > The cpuLoad tests were updated to fail if -1.0 returns to catch bugs like https://bugs.openjdk.org/browse/JDK-8350820 > > The -1.0 means that JDK can't obtain cpu load. It shouldn't be returned. > If this functionality doesn't work on certain configurations then they should be excluded. > > The fix should be pushed after https://bugs.openjdk.org/browse/JDK-8350820 > I filed separate PR to backport fix easier. > Also, I haven't changed indentation and didn't change getSystemCpuLoad to getCpuLoad. They return same. > Might be it would be better. just to rename the whole test later. This pull request has now been integrated. Changeset: 3c72c04d Author: Leonid Mesnik URL: https://git.openjdk.org/jdk/commit/3c72c04de7a43d265dae7160fe53baaaa8ae6f73 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod 8350818: Improve OperatingSystemMXBean cpu load tests to not accept -1.0 by default Reviewed-by: kevinw ------------- PR: https://git.openjdk.org/jdk/pull/23833