Skip to content

High CPU usage after switching from openj9 21.0.8+9 to 21.0.9+10 #23110

@klim-ibm

Description

@klim-ibm
$ java -version
openjdk version "21.0.9" 2025-10-21 LTS
IBM Semeru Runtime Open Edition 21.0.9.0 (build 21.0.9+10-LTS)
Eclipse OpenJ9 VM 21.0.9.0 (build 21.0.9+10-openj9-0.56.0, JRE 21 Linux amd64-64-Bit Compressed References 20251021_630 (JIT enabled, AOT enabled)
OpenJ9   - 14b3b2de26
OMR      - d4c7e3040
JCL      - 7a630fb0f55 based on jdk-21.0.9+10)

After switching to the above openj9 version, the java process of our server almost immediately goes to 200% CPU usage:

top - 12:59:26 up 10 days, 15:48,  0 users,  load average: 2.00, 2.00, 1.73
Tasks:  11 total,   1 running,  10 sleeping,   0 stopped,   0 zombie
%Cpu(s):  50.2/0.5    51[                                                                                                    ]
MiB Mem :  15353.2 total,    354.5 free,   3043.7 used,  12304.3 buff/cache
MiB Swap:  16380.0 total,  16379.2 free,      0.8 used.  12309.4 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
    148 sagadmin  20   0 3959736 330052  30592 S 199.7   2.1  53:13.06 java
    124 sagadmin  20   0   86888   3712   2688 S   0.3   0.0   0:01.87 wrapper-3.5.53
      1 sagadmin  20   0    4200   3200   2944 S   0.0   0.0   0:00.02 umstart.sh
      9 sagadmin  20   0    4944   2432   2304 S   0.0   0.0   0:00.00 tail
     10 sagadmin  20   0    3652   2048   1920 S   0.0   0.0   0:00.00 sed
     11 sagadmin  20   0    4944   2688   2560 S   0.0   0.0   0:00.04 tail
     12 sagadmin  20   0    3652   2048   1920 S   0.0   0.0   0:00.03 sed
     44 sagadmin  20   0    4200   3200   2944 S   0.0   0.0   0:00.00 nserver
     58 sagadmin  20   0    5388   4352   2944 S   0.0   0.0   0:00.00 nserverdaemon
   1102 sagadmin  20   0    4464   3712   3200 S   0.0   0.0   0:00.02 bash
   1114 sagadmin  20   0    7308   3712   3072 R   0.0   0.0   0:00.02 top

The issue seems to be caused by calling LockSupport.parkNanos(Constants.LOCK_WAIT) with Constants.LOCK_WAIT=500000. It's possible that values below 1ms are not honored and the thread that was supposed to be parked is instead occupying all available CPU cycles.

The issue has also been reproduced with the milestone releases https://github.com/ibmruntimes/semeru21-binaries/releases/tag/jdk-21.0.9%2B7_openj9-0.56.0-m1 and https://github.com/ibmruntimes/semeru21-binaries/releases/tag/jdk-21.0.9%2B9_openj9-0.56.0-m2.

The issue is not affecting our product in the previous OpenJ9 21.0.8+9 release.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions