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

scandir being triggered by FingerPrint.save

    Details

    • Similar Issues:

      Description

      We were experiencing extrem slow fingerprinting in post-build step. It turns out that the include pattern of scm sync configure plugin is triggered by FingerPrint.save() (details see discussion in mailing list[1]). Here is a thread dump:

      Executor #1 for comitdev16 : executing SD-2112 #3" Id=62 Group=main RUNNABLE
      	at java.io.UnixFileSystem.list(Native Method)
      	at java.io.File.list(File.java:973)
      	at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1257)
      	at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
      	at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
      	at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
      	at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1211)
      	at org.apache.tools.ant.DirectoryScanner.checkIncludePatterns(DirectoryScanner.java:1030)
      	at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:909)
      	-  locked org.apache.tools.ant.DirectoryScanner@34cf6c49
      	at hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matchingFilesFrom(PatternsEntityMatcher.java:41)
      	at hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matches(PatternsEntityMatcher.java:25)
      	at hudson.plugins.scm_sync_configuration.strategies.AbstractScmSyncStrategy.isSaveableApplicable(AbstractScmSyncStrategy.java:53)
      	at hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin.getStrategyForSaveable(ScmSyncConfigurationPlugin.java:277)
      	at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationSaveableListener.onChange(ScmSyncConfigurationSaveableListener.java:22)
      	at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:78)
      	at hudson.model.Fingerprint.save(Fingerprint.java:862)
      	-  locked hudson.model.Fingerprint@281c2370
      	at hudson.model.Fingerprint.<init>(Fingerprint.java:597)
      	at hudson.model.FingerprintMap.create(FingerprintMap.java:90)
      	at hudson.model.FingerprintMap.create(FingerprintMap.java:45)
      	at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:156)
      	at hudson.model.FingerprintMap.get(FingerprintMap.java:79)
      	at hudson.model.FingerprintMap.get(FingerprintMap.java:45)
      	at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108)
      	at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65)
      	at hudson.tasks.Fingerprinter$1Record.addRecord(Fingerprinter.java:210)
      	at hudson.tasks.Fingerprinter.record(Fingerprinter.java:254)
      	at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:133)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
      	at hudson.model.Run.execute(Run.java:1601)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:241)
      

      I think reacting to all SaveableListener.fireOnChange might be too aggressive, since in this paticular case, no configuration changes are involved.

      [1] https://groups.google.com/forum/#!topic/jenkinsci-users/AftANOOYgt8

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fcamblor Frédéric Camblor
                Reporter:
                zhh Hua Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: