Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-6076

JNA code does not work if tmpdir is mounted noexec

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.12.0
    • Fix Version/s: 1.12.1
    • Component/s: Build / Packaging
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      At a customer site, Tarus saw an error at startup related to JNA initialization:

      Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna1682786434384331136.tmp: /tmp/jna1682786434384331136.tmp: failed to map segment from shared object: Operation not permitted
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
      at java.lang.Runtime.load0(Runtime.java:770)
      at java.lang.System.load(System.java:1003)
      at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:761)
      at com.sun.jna.Native.loadNativeLibrary(Native.java:685)
      at com.sun.jna.Native.<clinit>(Native.java:109)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at org.productivity.java.syslog4j.util.SyslogUtility.isClassExists(Unknown Source)
      at org.productivity.java.syslog4j.Syslog.initialize(Unknown Source)
      at org.productivity.java.syslog4j.Syslog.<clinit>(Unknown Source)
      at org.opennms.netmgt.alarmd.northbounder.syslog.SyslogNorthbounder.createNorthboundInstance(SyslogNorthbounder.java:329)
      at org.opennms.netmgt.alarmd.northbounder.syslog.SyslogNorthbounder.afterPropertiesSet(SyslogNorthbounder.java:91)
      at org.opennms.netmgt.alarmd.northbounder.syslog.SyslogNorthbounderManager.afterPropertiesSet(SyslogNorthbounderManager.java:68)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
      ... 90 more

      It appears the problem is that the JVM is not allowed to mmap/load a file that's been unpacked into /tmp because /tmp is mounted noexec.

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              tarus Tarus Balog
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: