RFR: 8346875: Test jdk/jdk/jfr/event/os/TestCPULoad.java fails on macOS

Matthias Baesken mbaesken at openjdk.org
Thu Jan 23 09:11:08 UTC 2025


On Thu, 16 Jan 2025 10:46:24 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

>> 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 ?
>> 
>>> Maybe we should do some work instead of additional sleeping?
>> 
>> Could be that this helps;  or increase the sleep time (but less than I did) AND do some CPU intensive work .
>
>> 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  @egahlin  ,  we unfortunately still sometimes see the error after this change 

----------System.out:(1/41)----------
Found 183072 primes while burning cycles
----------System.err:(11/642)----------
java.lang.AssertionError: Expected at least one event
	at jdk.jfr.event.os.TestCPULoad.main(TestCPULoad.java:80)
	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)

So burning cycles did not really help .

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23136#issuecomment-2609230974


More information about the hotspot-jfr-dev mailing list