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

ArtifactDeployer migration breaks lazy-load on Jenkins initialization

    XMLWordPrintable

Details

    Description

      After upgrading to Jenkins 1.565.1 my setup apparently loaded just fine. I then upgraded the ArtifactDeployer to version 0.31 and restarted. The web interface was stuck for quite a long time because artifact deployer register a migration process that ends up loading all projects history.

      Thread dump:

      "Jenkins initialization thread" prio=5 RUNNABLE
      java.io.FileInputStream.readBytes(Native Method)
      java.io.FileInputStream.read(FileInputStream.java:239)
      java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      java.io.BufferedInputStream.read(BufferedInputStream.java:254)
      java.io.FilterInputStream.read(FilterInputStream.java:83)
      java.io.PushbackInputStream.read(PushbackInputStream.java:139)
      com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.getHeader(XmlHeaderAwareReader.java:79)
      com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.<init>(XmlHeaderAwareReader.java:61)
      com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:65)
      hudson.XmlFile.unmarshal(XmlFile.java:163)
      hudson.model.Run.reload(Run.java:321)
      hudson.model.Run.<init>(Run.java:309)
      hudson.model.AbstractBuild.<init>(AbstractBuild.java:173)
      hudson.model.Build.<init>(Build.java:102)
      hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:38)
      sun.reflect.GeneratedConstructorAccessor67.newInstance(Unknown Source)
      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      java.lang.reflect.Constructor.newInstance(Constructor.java:534)
      jenkins.model.lazy.LazyBuildMixIn.loadBuild(LazyBuildMixIn.java:153)
      jenkins.model.lazy.LazyBuildMixIn$1.create(LazyBuildMixIn.java:134)
      hudson.model.RunMap.retrieve(RunMap.java:218)
      hudson.model.RunMap.retrieve(RunMap.java:56)
      jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:687)
      jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:670)
      jenkins.model.lazy.AbstractLazyLoadRunMap.all(AbstractLazyLoadRunMap.java:622)
      jenkins.model.lazy.AbstractLazyLoadRunMap.entrySet(AbstractLazyLoadRunMap.java:277)
      java.util.AbstractMap$2$1.<init>(AbstractMap.java:378)
      java.util.AbstractMap$2.iterator(AbstractMap.java:377)
      hudson.util.RunList.iterator(RunList.java:97)
      org.jenkinsci.plugins.artifactdeployer.migration.DeployedArtifactsMigrationItemListener.onLoaded(DeployedArtifactsMigrationItemListener.java:29)
      jenkins.model.Jenkins.<init>(Jenkins.java:863)
      hudson.model.Hudson.<init>(Hudson.java:82)
      hudson.model.Hudson.<init>(Hudson.java:78)
      hudson.WebAppMain$3.run(WebAppMain.java:222)

      Once finished, I eventually had access to the web interface. On the next restart, the Jenkins initialization was stuck again with the same thread dump. Seems the migration occurs over and over on every initialization.

      Things to check:

      • should handle the migration after the initialization to avoid blocking the web interface
      • should not lazy load all projects and builds
      • I guess the migration should occur only once.

      Attachments

        Activity

          If I understand, the new version 0.31 is working but it takes much time to migrate from old builds.
          In my opinion, it is a problem only for jobs with large history.
          The migration task doesn't use the 'lazy loading' feature.

          I don't find for now a the solution for migrating old build with lazy loading.
          Any tips would be appreciated.

          gbois Gregory Boissinot added a comment - If I understand, the new version 0.31 is working but it takes much time to migrate from old builds. In my opinion, it is a problem only for jobs with large history. The migration task doesn't use the 'lazy loading' feature. I don't find for now a the solution for migrating old build with lazy loading. Any tips would be appreciated.
          samxiao Sam Xiao added a comment -

          This is a total blocker for us.

          Thread 3092: (state = IN_NATIVE)
           - java.io.FileInputStream.readBytes(byte[], int, int) @bci=0 (Compiled frame; information may be imprecise)
           - java.io.FileInputStream.read(byte[], int, int) @bci=16, line=272 (Compiled frame)
           - sun.nio.cs.StreamDecoder.readBytes() @bci=135, line=283 (Compiled frame)
           - sun.nio.cs.StreamDecoder.implRead(char[], int, int) @bci=112, line=325 (Compiled frame)
           - sun.nio.cs.StreamDecoder.read(char[], int, int) @bci=180, line=177 (Compiled frame)
           - java.io.InputStreamReader.read(char[], int, int) @bci=7, line=184 (Compiled frame)
           - java.io.BufferedReader.fill() @bci=145, line=154 (Compiled frame)
           - java.io.BufferedReader.readLine(boolean) @bci=44, line=317 (Compiled frame)
           - java.io.BufferedReader.readLine() @bci=2, line=382 (Compiled frame)
           - org.jenkinsci.lib.envinject.service.EnvInjectSavable.fromTxt(java.io.FileReader, java.util.Map) @bci=10, line=75 (Compiled frame)
           - org.jenkinsci.lib.envinject.service.EnvInjectSavable.getEnvironment(java.io.File) @bci=85, line=33 (Compiled frame)
           - org.jenkinsci.lib.envinject.EnvInjectAction.getEnvironment(hudson.model.AbstractBuild) @bci=30, line=107 (Compiled frame)
           - org.jenkinsci.lib.envinject.EnvInjectAction.readResolve() @bci=31, line=122 (Compiled frame)
           - sun.reflect.GeneratedMethodAccessor60.invoke(java.lang.Object, java.lang.Object[]) @bci=36 (Compiled frame)
           - sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Compiled frame)
           - java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=57, line=606 (Compiled frame)
           - com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(java.lang.Object) @bci=28, line=66 (Compiled frame)
           - hudson.util.RobustReflectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=20, line=229 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convert(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=15, line=72 (Compiled frame)
           - com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=175, line=65 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=82, line=66 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang.Object, java.lang.Class) @bci=4, line=50 (Compiled frame)
           - com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext, java.lang.Object) @bci=14, line=71 (Compiled frame)
           - hudson.util.RobustCollectionConverter.populateCollection(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext, java.util.Collection) @bci=19, line=83 (Compiled frame)
           - com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=18, line=80 (Compiled frame)
           - hudson.util.RobustCollectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=35, line=74 (Interpreted frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convert(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=15, line=72 (Compiled frame)
           - com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=175, line=65 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=82, line=66 (Compiled frame)
           - hudson.util.RobustReflectionConverter.unmarshalField(com.thoughtworks.xstream.converters.UnmarshallingContext, java.lang.Object, java.lang.Class, java.lang.reflect.Field) @bci=26, line=349 (Compiled frame)
           - hudson.util.RobustReflectionConverter.doUnmarshal(java.lang.Object, com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=506, line=289 (Compiled frame)
           - hudson.util.RobustReflectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=11, line=228 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convert(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=15, line=72 (Compiled frame)
           - com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=175, line=65 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang.Object, java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=82, line=66 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang.Object, java.lang.Class) @bci=4, line=50 (Compiled frame)
           - com.thoughtworks.xstream.core.TreeUnmarshaller.start(com.thoughtworks.xstream.converters.DataHolder) @bci=20, line=134 (Compiled frame)
           - com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(java.lang.Object, com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.DataHolder, com.thoughtworks.xstream.converters.ConverterLookup, com.thoughtworks.xstream.mapper.Mapper) @bci=15, line=32 (Interpreted frame)
           - com.thoughtworks.xstream.XStream.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, java.lang.Object, com.thoughtworks.xstream.converters.DataHolder) @bci=15, line=1189 (Compiled frame)
           - hudson.util.XStream2.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, java.lang.Object, com.thoughtworks.xstream.converters.DataHolder) @bci=45, line=113 (Compiled frame)
           - com.thoughtworks.xstream.XStream.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, java.lang.Object) @bci=4, line=1173 (Compiled frame)
           - hudson.XmlFile.unmarshal(java.lang.Object) @bci=31, line=163 (Compiled frame)
           - hudson.model.Run.reload() @bci=19, line=326 (Compiled frame)
           - hudson.model.Run.<init>(hudson.model.Job, java.io.File) @bci=18, line=314 (Compiled frame)
           - hudson.model.AbstractBuild.<init>(hudson.model.AbstractProject, java.io.File) @bci=3, line=185 (Compiled frame)
           - hudson.model.Build.<init>(hudson.model.Project, java.io.File) @bci=3, line=103 (Compiled frame)
           - hudson.model.FreeStyleBuild.<init>(hudson.model.FreeStyleProject, java.io.File) @bci=3, line=38 (Compiled frame)
           - sun.reflect.GeneratedConstructorAccessor113.newInstance(java.lang.Object[]) @bci=36 (Compiled frame)
           - sun.reflect.DelegatingConstructorAccessorImpl.newInstance(java.lang.Object[]) @bci=5, line=45 (Compiled frame)
           - java.lang.reflect.Constructor.newInstance(java.lang.Object[]) @bci=79, line=526 (Compiled frame)
           - hudson.model.AbstractProject.loadBuild(java.io.File) @bci=36, line=1154 (Compiled frame)
           - hudson.model.AbstractProject$1.create(java.io.File) @bci=5, line=344 (Compiled frame)
           - hudson.model.AbstractProject$1.create(java.io.File) @bci=2, line=342 (Compiled frame)
           - hudson.model.RunMap.retrieve(java.io.File) @bci=21, line=222 (Compiled frame)
           - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=59 (Compiled frame)
           - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=687 (Compiled frame)
           - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.lang.String, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=35, line=670 (Compiled frame)
           - jenkins.model.lazy.AbstractLazyLoadRunMap.all() @bci=67, line=622 (Compiled frame)
           - jenkins.model.lazy.AbstractLazyLoadRunMap.entrySet() @bci=27, line=277 (Interpreted frame)
           - java.util.AbstractMap$2$1.<init>(java.util.AbstractMap$2) @bci=17, line=378 (Interpreted frame)
           - java.util.AbstractMap$2.iterator() @bci=5, line=377 (Interpreted frame)
           - hudson.util.RunList.iterator() @bci=4, line=97 (Interpreted frame)
           - org.jenkinsci.plugins.artifactdeployer.migration.DeployedArtifactsMigrationItemListener.onLoaded() @bci=60, line=29 (Compiled frame)
           - jenkins.model.Jenkins.<init>(java.io.File, javax.servlet.ServletContext, hudson.PluginManager) @bci=1109, line=858 (Interpreted frame)
           - hudson.model.Hudson.<init>(java.io.File, javax.servlet.ServletContext, hudson.PluginManager) @bci=4, line=82 (Interpreted frame)
           - hudson.model.Hudson.<init>(java.io.File, javax.servlet.ServletContext) @bci=4, line=78 (Interpreted frame)
           - hudson.WebAppMain$3.run() @bci=14, line=222 (Interpreted frame)
          
          
          samxiao Sam Xiao added a comment - This is a total blocker for us. Thread 3092: (state = IN_NATIVE) - java.io.FileInputStream.readBytes( byte [], int , int ) @bci=0 (Compiled frame; information may be imprecise) - java.io.FileInputStream.read( byte [], int , int ) @bci=16, line=272 (Compiled frame) - sun.nio.cs.StreamDecoder.readBytes() @bci=135, line=283 (Compiled frame) - sun.nio.cs.StreamDecoder.implRead( char [], int , int ) @bci=112, line=325 (Compiled frame) - sun.nio.cs.StreamDecoder.read( char [], int , int ) @bci=180, line=177 (Compiled frame) - java.io.InputStreamReader.read( char [], int , int ) @bci=7, line=184 (Compiled frame) - java.io.BufferedReader.fill() @bci=145, line=154 (Compiled frame) - java.io.BufferedReader.readLine( boolean ) @bci=44, line=317 (Compiled frame) - java.io.BufferedReader.readLine() @bci=2, line=382 (Compiled frame) - org.jenkinsci.lib.envinject.service.EnvInjectSavable.fromTxt(java.io.FileReader, java.util.Map) @bci=10, line=75 (Compiled frame) - org.jenkinsci.lib.envinject.service.EnvInjectSavable.getEnvironment(java.io.File) @bci=85, line=33 (Compiled frame) - org.jenkinsci.lib.envinject.EnvInjectAction.getEnvironment(hudson.model.AbstractBuild) @bci=30, line=107 (Compiled frame) - org.jenkinsci.lib.envinject.EnvInjectAction.readResolve() @bci=31, line=122 (Compiled frame) - sun.reflect.GeneratedMethodAccessor60.invoke(java.lang. Object , java.lang. Object []) @bci=36 (Compiled frame) - sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang. Object , java.lang. Object []) @bci=6, line=43 (Compiled frame) - java.lang.reflect.Method.invoke(java.lang. Object , java.lang. Object []) @bci=57, line=606 (Compiled frame) - com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(java.lang. Object ) @bci=28, line=66 (Compiled frame) - hudson.util.RobustReflectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=20, line=229 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convert(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=15, line=72 (Compiled frame) - com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=175, line=65 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=82, line=66 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang. Object , java.lang. Class ) @bci=4, line=50 (Compiled frame) - com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext, java.lang. Object ) @bci=14, line=71 (Compiled frame) - hudson.util.RobustCollectionConverter.populateCollection(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext, java.util.Collection) @bci=19, line=83 (Compiled frame) - com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=18, line=80 (Compiled frame) - hudson.util.RobustCollectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=35, line=74 (Interpreted frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convert(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=15, line=72 (Compiled frame) - com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=175, line=65 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=82, line=66 (Compiled frame) - hudson.util.RobustReflectionConverter.unmarshalField(com.thoughtworks.xstream.converters.UnmarshallingContext, java.lang. Object , java.lang. Class , java.lang.reflect.Field) @bci=26, line=349 (Compiled frame) - hudson.util.RobustReflectionConverter.doUnmarshal(java.lang. Object , com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=506, line=289 (Compiled frame) - hudson.util.RobustReflectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=11, line=228 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convert(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=15, line=72 (Compiled frame) - com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=175, line=65 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang. Object , java.lang. Class , com.thoughtworks.xstream.converters.Converter) @bci=82, line=66 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang. Object , java.lang. Class ) @bci=4, line=50 (Compiled frame) - com.thoughtworks.xstream.core.TreeUnmarshaller.start(com.thoughtworks.xstream.converters.DataHolder) @bci=20, line=134 (Compiled frame) - com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(java.lang. Object , com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.DataHolder, com.thoughtworks.xstream.converters.ConverterLookup, com.thoughtworks.xstream.mapper.Mapper) @bci=15, line=32 (Interpreted frame) - com.thoughtworks.xstream.XStream.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, java.lang. Object , com.thoughtworks.xstream.converters.DataHolder) @bci=15, line=1189 (Compiled frame) - hudson.util.XStream2.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, java.lang. Object , com.thoughtworks.xstream.converters.DataHolder) @bci=45, line=113 (Compiled frame) - com.thoughtworks.xstream.XStream.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, java.lang. Object ) @bci=4, line=1173 (Compiled frame) - hudson.XmlFile.unmarshal(java.lang. Object ) @bci=31, line=163 (Compiled frame) - hudson.model.Run.reload() @bci=19, line=326 (Compiled frame) - hudson.model.Run.<init>(hudson.model.Job, java.io.File) @bci=18, line=314 (Compiled frame) - hudson.model.AbstractBuild.<init>(hudson.model.AbstractProject, java.io.File) @bci=3, line=185 (Compiled frame) - hudson.model.Build.<init>(hudson.model.Project, java.io.File) @bci=3, line=103 (Compiled frame) - hudson.model.FreeStyleBuild.<init>(hudson.model.FreeStyleProject, java.io.File) @bci=3, line=38 (Compiled frame) - sun.reflect.GeneratedConstructorAccessor113.newInstance(java.lang. Object []) @bci=36 (Compiled frame) - sun.reflect.DelegatingConstructorAccessorImpl.newInstance(java.lang. Object []) @bci=5, line=45 (Compiled frame) - java.lang.reflect.Constructor.newInstance(java.lang. Object []) @bci=79, line=526 (Compiled frame) - hudson.model.AbstractProject.loadBuild(java.io.File) @bci=36, line=1154 (Compiled frame) - hudson.model.AbstractProject$1.create(java.io.File) @bci=5, line=344 (Compiled frame) - hudson.model.AbstractProject$1.create(java.io.File) @bci=2, line=342 (Compiled frame) - hudson.model.RunMap.retrieve(java.io.File) @bci=21, line=222 (Compiled frame) - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=59 (Compiled frame) - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=687 (Compiled frame) - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.lang. String , jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=35, line=670 (Compiled frame) - jenkins.model.lazy.AbstractLazyLoadRunMap.all() @bci=67, line=622 (Compiled frame) - jenkins.model.lazy.AbstractLazyLoadRunMap.entrySet() @bci=27, line=277 (Interpreted frame) - java.util.AbstractMap$2$1.<init>(java.util.AbstractMap$2) @bci=17, line=378 (Interpreted frame) - java.util.AbstractMap$2.iterator() @bci=5, line=377 (Interpreted frame) - hudson.util.RunList.iterator() @bci=4, line=97 (Interpreted frame) - org.jenkinsci.plugins.artifactdeployer.migration.DeployedArtifactsMigrationItemListener.onLoaded() @bci=60, line=29 (Compiled frame) - jenkins.model.Jenkins.<init>(java.io.File, javax.servlet.ServletContext, hudson.PluginManager) @bci=1109, line=858 (Interpreted frame) - hudson.model.Hudson.<init>(java.io.File, javax.servlet.ServletContext, hudson.PluginManager) @bci=4, line=82 (Interpreted frame) - hudson.model.Hudson.<init>(java.io.File, javax.servlet.ServletContext) @bci=4, line=78 (Interpreted frame) - hudson.WebAppMain$3.run() @bci=14, line=222 (Interpreted frame)
          hashar Antoine Musso added a comment -

          Gregory, on the first upgrade, I have let the migration complete which took several hours. On the next restart, it started over again which prompted me to downgrade the plugin.

          It seems the migration is triggered very early in Jenkins startup process. Maybe it can be triggered asynchronously after Jenkins has booted (and at least the web gui is made available). If a job hasn't been migrated yet, the build could trigger the migration. Aka lazy migration :-]

          hashar Antoine Musso added a comment - Gregory, on the first upgrade, I have let the migration complete which took several hours. On the next restart, it started over again which prompted me to downgrade the plugin. It seems the migration is triggered very early in Jenkins startup process. Maybe it can be triggered asynchronously after Jenkins has booted (and at least the web gui is made available). If a job hasn't been migrated yet, the build could trigger the migration. Aka lazy migration :-]

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/artifactdeployer/DeployedArtifacts.java
          src/main/java/org/jenkinsci/plugins/artifactdeployer/migration/DeployedArtifactsMigrationItemListener.java
          src/main/resources/org/jenkinsci/plugins/artifactdeployer/DeployedArtifactsResult/index.jelly
          http://jenkins-ci.org/commit/artifactdeployer-plugin/f11b368abd0b70339782b4e41e731ae3b7efd237
          Log:
          Fix JENKINS-24140

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/artifactdeployer/DeployedArtifacts.java src/main/java/org/jenkinsci/plugins/artifactdeployer/migration/DeployedArtifactsMigrationItemListener.java src/main/resources/org/jenkinsci/plugins/artifactdeployer/DeployedArtifactsResult/index.jelly http://jenkins-ci.org/commit/artifactdeployer-plugin/f11b368abd0b70339782b4e41e731ae3b7efd237 Log: Fix JENKINS-24140

          I don't know how to make migration with lazy-loading capabilities.
          Maybe it is not possible.
          I choose an alternative with few limitations for the new solution. Please test the new version 0.32.

          gbois Gregory Boissinot added a comment - I don't know how to make migration with lazy-loading capabilities. Maybe it is not possible. I choose an alternative with few limitations for the new solution. Please test the new version 0.32.

          People

            gbois Gregory Boissinot
            hashar Antoine Musso
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: