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

PluginManager.dynamicLoad on installed plugin fails on NFS with IOException not RestartRequiredException

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      linux, nfs, jenkins 1.450, any plugin
    • Similar Issues:

      Description

      Got the question from the irc channel, this was initially discussed on the fosdem jenkins booth.

      Updating plugins doesn't work when the jenkins home directory is located on nfs, the failure looks like this

      Caused by: java.io.IOException: Unable to delete /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/.nfs00000000000e897d00000096

      The .nfs files appear when deleting a file on nfs that is still open, in this case the jar files in the lib directory are still open and cannot be deleted.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Tried to reproduce on Windows, where I would expect this to also be a problem, but did not get that far: only Download now and install after restart is offered in /pluginManager/ to begin with.

            Show
            jglick Jesse Glick added a comment - Tried to reproduce on Windows, where I would expect this to also be a problem, but did not get that far: only Download now and install after restart is offered in /pluginManager/ to begin with.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/ClassicPluginStrategy.java
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/PluginStrategy.java
            core/src/main/java/hudson/PluginWrapper.java
            test/src/test/java/hudson/PluginManagerTest.java
            http://jenkins-ci.org/commit/jenkins/7f856b56082b0b164c94bafc108408dfc4b4b138
            Log:
            [FIXED JENKINS-12753] Added PluginStrategy.getShortName to avoid actually trying to unpack a plugin before throwing RestartRequiredException.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/ClassicPluginStrategy.java core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/PluginStrategy.java core/src/main/java/hudson/PluginWrapper.java test/src/test/java/hudson/PluginManagerTest.java http://jenkins-ci.org/commit/jenkins/7f856b56082b0b164c94bafc108408dfc4b4b138 Log: [FIXED JENKINS-12753] Added PluginStrategy.getShortName to avoid actually trying to unpack a plugin before throwing RestartRequiredException.
            Hide
            danielbeck Daniel Beck added a comment -

            Jesse: Since JENKINS-20732

            Show
            danielbeck Daniel Beck added a comment - Jesse: Since JENKINS-20732
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3390
            [FIXED JENKINS-12753] Added PluginStrategy.getShortName to avoid actually trying to unpack a plugin before throwing RestartRequiredException. (Revision 7f856b56082b0b164c94bafc108408dfc4b4b138)

            Result = SUCCESS
            Jesse Glick : 7f856b56082b0b164c94bafc108408dfc4b4b138
            Files :

            • core/src/main/java/hudson/PluginStrategy.java
            • test/src/test/java/hudson/PluginManagerTest.java
            • core/src/main/java/hudson/PluginWrapper.java
            • core/src/main/java/hudson/PluginManager.java
            • core/src/main/java/hudson/ClassicPluginStrategy.java
            • changelog.html
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3390 [FIXED JENKINS-12753] Added PluginStrategy.getShortName to avoid actually trying to unpack a plugin before throwing RestartRequiredException. (Revision 7f856b56082b0b164c94bafc108408dfc4b4b138) Result = SUCCESS Jesse Glick : 7f856b56082b0b164c94bafc108408dfc4b4b138 Files : core/src/main/java/hudson/PluginStrategy.java test/src/test/java/hudson/PluginManagerTest.java core/src/main/java/hudson/PluginWrapper.java core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/ClassicPluginStrategy.java changelog.html
            Hide
            jglick Jesse Glick added a comment -

            Finally did manage to reproduce the corresponding bug on Windows in 1.554.1:

            May 20, 2014 3:26:21 PM INFO hudson.model.UpdateCenter$DownloadJob run
            Starting the installation of Support Core Plugin on behalf of anonymous
            May 20, 2014 3:26:21 PM INFO hudson.model.UpdateCenter$UpdateCenterConfiguration download
            Downloading Support Core Plugin
            May 20, 2014 3:26:22 PM INFO hudson.PluginManager dynamicLoad
            Attempting to dynamic load C:\Documents and Settings\Jesse Glick\.jenkins\plugins\support-core.jpi
            May 20, 2014 3:26:22 PM SEVERE hudson.model.UpdateCenter$DownloadJob run
            Failed to install Support Core Plugin
            java.io.IOException: Failed to dynamically deploy this plugin
            	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1304)
            	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1103)
            	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
            	at java.util.concurrent.FutureTask.run(Unknown Source)
            	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
            	at java.lang.Thread.run(Unknown Source)
            Caused by: java.nio.file.FileSystemException: C:\Documents and Settings\Jesse Glick\.jenkins\plugins\support-core\WEB-INF\lib\animal-sniffer-annotations-1.9.jar: The process cannot access the file because it is being used by another process.
            
            	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
            	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
            	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
            	at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
            	at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
            	at java.nio.file.Files.delete(Unknown Source)
            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            	at java.lang.reflect.Method.invoke(Unknown Source)
            	at hudson.Util.deleteFile(Util.java:238)
            	at hudson.Util.deleteRecursive(Util.java:301)
            	at hudson.Util.deleteContentsRecursive(Util.java:203)
            	at hudson.Util.deleteRecursive(Util.java:292)
            	at hudson.Util.deleteContentsRecursive(Util.java:203)
            	at hudson.Util.deleteRecursive(Util.java:292)
            	at hudson.Util.deleteContentsRecursive(Util.java:203)
            	at hudson.Util.deleteRecursive(Util.java:292)
            	at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:422)
            	at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:126)
            	at hudson.PluginManager.dynamicLoad(PluginManager.java:415)
            	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1300)
            	... 5 more
            
            Show
            jglick Jesse Glick added a comment - Finally did manage to reproduce the corresponding bug on Windows in 1.554.1: May 20, 2014 3:26:21 PM INFO hudson.model.UpdateCenter$DownloadJob run Starting the installation of Support Core Plugin on behalf of anonymous May 20, 2014 3:26:21 PM INFO hudson.model.UpdateCenter$UpdateCenterConfiguration download Downloading Support Core Plugin May 20, 2014 3:26:22 PM INFO hudson.PluginManager dynamicLoad Attempting to dynamic load C:\Documents and Settings\Jesse Glick\.jenkins\plugins\support-core.jpi May 20, 2014 3:26:22 PM SEVERE hudson.model.UpdateCenter$DownloadJob run Failed to install Support Core Plugin java.io.IOException: Failed to dynamically deploy this plugin at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1304) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1103) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104) at java.lang.Thread.run(Unknown Source) Caused by: java.nio.file.FileSystemException: C:\Documents and Settings\Jesse Glick\.jenkins\plugins\support-core\WEB-INF\lib\animal-sniffer-annotations-1.9.jar: The process cannot access the file because it is being used by another process. at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source) at java.nio.file.Files.delete(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at hudson.Util.deleteFile(Util.java:238) at hudson.Util.deleteRecursive(Util.java:301) at hudson.Util.deleteContentsRecursive(Util.java:203) at hudson.Util.deleteRecursive(Util.java:292) at hudson.Util.deleteContentsRecursive(Util.java:203) at hudson.Util.deleteRecursive(Util.java:292) at hudson.Util.deleteContentsRecursive(Util.java:203) at hudson.Util.deleteRecursive(Util.java:292) at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:422) at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:126) at hudson.PluginManager.dynamicLoad(PluginManager.java:415) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1300) ... 5 more

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                alexlehm Alex Lehmann
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: