8346875: Test jdk/jdk/jfr/event/os/TestCPULoad.java fails on macOS#23136
8346875: Test jdk/jdk/jfr/event/os/TestCPULoad.java fails on macOS#23136MBaesken wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
|
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 23 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
|
Do you think it is this line that prevents us from getting a sample. jdk/src/hotspot/os/bsd/os_perf_bsd.cpp Line 140 in 9c430c9 Maybe we should do some work instead of additional sleeping? |
|
Not sure if it is this line. Should we maybe add some UL tracing; enable it for the test and see if we hit this ?
Could be that this helps; or increase the sleep time (but less than I did) AND do some CPU intensive work . |
You could keep the 100 ms and do some CPU intensive work. If it still fails, then we'll know it's not CPU work related. If we change both at once, it's harder to analyze. If I remember correctly, we didn't have sleep at all initially (2012). Then we had a smaller sleep which was later increased to 100 ms. We should probably have tried to add CPU related work instead of increasing the sleep time. |
|
Hi Erik, I added some code doing a few calculations. Let's see if this is good . |
egahlin
left a comment
There was a problem hiding this comment.
I tried running the test 100 times on different operating systems and hardware. No failures. Let's try this.
|
Hi Erik, thanks for the review ! Let's see if this is better than the sleep (or maybe we need both, sleep and cycle burning) . /integrate |
|
Going to push as commit a3eef6c.
Your commit was automatically rebased without conflicts. |
|
Hi Erik @egahlin , we unfortunately still sometimes see the error after this change ----------System.out:(1/41)---------- So burning cycles did not really help . |
I've noticed the same thing when running them in parallel, i.e., You could try adding logging (log_debug(jfr, system)("...")) and see if you can reproduce the issue. If it's not a product bug, you could try to use an event stream instead. |
The test fails on some new Mac instances (macOS 14.5 (macOS aarch64) , CPU Apple M2) with :
java.lang.AssertionError: Expected at least one event
at jdk.jfr.event.os.TestCPULoad.main(TestCPULoad.java:62)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1447)
The current sleep value seems to be a bit too slow for those machines. The issues occured (mostly) with fastdebug binaries.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23136/head:pull/23136$ git checkout pull/23136Update a local copy of the PR:
$ git checkout pull/23136$ git pull https://git.openjdk.org/jdk.git pull/23136/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23136View PR using the GUI difftool:
$ git pr show -t 23136Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23136.diff
Using Webrev
Link to Webrev Comment