XL Release plugin can cause startup performance issues

Issue

This plugin performs a user lookup on construction. Which can be expensive. This expense can be increased if the lookup is on a master that gets its credentials from CJOC.

For example:

2019-05-12 03:20:19.444+0000 [id=89]    WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=com.xebialabs.xlrelease.ci.XLReleaseNotifier$XLReleaseDescriptor, annotation=[none]]; skipping this component
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Tried proxying com.xebialabs.xlrelease.ci.XLReleaseNotifier$XLReleaseDescriptor 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:424)
    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:386)
    at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:477)
    at hudson.ExtensionList.load(ExtensionList.java:365)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:303)
    at hudson.ExtensionList.iterator(ExtensionList.java:157)
    at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1544)
    at com.cloudbees.opscenter.client.plugin.OperationsCenterRootAction.descriptor(OperationsCenterRootAction.java:181)
    at com.cloudbees.opscenter.client.plugin.OperationsCenterCredentialsProvider.getCredentials(OperationsCenterCredentialsProvider.java:74)
    at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:414)
    at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:371)
    at com.xebialabs.xlrelease.ci.Credential.lookupSystemCredentials(Credential.java:179)
    at com.xebialabs.xlrelease.ci.server.XLReleaseServerFactory.newInstance(XLReleaseServerFactory.java:53)
    at com.xebialabs.xlrelease.ci.server.XLReleaseServerConnectorFactory.getXLReleaseServerConnector(XLReleaseServerConnectorFactory.java:46)
    at com.xebialabs.xlrelease.ci.server.XLReleaseServerConnectorFactory.initMap(XLReleaseServerConnectorFactory.java:36)
    at com.xebialabs.xlrelease.ci.server.XLReleaseServerConnectorFactory.load(XLReleaseServerConnectorFactory.java:31)
    at com.xebialabs.xlrelease.ci.XLReleaseNotifier$XLReleaseDescriptor.load(XLReleaseNotifier.java:225)
    at com.xebialabs.xlrelease.ci.XLReleaseNotifier$XLReleaseDescriptor.<init>(XLReleaseNotifier.java:185)
    at com.xebialabs.xlrelease.ci.XLReleaseNotifier$XLReleaseDescriptor$$FastClassByGuice$$586ea5f2.newInstance(<generated>)
...

In the above example we see a new instance of the XL Release plugin is being created as part of the injection process:

    at com.xebialabs.xlrelease.ci.server.XLReleaseServerFactory.newInstance(XLReleaseServerFactory.java:53)

We see the user lookup here:

    at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:371)
    at com.xebialabs.xlrelease.ci.Credential.lookupSystemCredentials(Credential.java:179)

See https://github.com/jenkinsci/xlrelease-plugin/blob/xlrelease-plugin-7.5.3/src/main/java/com/xebialabs/xlrelease/ci/server/XLReleaseServerFactory.java#L55

It can also cause a deadlock which can prevent Jenkins from completing startup.

Related Issues

Environment

Resolution

Uninstalling xlrelease-plugin will work around the issue. See https://jenkins.io/doc/book/managing/plugins/#uninstalling-a-plugin.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.