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

Bug #1645745 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
commons-daemon (Ubuntu)
New
Undecided
Unassigned

Bug Description

---Problem Description---
jsvc, an application to launch a java daemon, on ppc64 and ppc64le 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"

---uname output---
Linux vm 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:38:24 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = pKVM

---Debugger---
A debugger is not configured

---Steps to Reproduce---
 # apt-get install libcommons-daemon-java jsvc
# 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...");
  }
}
# javac MyClass.java
# jar cvf my.jar MyClass.class
# sudo jsvc -debug -user root -java-home /usr/lib/jvm/java-1.8.0-openjdk-ppc64el -cp /usr/share/java/commons-daemon.jar:/root/my.jar MyClass -start

Then:
+-- DUMPING PARSED COMMAND LINE ARGUMENTS --------------
| Detach: True
| Show Version: No
| Show Help: No
| Check Only: Disabled
| Stop: False
| Wait: 0
| Run as service: No
| Install service: No
| Remove service: No
| JVM Name: "null"
| Java Home: "/usr/lib/jvm/java-1.8.0-openjdk-ppc64el"
| PID File: "/var/run/jsvc.pid"
| User Name: "root"
| Extra Options: 1
| "-Djava.class.path=/usr/share/java/commons-daemon.jar:/root/my.jar"
| Class Invoked: "MyClass"
| Class Arguments: 1
| "-start"
+-------------------------------------------------------
No need to change user to 'root'!
User 'root' validated
Attempting to locate Java Home in /usr/lib/jvm/java-1.8.0-openjdk-ppc64el
Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/jvm.cfg
Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/lib/jvm.cfg
Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/jvm.cfg
Attempting to locate VM configuration file /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/lib/powerpc64le/jvm.cfg
VM configuration file not found
Attempting to locate VM library /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/classic/libjvm.so
Attempting to locate VM library /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/server/libjvm.so
Attempting to locate VM library /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/client/libjvm.so
Attempting to locate VM library /usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/libjvm.so
...

Dear maintainer,

The fix is already upstream (backport is trivial):
https://fisheye6.atlassian.com/rdiff/commons?csid=1771757&u&N

The upstream ticket for reference: https://issues.apache.org/jira/browse/DAEMON-358

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-149188 severity-medium targetmilestone-inin1610
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
affects: ubuntu → commons-daemon (Ubuntu)
Revision history for this message
Manoj Iyer (manjo) wrote :

This package is supported by the community. It would require a community effort to find a resolution to this issue.

Changed in commons-daemon (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → nobody
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-03-03 14:53 EDT-------
Hi Manoj,

I just fixed it on Debian unstable on version 1.0.15-8. [1] and I am working to fix in Jessie[2]. Does it help?

[1] https://packages.qa.debian.org/c/commons-daemon.html
[2] https://packages.qa.debian.org/c/commons-daemon.html

------- Comment From <email address hidden> 2017-03-03 14:54 EDT-------
[2] should be 1.0.15-8.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.