serializer icon indicating copy to clipboard operation
serializer copied to clipboard

LazyReferenceManager 100% cpu usage while idle

Open ZockiRR opened this issue 11 months ago • 2 comments

Environment Details

  • Eclipse Serializer Version: 1.3.1
  • JDK version: 21.0.2
  • OS: alpine linux or Win 10
  • Used frameworks: -

Describe the bug

After 1 hour of idle the LazyReferenceManager goes to 100% cpu usage. It directly goes back to normal when something gets loaded from the store.

To Reproduce

Use a LazyHashMap as a store for example. Store something in the LazyHashMap, use something from the LazyHashMap and than leave the app idle for 1 hour.

Expected behavior

LazyReferences get freed and the application stays at low cpu usage when idling.

htop from process

running in an alpine temurin pterodactly egg, but this also happens in my IDE on Win 10.

1147628 pteroda+  20   0   31.7g 316940  21956 R  99.9   0.2   1366:51 LazyReferenceMa                                                                                                                                                                                                  1147563 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:00.00 java
1147564 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:01.51 java
1147565 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:00.07 GC Thread#0
1147566 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:00.00 G1 Main Marker
1147567 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:00.02 G1 Conc#0
1147568 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:19.74 G1 Refine#0
1147569 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:03.10 G1 Service
1147570 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:58.98 VM Periodic Tas
1147571 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:03.06 VM Thread
1147572 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:00.00 Reference Handl
1147573 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:00.00 Finalizer
1147574 pteroda+  20   0   31.7g 316940  21956 S   0.0   0.2   0:00.00 Signal Dispatch

ZockiRR avatar Mar 28 '24 19:03 ZockiRR