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

[jar caching] - winp.x64.dll access conflicts

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Seems that JAR caching also takes DLL files on Windows.
      Thanks to Windows architecture (), it leads to access conflicts, because DDLs may be locked by other process.

      The issue is being heavily reproduced during the process. After several hours, any process termination fails with the FileNotFoundException exception (see the log below).

      Probably, the high frequency of the issue is somehow related to "Cygwin Process Killer" plugin. On my installation it calls additional remote call on the node before any process termination (it is an interim workaround for JENKINS-19156 and JENKINS-20289 in the custom 1.509.4 core build).

      Dec 07, 2013 7:02:28 AM org.jvnet.winp.Native load
      WARNING: Failed to write winp.x64.dll
      java.io.FileNotFoundException: C:\Users\XXX\.jenkins\cache\jars\01\winp.x64.dll (The process cannot access the file because it is being used by another process)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(Unknown Source)
      at java.io.FileOutputStream.<init>(Unknown Source)
      at org.jvnet.winp.Native.load(Native.java:81)
      at org.jvnet.winp.Native.<clinit>(Native.java:52)
      at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:200)
      at hudson.util.ProcessTree$Windows.<clinit>(ProcessTree.java:470)
      at hudson.util.ProcessTree.get(ProcessTree.java:335)
      at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:899)
      at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:890)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Unknown Source)

      Dec 07, 2013 7:02:35 AM hudson.util.ProcessTree get
      WARNING: Failed to load winp. Reverting to the default
      java.lang.UnsatisfiedLinkError: Native Library C:\Users\XXX\.jenkins\cache\jars\01\winp.x64.dll already loaded in another classloader
      at java.lang.ClassLoader.loadLibrary1(Unknown Source)
      at java.lang.ClassLoader.loadLibrary0(Unknown Source)
      at java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.lang.Runtime.load0(Unknown Source)
      at java.lang.System.load(Unknown Source)
      at org.jvnet.winp.Native.loadDll(Native.java:158)
      at org.jvnet.winp.Native.load(Native.java:90)
      at org.jvnet.winp.Native.<clinit>(Native.java:52)
      at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:200)
      at hudson.util.ProcessTree$Windows.<clinit>(ProcessTree.java:470)
      at hudson.util.ProcessTree.get(ProcessTree.java:335)
      at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:899)
      at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:890)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Unknown Source)

        Attachments

          Issue Links

            Activity

            Hide
            gmerkin Grigory Merkin added a comment -

            Kohsuke Kawaguchi, this bug seems to be caused by winp library issue https://github.com/kohsuke/winp/issues/26. Could you please promote a new release of fixed winp and update Jenkins to it in next LTS?

            Show
            gmerkin Grigory Merkin added a comment - Kohsuke Kawaguchi , this bug seems to be caused by winp library issue https://github.com/kohsuke/winp/issues/26 . Could you please promote a new release of fixed winp and update Jenkins to it in next LTS?
            Hide
            benh57 Ben Hines added a comment -

            We are also seeing this error pretty often.

            Show
            benh57 Ben Hines added a comment - We are also seeing this error pretty often.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Additional fix has been integrated towards 2.34

            Show
            oleg_nenashev Oleg Nenashev added a comment - Additional fix has been integrated towards 2.34
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            core/pom.xml
            http://jenkins-ci.org/commit/jenkins/63c2f6c5d7d154a3a0f58c54f04f9b1a25ea5385
            Log:
            Update winp to 1.24. In particular, it addresses issues like JENKINS-20913(https://issues.jenkins-ci.org/browse/JENKINS-20913) (#2619)

                1. Changes to be picked
                1. 1.24

            Release date: Nov 2, 2016

                1. 1.23

            Release date: Fev 16, 2015

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/pom.xml http://jenkins-ci.org/commit/jenkins/63c2f6c5d7d154a3a0f58c54f04f9b1a25ea5385 Log: Update winp to 1.24. In particular, it addresses issues like JENKINS-20913 ( https://issues.jenkins-ci.org/browse/JENKINS-20913 ) (#2619) Changes to be picked 1.24 Release date: Nov 2, 2016 Issue #22 ( https://github.com/kohsuke/winp/issues/22 ) - Winp sometimes kills random processes when using killRecursive. ( PR #23 ( https://github.com/kohsuke/winp/pull/23 )) [WINP-10] ( https://java.net/jira/browse/WINP-10 ) - Fix for `getCmdLineAndEnvVars()` which fails on x64 versions of Windows. ( PR #20 ( https://github.com/kohsuke/winp/pull/20 )) Issue #24 ( https://github.com/kohsuke/winp/issues/24 ) - Wrong folder when using the `winp.folder.preferred` system property (parent instead of the actual folder). ( PR #25 ( https://github.com/kohsuke/winp/pull/25 )) Issue #26 ( https://github.com/kohsuke/winp/issues/26 ), JENKINS-20913 ( https://issues.jenkins-ci.org/browse/JENKINS-20913 ) - Native class now tries loading DLLs via the temp location. ( PR #27 ( https://github.com/kohsuke/winp/pull/27 )) 1.23 Release date: Fev 16, 2015 Migrate native components to Visual Studio Community 2013. ( PR #14 ( https://github.com/kohsuke/winp/pull/14 )) Provide a `winp.unpack.dll.to.parent.dir` property, which disables DLL unpacking to the parent dir. ( PR #14 ( https://github.com/kohsuke/winp/pull/12 ))
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            core/pom.xml
            http://jenkins-ci.org/commit/jenkins/e66bfbafa99fc092c6f9fe51f8bf5be267340557
            Log:
            Update winp to 1.24. In particular, it addresses issues like JENKINS-20913(https://issues.jenkins-ci.org/browse/JENKINS-20913) (#2619)

                1. Changes to be picked
                1. 1.24

            Release date: Nov 2, 2016

                1. 1.23

            Release date: Fev 16, 2015

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/pom.xml http://jenkins-ci.org/commit/jenkins/e66bfbafa99fc092c6f9fe51f8bf5be267340557 Log: Update winp to 1.24. In particular, it addresses issues like JENKINS-20913 ( https://issues.jenkins-ci.org/browse/JENKINS-20913 ) (#2619) Changes to be picked 1.24 Release date: Nov 2, 2016 Issue #22 ( https://github.com/kohsuke/winp/issues/22 ) - Winp sometimes kills random processes when using killRecursive. ( PR #23 ( https://github.com/kohsuke/winp/pull/23 )) [WINP-10] ( https://java.net/jira/browse/WINP-10 ) - Fix for `getCmdLineAndEnvVars()` which fails on x64 versions of Windows. ( PR #20 ( https://github.com/kohsuke/winp/pull/20 )) Issue #24 ( https://github.com/kohsuke/winp/issues/24 ) - Wrong folder when using the `winp.folder.preferred` system property (parent instead of the actual folder). ( PR #25 ( https://github.com/kohsuke/winp/pull/25 )) Issue #26 ( https://github.com/kohsuke/winp/issues/26 ), JENKINS-20913 ( https://issues.jenkins-ci.org/browse/JENKINS-20913 ) - Native class now tries loading DLLs via the temp location. ( PR #27 ( https://github.com/kohsuke/winp/pull/27 )) 1.23 Release date: Fev 16, 2015 Migrate native components to Visual Studio Community 2013. ( PR #14 ( https://github.com/kohsuke/winp/pull/14 )) Provide a `winp.unpack.dll.to.parent.dir` property, which disables DLL unpacking to the parent dir. ( PR #14 ( https://github.com/kohsuke/winp/pull/12 )) (cherry picked from commit 63c2f6c5d7d154a3a0f58c54f04f9b1a25ea5385)

              People

              • Assignee:
                oleg_nenashev Oleg Nenashev
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                14 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: