Bug 852037 - JBoss startup failure: -XX:+UseCompressedOops java option unsupported with OpenJDK 1.7.0_05-icedtea
Summary: JBoss startup failure: -XX:+UseCompressedOops java option unsupported with Op...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-installer
Version: 3.1 GA
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.2
Assignee: Juan Hernández
QA Contact:
URL:
Whiteboard: infra
Depends On:
Blocks: 857692
TreeView+ depends on / blocked
 
Reported: 2012-08-27 12:11 UTC by Keith Burdis
Modified: 2013-02-15 06:46 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
: 857692 (view as bug list)
Environment:
Last Closed: 2013-02-15 06:46:49 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

Description Keith Burdis 2012-08-27 12:11:16 UTC
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
java-1.7.0-openjdk-devel-1.7.0.5-2.2.1.fc17.9.x86_64
java-1.7.0-openjdk-1.7.0.5-2.2.1.fc17.9.x86_64
java-1.7.0-openjdk-1.7.0.5-2.2.1.fc17.9.i686

[root@server ~]# rpm -qa | grep ovirt
ovirt-engine-userportal-3.1.0-2.fc17.noarch
ovirt-engine-setup-plugin-allinone-3.1.0-2.fc17.noarch
ovirt-iso-uploader-3.1.0-0.git1841d9.fc17.noarch
ovirt-engine-dbscripts-3.1.0-2.fc17.noarch
ovirt-engine-notification-service-3.1.0-2.fc17.noarch
ovirt-engine-backend-3.1.0-2.fc17.noarch
ovirt-engine-setup-3.1.0-2.fc17.noarch
ovirt-engine-tools-common-3.1.0-2.fc17.noarch
ovirt-engine-sdk-3.1.0.4-1.fc17.noarch
ovirt-engine-restapi-3.1.0-2.fc17.noarch
ovirt-engine-config-3.1.0-2.fc17.noarch
ovirt-engine-webadmin-portal-3.1.0-2.fc17.noarch
ovirt-image-uploader-3.1.0-0.git9c42c8.fc17.noarch
ovirt-engine-3.1.0-2.fc17.noarch
ovirt-release-fedora-4-2.noarch
ovirt-log-collector-3.1.0-0.git10d719.fc17.noarch
ovirt-engine-genericapi-3.1.0-2.fc17.noarch

How reproducible:

Every time.

Steps to Reproduce:
1. Install Fedora 17 with java-1.7.0-openjdk-1.7.0.5-2.2.1.fc17.9.x86_64 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():
     engineArgs.extend([
         # Virtual machine options:
         "-server",
-        "-XX:+UseCompressedOops",
         "-XX:+TieredCompilation",
         "-Xms%s" % engineHeapMin,
         "-Xms%s" % engineHeapMax,

Comment 1 Juan Hernández 2012-08-27 15:55:28 UTC
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-1.7.0-openjdk-1.7.0.5-2.2.1.fc17.9.x86_64
  java-1.7.0-openjdk-devel-1.7.0.5-2.2.1.fc17.9.x86_64

  # 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 20:06:26 UTC
Yes, you're right, the -XX:+UseCompressedOops option works fine with 64-bit java:

[keith@server ~]$ /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5.x86_64/jre/bin/java -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-1.7.0.5/jre/bin/java -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 04:09:34 UTC
not sure if we should fix to work on 32bit, or just validate its 64bit jvm

Comment 4 Juan Hernández 2012-08-29 07:48:18 UTC
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 10:07:08 UTC
The suggested fix for this issue is here:

http://gerrit.ovirt.org/7949

Comment 7 Itamar Heim 2013-01-16 16:09:41 UTC
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.