Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 622468 - RFE: be able to restart the agent VM on OOM or core dump
RFE: be able to restart the agent VM on OOM or core dump
Status: NEW
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
All All
low Severity low (vote)
: ---
: ---
Assigned To: John Mazzitelli
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2010-08-09 09:21 EDT by John Mazzitelli
Modified: 2014-06-18 17:07 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2010-08-09 09:21:45 EDT
Description of problem:

Sometimes the agent my core dump (e.g. due to an error in a third party native library that causes a segfault) or may run out of memory (e.g. OutOfMemoryError).

It would be nice to have the agent VM restart whenever it encounters these. The SUN JVM has these options to easily enable this:

-XX:OnError="<cmd args>;<cmd args>"	Run user-defined commands on fatal error. (Introduced in 1.4.2 update 9.)

-XX:OnOutOfMemoryError="<cmd args>;
<cmd args>" 	Run user-defined commands when an OutOfMemoryError is first thrown. (Introduced in 1.4.2 update 12, 6) 

All we'd need to do is add these arguments to the VM startup command in rhq-agent.bat, rhq-agent.sh.

The only difficulty would be in determining what command to invoke - do we need to pass in the full VM command line (from "java" through to all VM opts and cmdlinea args again?). To make it easy, I say we just start the VM using the service wrapper script - rhq-agent-wrapper.bat/sh

Note that on Windows, we may already have configured the Java Service Wrapper to restart the agent when OutOfMemoryError messages are spit out - if these VM options work as advertised, we can unconfigure JSW and rely on the VM itself to restart itself.
Comment 1 Jay Shaughnessy 2014-06-18 17:07:05 EDT
We have the VM check thread, but this is different, this is actually having the VM restart on OOM crashes.

Note You need to log in before you can comment on or make changes to this bug.