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

backup fails with "another process has locked a portion of the file"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: backup-plugin
    • Labels:
      None
    • Environment:
      Hudson 1.348 in Tomcat 5.5 on top of Server 2003
    • Similar Issues:

      Description

      I'm getting:

      [DEBUG] updates\hudson.tasks.Maven.MavenInstaller file
      [DEBUG] updates\hudson.tools.JDKInstaller file
      [DEBUG] userContent\rack.gif file
      [DEBUG] userContent\readme.txt file
      [DEBUG] users\louis_davis\config.xml file
      [DEBUG] users\william_leara\config.xml file
      [DEBUG] Workspace clean-up.log file
      [ERROR] org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
      org.jvnet.hudson.plugins.backup.BackupException: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
      at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:115)
      at org.jvnet.hudson.plugins.backup.utils.BackupTask.run(BackupTask.java:125)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
      at org.jvnet.hudson.plugins.backup.utils.BackupEngine.handleEnd(BackupEngine.java:104)
      at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:336)
      at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:113)
      ... 2 more
      [ INFO] Cancel hudson shutdown mode
      [ INFO] Backup end at [03/10/10 12:37:59]
      [ INFO] [49.641s]

      • option set to create zip file
      • verbose mode is on
      • all 4 checkboxes under "Backup content" are unchecked

      This exact same setup used to work, but one day stopped. Can anyone give me some advice on troubleshooting what might be holding which file in use? Perhaps a plugin I installed is causing the trouble?

        Attachments

          Activity

          Hide
          jeffolson jeffolson added a comment -

          I am having the exact same problem. I've tried backing up to all sorts of locations, local and network, including ones that I'm almost 100% sure should not be having any sort of antivirus scan, etc. running on them.

          Hudson: 1.358
          Backup plugin: 1.4.1
          Running on Windows Server 2003
          Hudson installed as a Windows service

          Show
          jeffolson jeffolson added a comment - I am having the exact same problem. I've tried backing up to all sorts of locations, local and network, including ones that I'm almost 100% sure should not be having any sort of antivirus scan, etc. running on them. Hudson: 1.358 Backup plugin: 1.4.1 Running on Windows Server 2003 Hudson installed as a Windows service
          Hide
          tk694h tk694h added a comment -

          I have a similar (not exact) problem.

          [ERROR] org.codehaus.plexus.archiver.ArchiverException: Failed to read filesystem attributes for: <<homeDirectory>>/.hudson/war/help/system-config/master-slave/demand/inDemandDelay_de.html

          The file does exist.

          Hudson 1.348
          Backup plugin:
          Running on 64 bit RHEL (linux)
          Executing nohup $JAVA -Dhudson.model.Run.ArtifactList.listCutoff=24 -jar $HUDSON_WAR --httpPort=8008 >$HUDSON_LOG 2>&1 &

          Show
          tk694h tk694h added a comment - I have a similar (not exact) problem. [ERROR] org.codehaus.plexus.archiver.ArchiverException: Failed to read filesystem attributes for: <<homeDirectory>>/.hudson/war/help/system-config/master-slave/demand/inDemandDelay_de.html The file does exist. Hudson 1.348 Backup plugin: Running on 64 bit RHEL (linux) Executing nohup $JAVA -Dhudson.model.Run.ArtifactList.listCutoff=24 -jar $HUDSON_WAR --httpPort=8008 >$HUDSON_LOG 2>&1 &
          Hide
          rseguy Romain Seguy added a comment -

          Can you install Process Explorer and identify which process is having another handle onto the file?

          Show
          rseguy Romain Seguy added a comment - Can you install Process Explorer and identify which process is having another handle onto the file?
          Hide
          williamleara williamleara added a comment -

          The problem is, what file is it that's causing the trouble? The last line before the error says "Workspace clean-up.log file", but using Process Explorer I don't see anything holding a handle to that file. I tried searching in Process Explorer for everything containing "c:\hudson". I get many results, but they're all handles of the "tomcat5.exe" process.

          Do you know more about what the Backup Plugin is trying to do at this point where the error appears?

          Show
          williamleara williamleara added a comment - The problem is, what file is it that's causing the trouble? The last line before the error says "Workspace clean-up.log file", but using Process Explorer I don't see anything holding a handle to that file. I tried searching in Process Explorer for everything containing "c:\hudson". I get many results, but they're all handles of the "tomcat5.exe" process. Do you know more about what the Backup Plugin is trying to do at this point where the error appears?
          Hide
          mat007 mat007 added a comment -

          I was having the exact same problem :
          [DEBUG] Workspace clean-up.log file
          [ERROR] org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: ....

          And it turned out that deactivating the Audit Trail plugin solved it.

          Show
          mat007 mat007 added a comment - I was having the exact same problem : [DEBUG] Workspace clean-up.log file [ERROR] org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: .... And it turned out that deactivating the Audit Trail plugin solved it.
          Hide
          rseguy Romain Seguy added a comment -

          Unassigning myself from this plugin, no time to work in it, sorry.

          Show
          rseguy Romain Seguy added a comment - Unassigning myself from this plugin, no time to work in it, sorry.
          Hide
          markrnaustin Mark R added a comment -

          Thanks Mat007, I was having the same problem. Turning off Audit Trail fixed it as well. Now I just have to remember to turn it off and on before and after every backup

          Show
          markrnaustin Mark R added a comment - Thanks Mat007, I was having the same problem. Turning off Audit Trail fixed it as well. Now I just have to remember to turn it off and on before and after every backup
          Hide
          oliverh Oliver Hoffmann added a comment -

          There's no need to disable Audit Trail.
          It's enough to exclude all Audit Trail's lck files, so just add the following to your "Custom Exclusions":
          "audit.log.0.lck,audit.log.1.lck,audit.log.2.lck"

          Maybe you have to add more of them, depending on your setup of Audit Trail.

          Show
          oliverh Oliver Hoffmann added a comment - There's no need to disable Audit Trail. It's enough to exclude all Audit Trail's lck files, so just add the following to your "Custom Exclusions": "audit.log.0.lck,audit.log.1.lck,audit.log.2.lck" Maybe you have to add more of them, depending on your setup of Audit Trail.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            williamleara williamleara
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: