• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • jenkins 2.190.3
      cloudbees-folder-plugin 6.10
    • cloudbees-folder-6.10.1

      Seeing the following in my Jenkins log as a stacktrace :

      2019-12-06 19:26:29.676+0000 [id=29] WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Tried proxying com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration to support a circular dependency, but it is not an interface.
      
      1 error
       at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
       at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
       at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:439)
       at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
       at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
       at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
       at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
       at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:401)
       at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:392)
       at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
       at hudson.ExtensionList.load(ExtensionList.java:381)
       at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317)
       at hudson.ExtensionList.getComponents(ExtensionList.java:183)
       at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:193)
       at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317)
       at hudson.ExtensionList.iterator(ExtensionList.java:172)
       at com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration.<init>(AbstractFolderConfiguration.java:36)
       at com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration$$FastClassByGuice$$2295d22e.newInstance(<generated>)
       at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
       at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
       at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
       at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
       at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)
       at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
       at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:567)
       at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
       at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
       at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
       at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
       at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
       at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
       at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
       at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
       at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:439)
       at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
       at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
       at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
       at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
       at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:401)
       at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:392)
       at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
       at hudson.ExtensionList.load(ExtensionList.java:381)
       at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317)
       at hudson.ExtensionList.getComponents(ExtensionList.java:183)
       at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:193)
       at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317)
       at hudson.ExtensionList.iterator(ExtensionList.java:172)
       at java.util.Spliterators$IteratorSpliterator.estimateSize(Spliterators.java:1821)
       at java.util.Spliterator.getExactSizeIfKnown(Spliterator.java:408)
       at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:480)
       at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
       at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
       at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
       at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
       at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
       at io.jenkins.plugins.coverage.CoverageElementInitializer.registerAllCoverageElement(CoverageElementInitializer.java:21)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
       at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
       at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
       at jenkins.model.Jenkins$5.runTask(Jenkins.java:1119)
       at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
       at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)
      

      When I downgrade to 6.9, this issue goes away.

          [JENKINS-60393] cloudbees-folder circular dependency

          Rob Echlin added a comment - - edited

          My Jenkins LTS would not start, and had this error.

          I reverted all of my changed plugins, including cloudbees-folder, and I was able to start Jenkins.

          I will try with just this plugin kept back to 6.9, and updating all the others, sometime soon.

          Rob Echlin added a comment - - edited My Jenkins LTS would not start, and had this error. I reverted all of my changed plugins, including cloudbees-folder, and I was able to start Jenkins. I will try with just this plugin kept back to 6.9, and updating all the others, sometime soon.

          Rob Echlin added a comment -

          I was able to catch that Jenkins server with only one job, and only a few minutes left.

          When I updated all my plugins except cloudbees-folder, Jenkins restarted with no visible issues.

          Looks like it really was cloudbees-folder that was blocking our server from starting.

          Rob Echlin added a comment - I was able to catch that Jenkins server with only one job, and only a few minutes left. When I updated all my plugins except cloudbees-folder, Jenkins restarted with no visible issues. Looks like it really was cloudbees-folder that was blocking our server from starting.

          René Scheibe added a comment - - edited

          Note for plugin developers: The stacktrace can simply be reproduced by running "mvn hpi:run" on the source code using the "cloudbees-folder-6.10.0" tag.

          I quick check shows that this issue was introduced in https://github.com/jenkinsci/cloudbees-folder-plugin/commit/25872b140d135f46d7169571e4a5300e51114bac.

          René Scheibe added a comment - - edited Note for plugin developers: The stacktrace can simply be reproduced by running " mvn hpi:run " on the source code using the "cloudbees-folder-6.10.0" tag. I quick check shows that this issue was introduced in https://github.com/jenkinsci/cloudbees-folder-plugin/commit/25872b140d135f46d7169571e4a5300e51114bac .

          Naive question: My Jenkins server was starting up fine => is downgrading strictly necessary so that "Folder" job etc is working?

          Reinhold Füreder added a comment - Naive question: My Jenkins server was starting up fine => is downgrading strictly necessary so that "Folder" job etc is working?

          Nico Prediger added a comment -

          My Jenkins instances can also start, yet when I try to create a new folder, I get an IllegalStateExcaption, which I_think_ may be caused by this error?

           

          ```java.lang.IllegalStateException
          at com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration.get(AbstractFolderConfiguration.java:26)
          at com.cloudbees.hudson.plugins.folder.AbstractFolder.init(AbstractFolder.java:293)
          at com.cloudbees.hudson.plugins.folder.Folder.init(Folder.java:115)
          at com.cloudbees.hudson.plugins.folder.Folder.<init>(Folder.java:104)
          at com.cloudbees.hudson.plugins.folder.Folder$DescriptorImpl.newInstance(Folder.java:374)
          at hudson.model.ItemGroupMixIn.createProject(ItemGroupMixIn.java:316)
          at hudson.model.ItemGroupMixIn.createTopLevelItem(ItemGroupMixIn.java:205)
          at jenkins.model.Jenkins.doCreateItem(Jenkins.java:3940)
          at jenkins.model.Jenkins.doCreateItem(Jenkins.java:312)
          at hudson.model.AllView.doCreateItem(AllView.java:99)
          at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
          at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
          at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
          at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
          at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
          at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
          at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
          at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
          Caused: javax.servlet.ServletException
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:797)

          [...]

          ```

          Nico Prediger added a comment - My Jenkins instances can also start, yet when I try to create a new folder, I get an IllegalStateExcaption, which I_think_ may be caused by this error?   ```java.lang.IllegalStateException at com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration.get(AbstractFolderConfiguration.java:26) at com.cloudbees.hudson.plugins.folder.AbstractFolder.init(AbstractFolder.java:293) at com.cloudbees.hudson.plugins.folder.Folder.init(Folder.java:115) at com.cloudbees.hudson.plugins.folder.Folder.<init>(Folder.java:104) at com.cloudbees.hudson.plugins.folder.Folder$DescriptorImpl.newInstance(Folder.java:374) at hudson.model.ItemGroupMixIn.createProject(ItemGroupMixIn.java:316) at hudson.model.ItemGroupMixIn.createTopLevelItem(ItemGroupMixIn.java:205) at jenkins.model.Jenkins.doCreateItem(Jenkins.java:3940) at jenkins.model.Jenkins.doCreateItem(Jenkins.java:312) at hudson.model.AllView.doCreateItem(AllView.java:99) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747) Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:797) [...] ```

          Hi allan_burdajewicz,

           

          https://github.com/jenkinsci/cloudbees-folder-plugin/pull/129 is causing a regression. Could you please have a look at it?

           

          Thanks in advance!

          Francisco Fernández added a comment - Hi allan_burdajewicz ,   https://github.com/jenkinsci/cloudbees-folder-plugin/pull/129  is causing a regression. Could you please have a look at it?   Thanks in advance!

          Allan BURDAJEWICZ added a comment - Maybe we should move the "auto" configuration outside the constructor and do it after all extensions are loaded: https://github.com/jenkinsci/cloudbees-folder-plugin/blob/cloudbees-folder-6.10.0/src/main/java/com/cloudbees/hudson/plugins/folder/config/AbstractFolderConfiguration.java#L34-L43

          Allan BURDAJEWICZ added a comment - - edited

          I can reproduce the problem when plugins like xunit and code-coverage-api are installed. I think because they use some initializer that happen before the folder global configuration is loaded:

          It does not prevent Jenkins to start in the scenario I tested and a way to workaround that problem if Jenkins starts is to go to Manage Jenkins > Configure System (check that there is a section named "Folder") and save. Otherwise, another workaround is to ensure that there is already a global configuration: add the file com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration.xml to $JENKINS_HOME/ and restart Jenkins.

          Allan BURDAJEWICZ added a comment - - edited I can reproduce the problem when plugins like xunit and code-coverage-api are installed. I think because they use some initializer that happen before the folder global configuration is loaded: https://github.com/jenkinsci/xunit-plugin/blob/xunit-2.3.7/src/main/java/org/jenkinsci/plugins/xunit/AliasInitializer.java#L42 https://github.com/jenkinsci/code-coverage-api-plugin/blob/code-coverage-api-1.1.1/src/main/java/io/jenkins/plugins/coverage/CoverageElementInitializer.java#L12 It does not prevent Jenkins to start in the scenario I tested and a way to workaround that problem if Jenkins starts is to go to Manage Jenkins > Configure System (check that there is a section named "Folder") and save. Otherwise, another workaround is to ensure that there is already a global configuration: add the file com.cloudbees.hudson.plugins.folder.config.AbstractFolderConfiguration.xml to $JENKINS_HOME/ and restart Jenkins.

          Rob Echlin added a comment -

          Sorry, I have been off sick for three days.
          I see you were not able to reproduce my problem with Jenkins starting.

          I have attached a list of plugins, obtained as a list of all the jpi files in my plugins folder.

          Is there a better way to get a list of plugins, as a text file?

          Thanks for your fast work on this ticket!

          Rob Echlin added a comment - Sorry, I have been off sick for three days. I see you were not able to reproduce my problem with Jenkins starting. I have attached a list of plugins, obtained as a list of all the jpi files in my plugins folder. Is there a better way to get a list of plugins, as a text file? Thanks for your fast work on this ticket!

          Mark Waite added a comment -

          My startup is not blocked, but I can definitely see the error in the log consistently with the cloudbees folder plugin 6.10.0 as represented in the 291e29a264 commit on the lts-plugins branch of my docker-lfs repository.

          Steps to duplicate the problem using that repository:

          1. Clone the docker image repository with the commands:
            $ git clone -o public -b lts-with-plugins https://github.com/MarkEWaite/docker-lfs.git
            $ cd docker-lfs
            $ git remote add upstream https://github.com/jenkinsci/docker.git
            $ git pull --all
            $ git checkout -b lts -t public/lts
            $ git checkout lts-with-plugins
            $ ./docker_build.py
            $ ./docker_run.py --clean --quiet
            
          2. Connect to the URL of that server (port 8080 on current host)
          3. Install CloudBees Folder plugin 6.10.0
          4. Restart Jenkins, watch for the stack trace message

          Mark Waite added a comment - My startup is not blocked, but I can definitely see the error in the log consistently with the cloudbees folder plugin 6.10.0 as represented in the 291e29a264 commit on the lts-plugins branch of my docker-lfs repository . Steps to duplicate the problem using that repository: Clone the docker image repository with the commands: $ git clone -o public -b lts-with-plugins https://github.com/MarkEWaite/docker-lfs.git $ cd docker-lfs $ git remote add upstream https://github.com/jenkinsci/docker.git $ git pull --all $ git checkout -b lts -t public/lts $ git checkout lts-with-plugins $ ./docker_build.py $ ./docker_run.py --clean --quiet Connect to the URL of that server (port 8080 on current host) Install CloudBees Folder plugin 6.10.0 Restart Jenkins, watch for the stack trace message

          cloudbees-folder-6.10.1 is out and it should fix the issue. Could you please check?

          Francisco Fernández added a comment - cloudbees-folder-6.10.1 is out and it should fix the issue. Could you please check?

          Mark Waite added a comment -

          fcojfernandez I installed 6.10.1 on my instance and do not see any messages about circular dependencies. Fixed. Thanks!

          Mark Waite added a comment - fcojfernandez I installed 6.10.1 on my instance and do not see any messages about circular dependencies. Fixed. Thanks!

          René Scheibe added a comment -

          René Scheibe added a comment - fcojfernandez LGTM.

          Glad to hear it's fixed. Thanks allan_burdajewicz!

          Francisco Fernández added a comment - Glad to hear it's fixed. Thanks allan_burdajewicz !

          ikedam added a comment -

          ikedam added a comment - Fixed in https://github.com/jenkinsci/cloudbees-folder-plugin/pull/136

            allan_burdajewicz Allan BURDAJEWICZ
            mhall4 Matthew Hall
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: