-
Enhancement
-
Resolution: Fixed
-
P4
-
7u40, 8
-
b16
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8213040 | 11.0.2 | Muthusamy Chinnathambi | P4 | Resolved | Fixed | b02 |
JDK-8219677 | openjdk8u212 | Paul Hohensee | P4 | Resolved | Fixed | b01 |
JDK-8221635 | 8u221 | Poonam Bajaj Parhar | P4 | Resolved | Fixed | b02 |
JDK-8217205 | 8u212 | Poonam Bajaj Parhar | P4 | Resolved | Fixed | b02 |
JDK-8217680 | 8u202 | Poonam Bajaj Parhar | P4 | Closed | Fixed | b32 |
JDK-8224284 | emb-8u221 | Poonam Bajaj Parhar | P4 | Resolved | Fixed | b02 |
JDK-8220889 | emb-8u211 | Poonam Bajaj Parhar | P4 | Resolved | Fixed | b02 |
FULL OS VERSION :
Does not matter.
(Seen on Linux tombot.sirrix.de 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22 21:01:03 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux)
EXTRA RELEVANT SYSTEM CONFIGURATION :
The VM is configured to use 80% of the systems memory using -Xmx and -Xms. Kernel option vm.overcommit_ratio = 100, vm.overcommit_memory = 2
A DESCRIPTION OF THE PROBLEM :
When calling fork/exec the process is duplicated by fork and only then the new copy is replaces usding exec. That leads to problems, when the JVM uses most of the memory and only a small programm is to be started.
The problem was solved for Process.start in 2009 (see link below), but was apparently not solved for execution of the "-XX:OnOutOfMemoryError" handler.
-XX:OnOutOfMemoryError=reboot did not work, even though the log showed it would be started. Looking in the openJDK 7u40 sources, I found that this code still uses fork/exec instead of vfork, which was the solution for the Process.start case....
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7034935
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Configure the vm to use most of the system memory.
Disable overcommit in linux.
Start the JRE using -XX:OnOutOfMemoryError=reboot
Allocate memory in a loop until an OnOutOfMemoryExecption occurs.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: Reboot of the server
Actual: The log shows a message about -XX:OnOutOfMemoryError=reboot and starting reboot, but it does not reboot.
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8213040 "-XX:OnOutOfMemoryError" uses fork instead of vfork
- Resolved
-
JDK-8217205 "-XX:OnOutOfMemoryError" uses fork instead of vfork
- Resolved
-
JDK-8219677 "-XX:OnOutOfMemoryError" uses fork instead of vfork
- Resolved
-
JDK-8220889 "-XX:OnOutOfMemoryError" uses fork instead of vfork
- Resolved
-
JDK-8221635 "-XX:OnOutOfMemoryError" uses fork instead of vfork
- Resolved
-
JDK-8224284 "-XX:OnOutOfMemoryError" uses fork instead of vfork
- Resolved
-
JDK-8217680 "-XX:OnOutOfMemoryError" uses fork instead of vfork
- Closed
- relates to
-
JDK-8234264 Incorrect 8047434 JDK 8 backport in 8219677
- Resolved