31z4 / zookeeper-docker

Docker image packaging for Apache Zookeeper
MIT License
285 stars 243 forks source link

JVM crashes with out of memory #162

Closed Yamahari closed 6 months ago

Yamahari commented 7 months ago

Describe the bug The docker container created using this image crashes immediately with "Out of Memory Error (workerManager.hpp:70), pid=1, tid=1"

I tried different JVM heap sizes but nothing helped. The container should have 24 GB of RAM available.

System configuration

---------------  S Y S T E M  ---------------,
,
OS:DISTRIB_ID=Ubuntu,
DISTRIB_RELEASE=22.04,
DISTRIB_CODENAME=jammy,
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS",
uname:Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64,
OS uptime: 0 days 5:56 hours,
bc:glibc 2.35 NPTL 2.35 ,
rlimit (soft/hard): STACK 8192k/infinity , CORE 0k/infinity , NPROC infinity/infinity , NOFILE 1048576/1048576 , AS infinity/infinity , CPU infinity/infinity , DATA infinity/infinity , FSIZE infinity/infinity , MEMLOCK 64k/64k,
load average:0.22 0.27 0.23,
,
/proc/meminfo:,
MemTotal:       25846640 kB,
MemFree:        20327572 kB,
MemAvailable:   24082464 kB,
Buffers:          369608 kB,
Cached:          3430640 kB,
SwapCached:            0 kB,
Active:           983636 kB,
Inactive:        4079992 kB,
Active(anon):      12792 kB,
Inactive(anon):  1120560 kB,
Active(file):     970844 kB,
Inactive(file):  2959432 kB,
Unevictable:           0 kB,
Mlocked:               0 kB,
SwapTotal:       7340032 kB,
SwapFree:        7340032 kB,
Dirty:               268 kB,
Writeback:             0 kB,
AnonPages:       1197000 kB,
Mapped:           538268 kB,
Shmem:            164536 kB,
KReclaimable:     230976 kB,
Slab:             303652 kB,
SReclaimable:     230976 kB,
SUnreclaim:        72676 kB,
KernelStack:       12928 kB,
PageTables:        13720 kB,
NFS_Unstable:          0 kB,
Bounce:                0 kB,
WritebackTmp:          0 kB,
CommitLimit:    20263352 kB,
Committed_AS:   12288360 kB,
VmallocTotal:   34359738367 kB,
VmallocUsed:       34660 kB,
VmallocChunk:          0 kB,
Percpu:            10560 kB,
AnonHugePages:    487424 kB,
ShmemHugePages:        0 kB,
ShmemPmdMapped:        0 kB,
FileHugePages:         0 kB,
FilePmdMapped:         0 kB,
HugePages_Total:       0,
HugePages_Free:        0,
HugePages_Rsvd:        0,
HugePages_Surp:        0,
Hugepagesize:       2048 kB,
Hugetlb:               0 kB,
DirectMap4k:      216064 kB,
DirectMap2M:    20948992 kB,
DirectMap1G:     6291456 kB,
,
/sys/kernel/mm/transparent_hugepage/enabled:,
[always] madvise never,
/sys/kernel/mm/transparent_hugepage/defrag (defrag/compaction efforts parameter):,
always defer defer+madvise [madvise] never,
,
Process Memory:,
Virtual Size: 384404K (peak: 384404K),
Resident Set Size: 18316K (peak: 18316K) (anon: 5516K, file: 12800K, shmem: 0K),
Swapped out: 0K,
C-Heap outstanding allocations: 4258K, retained: 77K,
glibc malloc tunables: (default),
,
/proc/sys/kernel/threads-max (system-wide limit on the number of threads):,
201893,
/proc/sys/vm/max_map_count (maximum number of memory map areas a process may have):,
65530,
/proc/sys/kernel/pid_max (system-wide limit on number of process identifiers):,
32768,
,
container (cgroup) information:,
container_type: cgroupv1,
cpu_cpuset_cpus: 0-15,
cpu_memory_nodes: 0,
active_processor_count: 16,
cpu_quota: no quota,
cpu_period: 100000,
cpu_shares: no shares,
memory_limit_in_bytes: 2097152 k,
memory_and_swap_limit_in_bytes: 4194304 k,
memory_soft_limit_in_bytes: unlimited,
memory_usage_in_bytes: 9056 k,
memory_max_usage_in_bytes: 9056 k,
kernel_memory_usage_in_bytes: 2992 k,
kernel_memory_max_usage_in_bytes: unlimited,
kernel_memory_limit_in_bytes: 2996 k,
maximum number of tasks: unlimited,
rrent number of tasks: 1,
,
Hyper-V virtualization detected,
Steal ticks since vm start: 0,
Steal ticks percentage since vm start:  0.000,
,
CPU:total 16 (initial active 16) (8 cores per cpu, 2 threads per core) family 6 model 141 stepping 1 microcode 0xffffffff, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, evex, sha, fma,
CPU Model and flags from /proc/cpuinfo:,
model name  : 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz,
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm avx512_vp2intersect flush_l1d arch_capabilities,
Online cpus:,
0-15,
Offline cpus:,
,
OS frequency limitation:,
<Not Available>,
Frequency switch latency (ns):,
<Not Available>,
ailable cpu frequencies:,
<Not Available>,
Current governor:,
<Not Available>,
Core performance/turbo boost:,
<Not Available>,
,
Memory: 4k page, physical 2097152k(2088096k free), swap 7340032k(7340032k free),
,
vm_info: OpenJDK 64-Bit Server VM (11.0.22+7) for linux-amd64 JRE (11.0.22+7), built on Jan 16 2024 22:44:48 by "" with gcc 7.5.0,
,

Additional context Docker is running in windows WSL on an Ubuntu 22.04.3 LTS distro

Full error log:

ZooKeeper JMX enabled by default,
Using config: /conf/zoo.cfg,
[0.001s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.,
#,
# There is insufficient memory for the Java Runtime Environment to continue.,
# Cannot create worker GC thread. Out of system resources.,
# Can not save log file, dump to screen..,
#,
# There is insufficient memory for the Java Runtime Environment to continue.,
# Cannot create worker GC thread. Out of system resources.,
# Possible reasons:,
#   The system is out of physical RAM or swap space,
#   The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap,
# Possible solutions:,
#   Reduce memory load on the system,
#   Increase physical memory or swap space,
#   Check if swap backing store is full,
#   Decrease Java heap size (-Xmx/-Xms),
#   Decrease number of Java threads,
#   Decrease Java thread stack sizes (-Xss),
#   Set larger code cache with -XX:ReservedCodeCacheSize=,
#   JVM is running with Unscaled Compressed Oops mode in which the Java heap is,
#     placed in the first 4GB address space. The Java Heap base address is the,
#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress,
#     to set the Java Heap base and to place the Java Heap above 4GB virtual address.,
# This output file may be truncated or incomplete.,
#,
#  Out of Memory Error (workerManager.hpp:70), pid=1, tid=1,
#,
# JRE version:  (11.0.22+7) (build ),
# Java VM: OpenJDK 64-Bit Server VM (11.0.22+7, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64),
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again,
#,
,
---------------  S U M M A R Y ------------,
,
Command Line: -Dzookeeper.log.dir=/logs -Dzookeeper.log.file=zookeeper--server-71699f5fb82f.log -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError=kill -9 %p -Xmx1000m -Xmx8096m -Xms1014m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /conf/zoo.cfg,
,
Host: 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz, 16 cores, 2G, Ubuntu 22.04.3 LTS,
Time: Wed Feb  7 14:37:59 2024 UTC elapsed time: 0.001762 seconds (0d 0h 0m 0s),
,
---------------  T H R E A D  ---------------,
,
Current thread (0x000055a26e83c000):  JavaThread "Unknown thread" [_thread_in_vm, id=1, stack(0x00007ffc6e222000,0x00007ffc6ea20000)],
,
Stack: [0x00007ffc6e222000,0x00007ffc6ea20000],  sp=0x00007ffc6ea1a540,  free space=8161k,
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code),
V  [libjvm.so+0xf4e34a]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x1ca,
V  [libjvm.so+0xf4f22b]  VMError::report_and_die(Thread*, char const*, int, unsigned long, VMErrorType, char const*, __va_list_tag*)+0x2b,
V  [libjvm.so+0x6d5ba5]  report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*, ...)+0xd5,
V  [libjvm.so+0xf7b99b]  AbstractWorkGang::add_workers(unsigned int, bool)+0x14b,
V  [libjvm.so+0x7b3cb5]  G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy*)+0x5b5,
V  [libjvm.so+0x7a58c9]  G1Arguments::create_heap()+0x69,
V  [libjvm.so+0xf098e1]  Universe::initialize_heap()+0x31,
V  [libjvm.so+0xf09b96]  universe_init()+0x46,
V  [libjvm.so+0x8ad397]  init_globals()+0x57,
V  [libjvm.so+0xee0f27]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x357,
V  [libjvm.so+0x96b712]  JNI_CreateJavaVM+0x52,
C  [libjli.so+0xa3af]  JavaMain+0x8f,
C  [libjli.so+0xf794]  CallJavaMainInNewThread+0x74,
C  [libjli.so+0xbd7d]  ContinueInNewThread+0x4d,
C  [libjli.so+0xd400]  JLI_Launch+0x1470,
C  [java+0xa63]  main+0x123,
,
,
---------------  P R O C E S S  ---------------,
,
Threads class SMR info:,
_java_thread_list=0x000055a26e8016b0, length=0, elements={,
},
,
Java Threads: ( => current thread ),
,
Other Threads:,
,
=>0x000055a26e83c000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=1, stack(0x00007ffc6e222000,0x00007ffc6ea20000)],
,
Threads with active compile tasks:,
,
VM state:not at safepoint (not fully initialized),
,
VM Mutex/Monitor currently owned by a thread: None,
,
,
[error occurred during error reporting (printing compressed oops mode), id 0xb, SIGSEGV (0xb) at pc=0x00007fec70108213],
,
GC Heap History (0 events):,,
s,
,
Deoptimization events (0 events):,,
s,
,
Classes redefined (0 events):,,
s,
,
Internal exceptions (0 events):,,
s,
,
Events (2 events):,
Event: 0.001 Protecting memory [0x00007ffc6e222000,0x00007ffc6e226000] with protection modes 0,
Event: 0.001 Loaded shared library /opt/java/openjdk/lib/libzip.so,
,
,
Dynamic libraries:,
55a26c800000-55a26c801000 r-xp 00000000 08:10 217944                     /opt/java/openjdk/bin/java,
55a26ca01000-55a26ca02000 r--p 00001000 08:10 217944                     /opt/java/openjdk/bin/java,
55a26ca02000-55a26ca03000 rw-p 00002000 08:10 217944                     /opt/java/openjdk/bin/java,
55a26e7fc000-55a26e878000 rw-p 00000000 00:00 0                          [heap],
7fec59445000-7fec596b6000 rw-p 00000000 00:00 0 ,
7fec596b6000-7fec59926000 rwxp 00000000 00:00 0 ,
7fec59926000-7fec59df5000 ---p 00000000 00:00 0 ,
7fec59df5000-7fec5a065000 rwxp 00000000 00:00 0 ,
7fec5a065000-7fec61255000 ---p 00000000 00:00 0 ,
7fec61255000-7fec614c5000 rwxp 00000000 00:00 0 ,
7fec614c5000-7fec686b6000 ---p 00000000 00:00 0 ,
7fec686b6000-7fec6e200000 r--s 00000000 08:10 218268                     /opt/java/openjdk/lib/modules,
7fec6e200000-7fec6e21b000 r-xp 00000000 08:10 218267                     /opt/java/openjdk/lib/libzip.so,
7fec6e21b000-7fec6e41a000 ---p 0001b000 08:10 218267                     /opt/java/openjdk/lib/libzip.so,
7fec6e41a000-7fec6e41b000 r--p 0001a000 08:10 218267                     /opt/java/openjdk/lib/libzip.so,
7fec6e41b000-7fec6e41c000 rw-p 0001b000 08:10 218267                     /opt/java/openjdk/lib/libzip.so,
7fec6e600000-7fec6e61b000 r-xp 00000000 08:10 218250                     /opt/java/openjdk/lib/libjimage.so,
7fec6e61b000-7fec6e81a000 ---p 0001b000 08:10 218250                     /opt/java/openjdk/lib/libjimage.so,
7fec6e81a000-7fec6e81c000 r--p 0001a000 08:10 218250                     /opt/java/openjdk/lib/libjimage.so,
7fec6e81c000-7fec6e81d000 rw-p 0001c000 08:10 218250                     /opt/java/openjdk/lib/libjimage.so,
7fec6ea00000-7fec6ea29000 r-xp 00000000 08:10 218246                     /opt/java/openjdk/lib/libjava.so,
7fec6ea29000-7fec6ec28000 ---p 00029000 08:10 218246                     /opt/java/openjdk/lib/libjava.so,
7fec6ec28000-7fec6ec29000 r--p 00028000 08:10 218246                     /opt/java/openjdk/lib/libjava.so,
7fec6ec29000-7fec6ec2a000 rw-p 00029000 08:10 218246                     /opt/java/openjdk/lib/libjava.so,
7fec6ec2a000-7fec6ec2b000 rw-p 00000000 00:00 0 ,
7fec6ecb1000-7fec6ee00000 rw-p 00000000 00:00 0 ,
7fec6ee00000-7fec6ee0d000 r-xp 00000000 08:10 218266                     /opt/java/openjdk/lib/libverify.so,
7fec6ee0d000-7fec6f00c000 ---p 0000d000 08:10 218266                     /opt/java/openjdk/lib/libverify.so,
7fec6f00c000-7fec6f00e000 r--p 0000c000 08:10 218266                     /opt/java/openjdk/lib/libverify.so,
7fec6f00e000-7fec6f00f000 rw-p 0000e000 08:10 218266                     /opt/java/openjdk/lib/libverify.so,
7fec6f016000-7fec6f017000 ---p 00000000 00:00 0 ,
7fec6f017000-7fec6f11c000 rw-p 00000000 00:00 0 ,
7fec6f11c000-7fec6f200000 ---p 00000000 00:00 0 ,
7fec6f200000-7fec70480000 r-xp 00000000 08:10 218280                     /opt/java/openjdk/lib/server/libjvm.so,
7fec70480000-7fec70680000 ---p 01280000 08:10 218280                     /opt/java/openjdk/lib/server/libjvm.so,
7fec70680000-7fec70745000 r--p 01280000 08:10 218280                     /opt/java/openjdk/lib/server/libjvm.so,
7fec70745000-7fec70780000 rw-p 01345000 08:10 218280                     /opt/java/openjdk/lib/server/libjvm.so,
7fec70780000-7fec707d8000 rw-p 00000000 00:00 0 ,
7fec707ee000-7fec707f3000 rw-p 00000000 00:00 0 ,
7fec707f3000-7fec708d7000 ---p 00000000 00:00 0 ,
7fec708d7000-7fec709d7000 rw-p 00000000 00:00 0 ,
7fec709d7000-7fec709ff000 r--p 00000000 08:10 211958                     /usr/lib/x86_64-linux-gnu/libc.so.6,
7fec709ff000-7fec70b94000 r-xp 00028000 08:10 211958                     /usr/lib/x86_64-linux-gnu/libc.so.6,
7fec70b94000-7fec70bec000 r--p 001bd000 08:10 211958                     /usr/lib/x86_64-linux-gnu/libc.so.6,
7fec70bec000-7fec70bed000 ---p 00215000 08:10 211958                     /usr/lib/x86_64-linux-gnu/libc.so.6,
7fec70bed000-7fec70bf1000 r--p 00215000 08:10 211958                     /usr/lib/x86_64-linux-gnu/libc.so.6,
7fec70bf1000-7fec70bf3000 rw-p 00219000 08:10 211958                     /usr/lib/x86_64-linux-gnu/libc.so.6,
7fec70bf3000-7fec70c00000 rw-p 00000000 00:00 0 ,
7fec70c00000-7fec70c1a000 r-xp 00000000 08:10 218231                     /opt/java/openjdk/lib/jli/libjli.so,
7fec70c1a000-7fec70e1a000 ---p 0001a000 08:10 218231                     /opt/java/openjdk/lib/jli/libjli.so,
7fec70e1a000-7fec70e1b000 r--p 0001a000 08:10 218231                     /opt/java/openjdk/lib/jli/libjli.so,
7fec70e1b000-7fec70e1c000 rw-p 0001b000 08:10 218231                     /opt/java/openjdk/lib/jli/libjli.so,
7fec70e91000-7fec70e96000 rw-p 00000000 00:00 0 ,
7fec70e96000-7fec70ea0000 ---p 00000000 00:00 0 ,
7fec70ea0000-7fec70ea8000 rw-s 00000000 08:10 345                        /tmp/hsperfdata_zookeeper/1,
7fec70ea8000-7fec70ea9000 r--p 00000000 08:10 212055                     /usr/lib/x86_64-linux-gnu/librt.so.1,
7fec70ea9000-7fec70eaa000 r-xp 00001000 08:10 212055                     /usr/lib/x86_64-linux-gnu/librt.so.1,
7fec70eaa000-7fec70eab000 r--p 00002000 08:10 212055                     /usr/lib/x86_64-linux-gnu/librt.so.1,
7fec70eab000-7fec70eac000 r--p 00002000 08:10 212055                     /usr/lib/x86_64-linux-gnu/librt.so.1,
7fec70eac000-7fec70ead000 rw-p 00003000 08:10 212055                     /usr/lib/x86_64-linux-gnu/librt.so.1,
7fec70ead000-7fec70ebb000 r--p 00000000 08:10 212010                     /usr/lib/x86_64-linux-gnu/libm.so.6,
7fec70ebb000-7fec70f37000 r-xp 0000e000 08:10 212010                     /usr/lib/x86_64-linux-gnu/libm.so.6,
7fec70f37000-7fec70f92000 r--p 0008a000 08:10 212010                     /usr/lib/x86_64-linux-gnu/libm.so.6,
7fec70f92000-7fec70f93000 r--p 000e4000 08:10 212010                     /usr/lib/x86_64-linux-gnu/libm.so.6,
7fec70f93000-7fec70f94000 rw-p 000e5000 08:10 212010                     /usr/lib/x86_64-linux-gnu/libm.so.6,
7fec70f94000-7fec70f96000 rw-p 00000000 00:00 0 ,
7fec70f96000-7fec70f97000 r--p 00000000 08:10 211972                     /usr/lib/x86_64-linux-gnu/libdl.so.2,
7fec70f97000-7fec70f98000 r-xp 00001000 08:10 211972                     /usr/lib/x86_64-linux-gnu/libdl.so.2,
7fec70f98000-7fec70f99000 r--p 00002000 08:10 211972                     /usr/lib/x86_64-linux-gnu/libdl.so.2,
7fec70f99000-7fec70f9a000 r--p 00002000 08:10 211972                     /usr/lib/x86_64-linux-gnu/libdl.so.2,
7fec70f9a000-7fec70f9b000 rw-p 00003000 08:10 211972                     /usr/lib/x86_64-linux-gnu/libdl.so.2,
7fec70f9b000-7fec70f9c000 r--p 00000000 08:10 212053                     /usr/lib/x86_64-linux-gnu/libpthread.so.0,
7fec70f9c000-7fec70f9d000 r-xp 00001000 08:10 212053                     /usr/lib/x86_64-linux-gnu/libpthread.so.0,
7fec70f9d000-7fec70f9e000 r--p 00002000 08:10 212053                     /usr/lib/x86_64-linux-gnu/libpthread.so.0,
7fec70f9e000-7fec70f9f000 r--p 00002000 08:10 212053                     /usr/lib/x86_64-linux-gnu/libpthread.so.0,
7fec70f9f000-7fec70fa0000 rw-p 00003000 08:10 212053                     /usr/lib/x86_64-linux-gnu/libpthread.so.0,
7fec70fa1000-7fec70fa2000 ---p 00000000 00:00 0 ,
7fec70fa2000-7fec70fa3000 r--p 00000000 00:00 0 ,
7fec70fa3000-7fec70fa5000 rw-p 00000000 00:00 0 ,
7fec70fa5000-7fec70fa7000 r--p 00000000 08:10 211940                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2,
7fec70fa7000-7fec70fd1000 r-xp 00002000 08:10 211940                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2,
7fec70fd1000-7fec70fdc000 r--p 0002c000 08:10 211940                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2,
7fec70fdd000-7fec70fdf000 r--p 00037000 08:10 211940                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2,
7fec70fdf000-7fec70fe1000 rw-p 00039000 08:10 211940                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2,
7ffc6e222000-7ffc6e226000 ---p 00000000 00:00 0 ,
7ffc6ea00000-7ffc6ea22000 rw-p 00000000 00:00 0                          [stack],
7ffc6eb42000-7ffc6eb46000 r--p 00000000 00:00 0                          [vvar],
7ffc6eb46000-7ffc6eb47000 r-xp 00000000 00:00 0                          [vdso],
,
,
VM Arguments:,
jvm_args: -Dzookeeper.log.dir=/logs -Dzookeeper.log.file=zookeeper--server-71699f5fb82f.log -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError=kill -9 %p -Xmx1000m -Xmx8096m -Xms1014m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false ,
java_command: org.apache.zookeeper.server.quorum.QuorumPeerMain /conf/zoo.cfg,
java_class_path (initial): /apache-zookeeper-3.9.1-bin/bin/../zookeeper-metrics-providers/zookeeper-prometheus-metrics/target/classes:/apache-zookeeper-3.9.1-bin/bin/../zookeeper-server/target/classes:/apache-zookeeper-3.9.1-bin/bin/../build/classes:/apache-zookeeper-3.9.1-bin/bin/../zookeeper-metrics-providers/zookeeper-prometheus-metrics/target/lib/*.jar:/apache-zookeeper-3.9.1-bin/bin/../zookeeper-server/target/lib/*.jar:/apache-zookeeper-3.9.1-bin/bin/../build/lib/*.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/zookeeper-prometheus-metrics-3.9.1.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/zookeeper-jute-3.9.1.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/zookeeper-3.9.1.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/snappy-java-1.1.10.5.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/slf4j-api-1.7.30.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/simpleclient_servlet-0.9.0.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/simpleclient_hotspot-0.9.0.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/simpleclient_common-0.9.0.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/simpleclient-0.9.0.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-transport-native-unix-common-4.1.94.Final.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-transport-native-epoll-4.1.94.Final-linux-x86_64.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-transport-classes-epoll-4.1.94.Final.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-transport-4.1.94.Final.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-tcnative-classes-2.0.61.Final.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-tcnative-boringssl-static-2.0.61.Final-windows-x86_64.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-tcnative-boringssl-static-2.0.61.Final-osx-x86_64.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-tcnative-boringssl-static-2.0.61.Final-osx-aarch_64.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-tcnative-boringssl-static-2.0.61.Final-linux-x86_64.jar:/apache-zookeeper-3.9.1-bin/bin/../lib/netty-tcnative-boringssl-static-2.0.61.Final-linux-aar,
Launcher Type: SUN_STANDARD,
,
[Global flags],
     intx CICompilerCount                          = 12                                        {product} {ergonomic},
     uint G1ConcRefinementThreads                  = 13                                        {product} {ergonomic},
   size_t G1HeapRegionSize                         = 2097152                                   {product} {ergonomic},
    uintx GCDrainStackTargetSize                   = 64                                        {product} {ergonomic},
     bool HeapDumpOnOutOfMemoryError               = true                                   {manageable} {command line},
   size_t InitialHeapSize                          = 1063256064                                {product} {command line},
     bool ManagementServer                         = true                                      {product} {command line},
   size_t MaxHeapSize                              = 8489271296                                {product} {command line},
   size_t MinHeapDeltaBytes                        = 2097152                                   {product} {ergonomic},
    uintx NonNMethodCodeHeapSize                   = 7594288                                {pd product} {ergonomic},
    uintx NonProfiledCodeHeapSize                  = 122031976                              {pd product} {ergonomic},
ccstrlist OnOutOfMemoryError                       = kill -9 %p                                {product} {command line},
    uintx ProfiledCodeHeapSize                     = 122031976                              {pd product} {ergonomic},
    uintx ReservedCodeCacheSize                    = 251658240                              {pd product} {ergonomic},
     bool SegmentedCodeCache                       = true                                      {product} {ergonomic},
     bool UseCompressedClassPointers               = true                                 {lp64_product} {ergonomic},
     bool UseCompressedOops                        = true                                 {lp64_product} {ergonomic},
     bool UseG1GC                                  = true                                      {product} {ergonomic},
,
Logging:,
Log output configuration:,
 #0: stdout all=warning uptime,level,tags,
 #1: stderr all=off uptime,level,tags,
,
Environment Variables:,
JAVA_HOME=/opt/java/openjdk,
PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/apache-zookeeper-3.9.1-bin/bin,
LANG=en_US.UTF-8,
LC_ALL=en_US.UTF-8,
,
Signal Handlers:,
SIGSEGV: [libjvm.so+0xf4ff80], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO,
SIGBUS: [libjvm.so+0xf4ff80], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO,
SIGFPE: [libjvm.so+0xf4ff80], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO,
SIGPIPE: [libjvm.so+0xc702e0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO,
SIGXFSZ: [libjvm.so+0xc702e0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO,
SIGILL: [libjvm.so+0xf4ff80], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO,
SIGUSR2: [libjvm.so+0xc70180], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO,
SIGHUP: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none,
SIGINT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none,
SIGTERM: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none,
SIGQUIT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none,
,
,
---------------  S Y S T E M  ---------------,
,
OS:DISTRIB_ID=Ubuntu,
DISTRIB_RELEASE=22.04,
DISTRIB_CODENAME=jammy,
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS",
uname:Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64,
OS uptime: 0 days 5:55 hours,
bc:glibc 2.35 NPTL 2.35 ,
rlimit (soft/hard): STACK 8192k/infinity , CORE 0k/infinity , NPROC infinity/infinity , NOFILE 1048576/1048576 , AS infinity/infinity , CPU infinity/infinity , DATA infinity/infinity , FSIZE infinity/infinity , MEMLOCK 64k/64k,
load average:0.11 0.27 0.23,
,
/proc/meminfo:,
MemTotal:       25846640 kB,
MemFree:        20331504 kB,
MemAvailable:   24085344 kB,
Buffers:          369208 kB,
Cached:          3429980 kB,
SwapCached:            0 kB,
Active:           983220 kB,
Inactive:        4078956 kB,
Active(anon):      12796 kB,
Inactive(anon):  1120172 kB,
Active(file):     970424 kB,
Inactive(file):  2958784 kB,
Unevictable:           0 kB,
Mlocked:               0 kB,
SwapTotal:       7340032 kB,
SwapFree:        7340032 kB,
Dirty:               320 kB,
Writeback:           232 kB,
AnonPages:       1196616 kB,
Mapped:           538136 kB,
Shmem:            164528 kB,
KReclaimable:     230992 kB,
Slab:             303616 kB,
SReclaimable:     230992 kB,
SUnreclaim:        72624 kB,
KernelStack:       12864 kB,
PageTables:        14000 kB,
NFS_Unstable:          0 kB,
Bounce:                0 kB,
WritebackTmp:          0 kB,
CommitLimit:    20263352 kB,
Committed_AS:   12288360 kB,
VmallocTotal:   34359738367 kB,
VmallocUsed:       34436 kB,
VmallocChunk:          0 kB,
Percpu:            10560 kB,
AnonHugePages:    489472 kB,
ShmemHugePages:        0 kB,
ShmemPmdMapped:        0 kB,
FileHugePages:         0 kB,
FilePmdMapped:         0 kB,
HugePages_Total:       0,
HugePages_Free:        0,
HugePages_Rsvd:        0,
HugePages_Surp:        0,
Hugepagesize:       2048 kB,
Hugetlb:               0 kB,
DirectMap4k:      216064 kB,
DirectMap2M:    20948992 kB,
DirectMap1G:     6291456 kB,
,
/sys/kernel/mm/transparent_hugepage/enabled:,
[always] madvise never,
/sys/kernel/mm/transparent_hugepage/defrag (defrag/compaction efforts parameter):,
always defer defer+madvise [madvise] never,
,
Process Memory:,
Virtual Size: 384404K (peak: 384404K),
Resident Set Size: 18256K (peak: 18256K) (anon: 5456K, file: 12800K, shmem: 0K),
Swapped out: 0K,
C-Heap outstanding allocations: 4258K, retained: 77K,
glibc malloc tunables: (default),
,
/proc/sys/kernel/threads-max (system-wide limit on the number of threads):,
201893,
/proc/sys/vm/max_map_count (maximum number of memory map areas a process may have):,
65530,
/proc/sys/kernel/pid_max (system-wide limit on number of process identifiers):,
32768,
,
container (cgroup) information:,
container_type: cgroupv1,
cpu_cpuset_cpus: 0-15,
cpu_memory_nodes: 0,
active_processor_count: 16,
cpu_quota: no quota,
cpu_period: 100000,
cpu_shares: no shares,
memory_limit_in_bytes: 2097152 k,
memory_and_swap_limit_in_bytes: 4194304 k,
memory_soft_limit_in_bytes: unlimited,
memory_usage_in_bytes: 9212 k,
memory_max_usage_in_bytes: 9212 k,
kernel_memory_usage_in_bytes: 2992 k,
kernel_memory_max_usage_in_bytes: unlimited,
kernel_memory_limit_in_bytes: 2996 k,
maximum number of tasks: unlimited,
rrent number of tasks: 1,
,
Hyper-V virtualization detected,
Steal ticks since vm start: 0,
Steal ticks percentage since vm start:  0.000,
,
CPU:total 16 (initial active 16) (8 cores per cpu, 2 threads per core) family 6 model 141 stepping 1 microcode 0xffffffff, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, evex, sha, fma,
CPU Model and flags from /proc/cpuinfo:,
model name  : 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz,
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm avx512_vp2intersect flush_l1d arch_capabilities,
Online cpus:,
0-15,
Offline cpus:,
,
OS frequency limitation:,
<Not Available>,
Frequency switch latency (ns):,
<Not Available>,
ailable cpu frequencies:,
<Not Available>,
Current governor:,
<Not Available>,
Core performance/turbo boost:,
<Not Available>,
,
Memory: 4k page, physical 2097152k(2087940k free), swap 7340032k(7340032k free),
,
vm_info: OpenJDK 64-Bit Server VM (11.0.22+7) for linux-amd64 JRE (11.0.22+7), built on Jan 16 2024 22:44:48 by "" with gcc 7.5.0,
,
END.,
31z4 commented 6 months ago

I tried different JVM heap sizes but nothing helped. The container should have 24 GB of RAM available.

According to your logs it only has 2GB:

Memory: 4k page, physical 2097152k(2088096k free), swap 7340032k(7340032k free)

Host: 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz, 16 cores, 2G, Ubuntu 22.04.3 LTS

But seems like you try to set maximum heap size to 8G:

jvm_args: -Dzookeeper.log.dir=/logs -Dzookeeper.log.file=zookeeper--server-71699f5fb82f.log -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError=kill -9 %p -Xmx1000m -Xmx8096m -Xms1014m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false

Yamahari commented 6 months ago

This is solved by updating "docker-ce", "docker-ce-cli" and "containerd.io", seems to be an issue with an old docker engine?