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

500 when loading config containing publish pmd step if workspace was deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pmd-plugin
    • None
    • pmd-plugin 3.46

      We started getting alerted on 500s shortly after installing this plugin, and managed to reproduce a case where loading a config using the plugin causes a traceback and 500.

      To reproduce:

      • install the plugin
      • create a new job using pmd publishing and run it successfully once
      • delete the workspace directory on the agent it last ran on
      • load the config for the job

      This results in an ERROR link under the publish step, which expands to a traceback like

      java.lang.IllegalStateException: basedir [path to workspace] does not exist.
      	at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:879)
      	at hudson.FilePath$46.hasMatch(FilePath.java:2487)
      	at hudson.FilePath$46.invoke(FilePath.java:2371)
      	at hudson.FilePath$46.invoke(FilePath.java:2361)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2732)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      	at ......remote call to [Runner] (Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel.call(Channel.java:830)
      	at hudson.FilePath.act(FilePath.java:986)
      	at hudson.FilePath.act(FilePath.java:975)
      	at hudson.FilePath.validateAntFileMask(FilePath.java:2361)
      	at hudson.FilePath.validateAntFileMask(FilePath.java:2338)
      	at hudson.plugins.analysis.core.PluginDescriptor.doCheckPattern(PluginDescriptor.java:207)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:599)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      

      I would have expected this to prevent whatever kind of previewing the job is doing, but not cause a 500.

      To work around this we just turned off post-build workspace cleanup.

            drulli Ulli Hafner
            simonmweber Simon Weber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: