[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Integrated: 8299560: Assertion failed: currentQueryIndex >= 0 && currentQueryIndex < numberOfJavaPro
From:       Kevin Walls <kevinw () openjdk ! org>
Date:       2023-09-27 15:57:27
Message-ID: iRfwnM5AXiubtH7iwcPrgC72psGxpzroGo55b8ho0Ik=.53f7e569-6901-43e8-bc9d-62bfb8916f14 () github ! com
[Download RAW message or body]

On Thu, 14 Sep 2023 17:24:39 GMT, Kevin Walls <kevinw@openjdk.org> wrote:

> This assert happens rarely, but is seen in testing a few times.
> 
> getCurrentQueryIndexForProcess comments that it can return -1, but it asserts that \
> the value is >=0 
> If we let it return -1 for failure as its comment documents, the caller can handle \
> the failure and not assert and end the JVM.   
> Conversely, currentQueryIndexForProcess() clearly can return -1 on failure, so add \
> the comment like we already have in getCurrentQueryIndexForProcess(). 
> This assert is not reproducing on demand, but with this change I've done 50+ \
> iterations of the test on windows-x64 and windows-x64-debug in mach5, and hundreds \
> locally. 
> The test which has been seen to trigger the assert 
> "test/jdk/com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java" 
> ...checks the range of the load value returned, and is happy enough if -1 is the \
> answer.

This pull request has now been integrated.

Changeset: 5350fd61
Author:    Kevin Walls <kevinw@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5350fd617390aaaedf8dd8821418c796cb1c38b3
                
Stats:     10 lines in 1 file changed: 2 ins; 2 del; 6 mod

8299560: Assertion failed: currentQueryIndex >= 0 && currentQueryIndex < \
numberOfJavaProcessesAtInitialization

Reviewed-by: lmesnik, cjplummer

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

PR: https://git.openjdk.org/jdk/pull/15750


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic