Skip to content

Commit

Permalink
runtime: force JVM exit on OutOfMemoryError
Browse files Browse the repository at this point in the history
Motivation:
Depending which thread have received OutOfMemoryError the JVM might or
might not exit. In a later cache, dCache might remain in an
unpredictable state, where a component might be exposed as functional
when its not.

Modification:
Update java options to include ExitOnOutOfMemoryError, which forces JVM to exit
when an OOM is detected.

Result:
JVM exists when OOM is detected.

NOTE: There are several situations when jvm generates an
OutOfMemoryError. The ExitOnOutOfMemoryError option works ONLY when
allocation in heap space fails.

Ticket: #10131
Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: yes
  • Loading branch information
kofemann committed May 11, 2021
1 parent c2bc2ae commit 838d422
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions skel/share/defaults/dcache.properties
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ dcache.log.resilience.max-history=30
-Dcurator-dont-log-connection-problems=true \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=${dcache.java.oom.file} \
-XX:+ExitOnOutOfMemoryError \
-XX:+StartAttachListener \
-XX:+UseCompressedOops \
-javaagent:${dcache.paths.classes}/aspectjweaver-1.9.2.jar \
Expand Down

0 comments on commit 838d422

Please sign in to comment.