Bug 852037 - JBoss startup failure: -XX:+UseCompressedOops java option unsupported with OpenJDK 1.7.0_05-icedtea
JBoss startup failure: -XX:+UseCompressedOops java option unsupported with Op...
Product: oVirt
Classification: Community
Component: ovirt-engine-installer (Show other bugs)
3.1 GA
x86_64 Linux
unspecified Severity medium
: ---
: 3.2
Assigned To: Juan Hernández
Depends On:
Blocks: 857692
  Show dependency treegraph
Reported: 2012-08-27 08:11 EDT by Keith Burdis
Modified: 2013-02-15 01:46 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 857692 (view as bug list)
Last Closed: 2013-02-15 01:46:49 EST
Type: Bug
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 Keith Burdis 2012-08-27 08:11:16 EDT
Description of problem:

When running "engine-setup" the JBoss service fails to start with:

Error: There's a problem with JBoss service.Check that it's up and rerun setup.

and writes the following error to /var/log/ovirt-engine/console.log:

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Version-Release number of selected component (if applicable):

[root@server ~]# cat /etc/redhat-release 
Fedora release 17 (Beefy Miracle)

[root@server ~]# java -version
java version "1.7.0_05-icedtea"
OpenJDK Runtime Environment (fedora-2.2.1.fc17.9-i386)
OpenJDK Server VM (build 23.0-b21, mixed mode)

[root@server ~]# rpm -qa | grep openjdk

[root@server ~]# rpm -qa | grep ovirt

How reproducible:

Every time.

Steps to Reproduce:
1. Install Fedora 17 with java-1.7.0-openjdk- and ovirt 3.1
2. Run "engine-setup" and see JBoss service failure
Actual results:

JBoss service fails to start and console.log shows a JVM startup error

Expected results:

ovirt-engine service starts and boot.log, server.log and engine.log files are present.

Additional info:

Applying the following patch to /usr/share/ovirt-engine/scripts/engine_service.py to remove the offending Java command-line option resolves the issue:

diff --git a/engine-service.py b/engine-service.py
index aa80e32..85195b3 100755
--- a/engine-service.py
+++ b/engine-service.py
@@ -197,7 +197,6 @@ def startEngine():
         # Virtual machine options:
-        "-XX:+UseCompressedOops",
         "-Xms%s" % engineHeapMin,
         "-Xms%s" % engineHeapMax,
Comment 1 Juan Hernández 2012-08-27 11:55:28 EDT
I am a bit confused, you say that the x86_64 machine doesn't support the flag but you are given the output of "java -v" of the i386 version, which is probably what you have configured by default with "alternatives".

I have exactly that version installed and the option works fine:

  # rpm -qa | grep openjdk

  # java -version
  java version "1.7.0_05-icedtea"
  OpenJDK Runtime Environment (fedora-2.2.1.fc17.9-x86_64)
  OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode)

Are you sure you are using the 64 bits of the virtual machine to run the engine and not the 32 bits version that you have installed? It is very easy to check, just change with the "alternatives" command with version is in use, and maybe change it:

  # alternatives --display java
  java - status is auto.
    link currently points to /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java

If you see that you are using the 32 bits please change to the 64 bits version:

  # alternatives --config java

If you see the the problem with the 32 bits version we might need to remove that option when running in 32 bits environments (it is mainly a performance improvement).
Comment 2 Keith Burdis 2012-08-28 16:06:26 EDT
Yes, you're right, the -XX:+UseCompressedOops option works fine with 64-bit java:

[keith@server ~]$ /usr/lib/jvm/java-1.7.0-openjdk- -XX:+UseCompressedOops test
Error: Could not find or load main class test

but fails with 32-bit java:

[keith@server ~]$ /usr/lib/jvm/java-1.7.0-openjdk- -XX:+UseCompressedOops test
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Thanks for spotting the problem with my setup.
Comment 3 Itamar Heim 2012-08-29 00:09:34 EDT
not sure if we should fix to work on 32bit, or just validate its 64bit jvm
Comment 4 Juan Hernández 2012-08-29 03:48:18 EDT
As we have to check if it is 64 or 32 bits anyhow, I would just remove that option of it is 32bit.
Comment 5 Juan Hernández 2012-09-12 06:07:08 EDT
The suggested fix for this issue is here:

Comment 7 Itamar Heim 2013-01-16 11:09:41 EST
3.2 beta built, moving to ON_QA status to allow testing

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