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

OldDataMonitor.referTo can throw AccessDeniedException

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Environment:
      2.32.2
    • Similar Issues:

      Description

      Noticed in a log file:

      ...	WARNING	hudson.model.RunMap#retrieve: could not load /.../jobs/.../builds/...
      java.io.IOException: Unable to read /.../jobs/.../builds/.../build.xml
      	at hudson.XmlFile.unmarshal(XmlFile.java:161)
      	at hudson.model.Run.reload(Run.java:337)
      	at hudson.model.Run.<init>(Run.java:325)
      	at hudson.model.AbstractBuild.<init>(AbstractBuild.java:175)
      	at hudson.model.Build.<init>(Build.java:103)
      	at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:38)
      	at sun.reflect.GeneratedConstructorAccessor95.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at jenkins.model.lazy.LazyBuildMixIn.loadBuild(LazyBuildMixIn.java:165)
      	at jenkins.model.lazy.LazyBuildMixIn$1.create(LazyBuildMixIn.java:142)
      	at hudson.model.RunMap.retrieve(RunMap.java:223)
      	at hudson.model.RunMap.retrieve(RunMap.java:56)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:500)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:482)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:380)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:345)
      	at jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild(LazyBuildMixIn.java:362)
      	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:196)
      	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:105)
      	at hudson.model.Run.getPreviousSuccessfulBuild(Run.java:922)
      	at hudson.plugins.git.GitSCM.getLastSuccessfulBuiltCommitOfBranch(GitSCM.java:1314)
      	at hudson.plugins.git.GitSCM.buildEnvVars(GitSCM.java:1259)
      	at org.jenkinsci.plugins.multiplescms.MultiSCM.buildEnvVars(MultiSCM.java:73)
      	at hudson.plugins.git.util.GitUtils.getPollEnvironment(GitUtils.java:253)
      	at hudson.plugins.git.util.GitUtils.getPollEnvironment(GitUtils.java:208)
      	at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:683)
      	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:584)
      	at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391)
      	at hudson.scm.SCM.poll(SCM.java:408)
      	at org.jenkinsci.plugins.multiplescms.MultiSCM.compareRemoteRevisionWith(MultiSCM.java:93)
      	at hudson.scm.SCM.poll(SCM.java:408)
      	at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1482)
      	at hudson.model.AbstractProject._poll(AbstractProject.java:1452)
      	at hudson.model.AbstractProject.poll(AbstractProject.java:1363)
      	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:563)
      	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:609)
      	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Please login to access job ... : Please login to access job ...
      ...
      Caused by: org.acegisecurity.AccessDeniedException: Please login to access job ...
      	at jenkins.model.Jenkins.getItem(Jenkins.java:2724)
      	at jenkins.model.Jenkins.getItem(Jenkins.java:324)
      	at jenkins.model.Jenkins.getItemByFullName(Jenkins.java:2830)
      	at jenkins.model.Jenkins.getItemByFullName(Jenkins.java:2849)
      	at hudson.diagnosis.OldDataMonitor.referTo(OldDataMonitor.java:388)
      	at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:161)
      	at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:202)
      	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:371)
      	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      	... 51 more
      

      Certainly OldDataMonitor.referTo should be impersonating SYSTEM. Perhaps SCMTrigger should too.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: