docker - Why is Internal memory in java Native Memory Tracking increasing -


my application running in docker container, use scala , use "openjdk 64-bit server vm (build 25.102-b14, mixed mode)", xmx set 16gb , container memory limit 24gb, after running time container killed:

last state:         terminated   reason:           oomkilled   exit code:        137 

however can't find "java.lang.outofmemoryerror: java heap space" errors in log, not once in last 2 weeks in 48 nodes. it's not normal heap oom.

dmesg output:

$ dmesg -l err,crit,alert,emerg stdin not terminal [1647254.978515] memory cgroup out of memory: kill process 10924 (java) score 1652 or sacrifice child [1647254.989138] killed process 10924 (java) total-vm:34187148kb, anon-rss:24853120kb, file-rss:23904kb [1655749.664871] memory cgroup out of memory: kill process 1969 (java) score 1652 or sacrifice child [1655749.675513] killed process 1969 (java) total-vm:35201940kb, anon-rss:24856624kb, file-rss:24120kb [1655749.987605] memory cgroup out of memory: kill process 2799 (java) score 1656 or sacrifice child 

i run jcmd multiple times before killed again , data looks following: native memory tracking:

total: reserved=25505339kb, committed=25140947kb - java heap (reserved=16777216kb, committed=16777216kb) (mmap: reserved=16777216kb, committed=16777216kb)

  • class (reserved=247996kb, committed=93500kb) (classes #14539) (malloc=2236kb #29794) (mmap: reserved=245760kb, committed=91264kb)

  • thread (reserved=1013160kb, committed=1013160kb) (thread #1902) (stack: reserved=1003956kb, committed=1003956kb) (malloc=6240kb #9523) (arena=2964kb #3803)

  • code (reserved=263255kb, committed=86131kb) (malloc=13655kb #20964) (mmap: reserved=249600kb, committed=72476kb)

  • gc (reserved=776174kb, committed=776174kb) (malloc=120814kb #164310) (mmap: reserved=655360kb, committed=655360kb)

  • compiler (reserved=812kb, committed=812kb) (malloc=681kb #1823) (arena=131kb #3)

  • internal (reserved=6366260kb, committed=6366256kb) (malloc=6366256kb #178778) (mmap: reserved=4kb, committed=0kb)

  • symbol (reserved=18391kb, committed=18391kb) (malloc=16242kb #153138) (arena=2150kb #1)

  • native memory tracking (reserved=9002kb, committed=9002kb) (malloc=186kb #2000) (tracking overhead=8816kb)

  • arena chunk (reserved=273kb, committed=273kb) (malloc=273kb)

  • unknown (reserved=32800kb, committed=32kb) (mmap: reserved=32800kb, committed=32kb)

one thing noticed section: internal (reserved=6366260kb, committed=6366256kb)

it keeps growing , causing total memory usage exceed 24gb limit.

anyone has seen similar issue before? , knows internal memory here , reason keeps growing without releasing memory?

this not answer question, workaround.

i have observed same problem in docker containers running jruby on java version "1.8.0_45". solution explicitly invoke garbage collection. have absolutely no idea, why works, after gc internal java memory returned 8mb.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -