Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54196

Regression: jnidispatch (/com/sun/jna/linux-ppc64/libjnidispatch.so) not found in resource path

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • core

      1. rpm -q jenkins
        jenkins-2.138.2-1.1.noarch

      Today I tried upgrade from jenkins-2.89.4-1.1 to jenkins 2.138.2-1.1 on a RHEL7 ppc64 machine. I am getting a java.lang.UnsatisfiedLinkError for 'Native library (com/sun/jna/linux-ppc64/libjnidispatch.so) not found in resource path'. The complete output is:

      • Unit jenkins.service has begun starting up.
        Oct 22 12:57:10 <computer name> runuser[20830]: pam_unix(runuser:session): session opened for user root by (uid=0)
        Oct 22 12:57:12 <computer name> jenkins[20825]: Starting Jenkins Exception in thread "main" java.lang.reflect.InvocationTargetException
        Oct 22 12:57:12 <computer name> jenkins[20825]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at java.lang.reflect.Method.invoke(Method.java:508)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at Main._main(Main.java:227)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at Main.main(Main.java:160)
        Oct 22 12:57:12 <computer name> jenkins[20825]: Caused by: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-ppc64/libjnidispatch.so) not found in resource path (file:/tmp/jna7389605851826903872jar, file:/tmp/akuma9008425977486382467jar)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:962)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.jna.Native.<clinit>(Native.java:190)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:89)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:128)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:116)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:104)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:92)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
        Oct 22 12:57:12 <computer name> jenkins[20825]: at com.sun.akuma.Daemon.all(Daemon.java:88)
        Oct 22 12:57:12 <computer name> jenkins[20825]: ... 6 more
        Oct 22 12:57:12 <computer name> runuser[20830]: pam_unix(runuser:session): session closed for user root
        Oct 22 12:57:12 <computer name> jenkins[20825]: [FAILED]
        Oct 22 12:57:12 <computer name> systemd[1]: jenkins.service: control process exited, code=exited status=1
        Oct 22 12:57:12 <computer name> systemd[1]: Failed to start LSB: Jenkins Automation Server.
      • Subject: Unit jenkins.service has failed
      • Defined-By: systemd
      • Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
        -
        • Unit jenkins.service has failed.
          -
        • The result is failed.

      Jenkins starts up fine with 2.89.4-1.1, but not with the most recent stable version of 2.138.2-1.1. Is this a regression? Does anyone have suggestions on how to get Jenkins to start? Do I need to download something additional?
      I compared the jenkins.war file between jenkins-2.89.4-1.1 and jenkins 2.138.2-1.1 and found these differences affecting the above.

      The 2.89 jenkins.war file contains jna-4.2.1.jar and the 2.138 jenkins.war file contains jna-4.5.2.jar. I unjarred both of these and found that the 2.89 jna-4.2.1.jar file has these libjnidispatch.so files:

      ./com/sun/jna/linux-x86/libjnidispatch.so
      ./com/sun/jna/linux-x86-64/libjnidispatch.so
      ./com/sun/jna/linux-arm/libjnidispatch.so
      ./com/sun/jna/linux-aarch64/libjnidispatch.so
      ./com/sun/jna/linux-ppc64/libjnidispatch.so
      ./com/sun/jna/linux-ppc64le/libjnidispatch.so
      ./com/sun/jna/linux-sparcv9/libjnidispatch.so
      ./com/sun/jna/sunos-x86/libjnidispatch.so
      ./com/sun/jna/sunos-x86-64/libjnidispatch.so
      ./com/sun/jna/sunos-sparc/libjnidispatch.so
      ./com/sun/jna/sunos-sparcv9/libjnidispatch.so
      ./com/sun/jna/freebsd-x86/libjnidispatch.so
      ./com/sun/jna/freebsd-x86-64/libjnidispatch.so
      ./com/sun/jna/openbsd-x86/libjnidispatch.so
      ./com/sun/jna/openbsd-x86-64/libjnidispatch.so

      and the jna-4.5.2 jar file has these:
      ./com/sun/jna/linux-x86/libjnidispatch.so
      ./com/sun/jna/linux-x86-64/libjnidispatch.so
      ./com/sun/jna/linux-arm/libjnidispatch.so
      ./com/sun/jna/linux-armel/libjnidispatch.so
      ./com/sun/jna/linux-aarch64/libjnidispatch.so
      ./com/sun/jna/linux-ppc/libjnidispatch.so
      ./com/sun/jna/linux-ppc64le/libjnidispatch.so
      ./com/sun/jna/linux-mips64el/libjnidispatch.so
      ./com/sun/jna/linux-s390x/libjnidispatch.so
      ./com/sun/jna/sunos-x86/libjnidispatch.so
      ./com/sun/jna/sunos-x86-64/libjnidispatch.so
      ./com/sun/jna/sunos-sparc/libjnidispatch.so
      ./com/sun/jna/sunos-sparcv9/libjnidispatch.so
      ./com/sun/jna/freebsd-x86/libjnidispatch.so
      ./com/sun/jna/freebsd-x86-64/libjnidispatch.so
      ./com/sun/jna/openbsd-x86/libjnidispatch.so
      ./com/sun/jna/openbsd-x86-64/libjnidispatch.so

      It looks like the jna-4.5.2.jar file is not including these:
      ./com/sun/jna/linux-ppc64/libjnidispatch.so
      ./com/sun/jna/linux-sparcv9/libjnidispatch.so

      And added these:
      ./com/sun/jna/linux-armel/libjnidispatch.so
      ./com/sun/jna/linux-ppc/libjnidispatch.so
      ./com/sun/jna/linux-mips64el/libjnidispatch.so
      ./com/sun/jna/linux-s390x/libjnidispatch.so

      I think I really need ./com/sun/jna/linux-ppc64/libjnidispatch.so in order for Jenkins to work on our ppc64 machines. Can this be added back? Is there a workaround?

          [JENKINS-54196] Regression: jnidispatch (/com/sun/jna/linux-ppc64/libjnidispatch.so) not found in resource path

          Peter Toennies created issue -

          Craig Rodrigues added a comment - Which release has it: https://github.com/java-native-access/jna/releases ?  

          Hi, Craig. I am not sure what you are asking me.

          Peter Toennies added a comment - Hi, Craig. I am not sure what you are asking me.

          Peter Toennies added a comment - - edited

          I did not have the above problem when installing Jenkins 2.135.1-1 from https://pkg.jenkins.io/redhat/. I can see from https://jenkins.io/changelog/ that in Jenkins 2.136 the following:

          Update JNA from 4.2.1 to 4.5.2 to add support for s390x, update GNU C minimal requirement to 2.7 on Unix platforms. (issue 52771)

          Apparently, the JNA 4.5.2 version added support for some things but removed support for other things. Can the JNA version included with Jenkins add back the Linux ppc64 support for libjnidispatch.so?

          Peter Toennies added a comment - - edited I did not have the above problem when installing Jenkins 2.135.1-1 from https://pkg.jenkins.io/redhat/ . I can see from https://jenkins.io/changelog/ that in Jenkins 2.136 the following: Update JNA from 4.2.1 to 4.5.2 to add support for s390x, update GNU C minimal requirement to 2.7 on Unix platforms. (issue 52771) Apparently, the JNA 4.5.2 version added support for some things but removed support for other things. Can the JNA version included with Jenkins add back the Linux ppc64 support for libjnidispatch.so?

          I'm asking you which JNA release has the library you need: https://github.com/java-native-access/jna/releases

          Craig Rodrigues added a comment - I'm asking you which JNA release has the library you need: https://github.com/java-native-access/jna/releases

          Oh, the one from JNA 4.2.1 worked fine for me.

          Peter Toennies added a comment - Oh, the one from JNA 4.2.1 worked fine for me.

          Was the ppc64 support removed in the more recent JNA versions intentionally or was this an oversight?

          Peter Toennies added a comment - Was the ppc64 support removed in the more recent JNA versions intentionally or was this an oversight?

          You are asking in the wrong place https://github.com/java-native-access/jna is a project separate from Jenkins, so you need to ask there about changes to the library.

           

          Also, does JNA 5.0.0 have the ppc64 library you need?

          Craig Rodrigues added a comment - You are asking in the wrong place https://github.com/java-native-access/jna is a project separate from Jenkins, so you need to ask there about changes to the library.   Also, does JNA 5.0.0 have the ppc64 library you need?

          I looked at jna 4.2.1, 4.5.2, and 5.0.0 from https://github.com/java-native-access/jna/releases. In each tar.gz file I found a lib/native/linux-ppc64.jar file. When I unjarred these from each one, the jna 4.2.1 version contained a libjnidispatch.so. However, the others contained a file named "OUT_OF_DATE" with contents "This file is out of date and needs to be rebuilt". I wonder what that means. I wonder if that means that this version is no longer supported or that there build process is broken.

          I guess I will try to post something on the github link to try to figure out what is going on.

          Peter Toennies added a comment - I looked at jna 4.2.1, 4.5.2, and 5.0.0 from https://github.com/java-native-access/jna/releases . In each tar.gz file I found a lib/native/linux-ppc64.jar file. When I unjarred these from each one, the jna 4.2.1 version contained a libjnidispatch.so. However, the others contained a file named "OUT_OF_DATE" with contents "This file is out of date and needs to be rebuilt". I wonder what that means. I wonder if that means that this version is no longer supported or that there build process is broken. I guess I will try to post something on the github link to try to figure out what is going on.

          Yes you should ask on that project's site.  In addition, I would recommend that you try to build the jna jar file from scratch on your ppc64 hardware and see if you can build the ppc64 library you need.  ppc64 is not so commonly available hardware these days, so could be that the project maintainers don't have access to hardware to build the library you need.

           

          Craig Rodrigues added a comment - Yes you should ask on that project's site.  In addition, I would recommend that you try to build the jna jar file from scratch on your ppc64 hardware and see if you can build the ppc64 library you need.  ppc64 is not so commonly available hardware these days, so could be that the project maintainers don't have access to hardware to build the library you need.  

            Unassigned Unassigned
            pgtoennies Peter Toennies
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: