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

If native libraries don't work, symlinks can't be created

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • FreeBSD/x86-64

      Since last jenkins restart, I've started getting "ln -s 2011-12-15_15-59-55 /usr/home/jenkins/jobs/Test/builds/1 failed: -1 " like messages in the log
      Today I've tried to get into it.
      It seems that JNA don't work, so LIBC don't work and PosixAPI is not native.
      But in Java PosixAPI emulation, symlink creation fails with

      java.lang.UnsupportedOperationException
      at hudson.os.PosixAPI$1.getOutputStream(PosixAPI.java:66)
      at org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:47)

      It looks to me impossible to create good implementation of PosixHandler with current singleton model as we need to specify working dir correctly for each call, so I've decided to simply skip PosixAPI in non-native mode, as it does pretty same as fallback code.
      Here is commit I am going to test tomorrow that should fix the bug: https://github.com/tivv/jenkins/commit/5d1c149b6029d63596856b4457699b8362aefc20

          [JENKINS-12119] If native libraries don't work, symlinks can't be created

          Checked - he problem was fixed. Created pull request https://github.com/jenkinsci/jenkins/pull/330

          Vitalii Tymchyshyn added a comment - Checked - he problem was fixed. Created pull request https://github.com/jenkinsci/jenkins/pull/330

          Code changed in jenkins
          User: Vitalii Tymchyshyn
          Path:
          core/src/main/java/hudson/Util.java
          core/src/main/java/hudson/os/PosixAPI.java
          http://jenkins-ci.org/commit/jenkins/867b67ad70c5b319094f3c1cf54441de0400551f
          Log:
          JENKINS-12119 Fix for symlinks not created when native libs don't work

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vitalii Tymchyshyn Path: core/src/main/java/hudson/Util.java core/src/main/java/hudson/os/PosixAPI.java http://jenkins-ci.org/commit/jenkins/867b67ad70c5b319094f3c1cf54441de0400551f Log: JENKINS-12119 Fix for symlinks not created when native libs don't work

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/Util.java
          core/src/main/java/hudson/os/PosixAPI.java
          http://jenkins-ci.org/commit/jenkins/21244cac7e0706f95531fae81e1af68a38544f34
          Log:
          [FIXED JENKINS-12119] rolling back a portion of 46998ba0446834de0c725c32b328ace7ce844f6a as this is binary incompatible change

          Compare: https://github.com/jenkinsci/jenkins/compare/e36f423...21244ca

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/Util.java core/src/main/java/hudson/os/PosixAPI.java http://jenkins-ci.org/commit/jenkins/21244cac7e0706f95531fae81e1af68a38544f34 Log: [FIXED JENKINS-12119] rolling back a portion of 46998ba0446834de0c725c32b328ace7ce844f6a as this is binary incompatible change Compare: https://github.com/jenkinsci/jenkins/compare/e36f423...21244ca

          dogfood added a comment -

          dogfood added a comment - Integrated in jenkins_main_trunk #1409

            Unassigned Unassigned
            tivv Vitalii Tymchyshyn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: