Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-358

PPC64: jsvc fails to find JVM jvm.cfg file and shared objects due to wrong path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.13
    • 1.1.0
    • Jsvc
    • None
    • Patch

    Description

      On ppc64 and ppc64le archs jsvc looks for jvm.cfg and JVM shared objects in the wrong path. Be it used with IBM Java or OpenJDK (where the problem was first encountered), there is no dir called power64 or power64le. Instead ppc64 and ppc64le are used. In doing so, it fails with "Cannot find any VM in Java Home"

      Contact Information = gromero@br.ibm.com

      uname output:
      Linux gromero18 3.10.0-505.el7.ppc64le #1 SMP Tue Sep 6 11:09:32 EDT 2016 ppc64le ppc64le ppc64le GNU/Linux

      Machine Type = pKVM

      Debugger:
      A debugger is not configured

      Steps to Reproduce:
      yum install apache-commons-daemon-jsvc

      1. cat MyClass.java
        public class MyClass {
        public void init(String[] args) { System.out.println("Init..."); }

      public void start()

      { System.out.println("Start..."); }

      public void stop()

      { System.out.println("Stop..."); }

      public void destroy()

      { System.out.println("Destroy..."); }

      }

      1. javac MyClass.java
      2. jar cvf my.jar MyClass.class
      3. /bin/jsvc -debug -user root -java-home /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le -cp /usr/share/java/apache-commons-daemon.jar:/root/my.jar MyClass -start

      Then:
      Attempting to locate Java Home in /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le
      Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/jre/lib/jvm.cfg
      Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/lib/jvm.cfg
      Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/jre/lib/powerpc64le/jvm.cfg
      Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/lib/powerpc64le/jvm.cfg
      VM configuration file not found
      ...

      Java Version: openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-b15) OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)

      Userspace rpm:
      apache-commons-daemon-jsvc-1.0.13-6.el7.ppc64le.rpm

      The userspace tool has the following bit modes: 64-bit

      Attachments

        1. jvsc-ppc64.patch
          1 kB
          Gustavo Romero

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gromero Gustavo Romero
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.75h
                  0.75h
                  Remaining:
                  Remaining Estimate - 0.75h
                  0.75h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified