StackOverflowError on boot from QueueItemAuthenticatorConfiguration

Article ID:360055333572
1 minute readKnowledge base

Issue

Upon starting up Jenkins, large StackOverflowErrors occur. The system loads, but is not fully functional due to a failure.

You may encounter errors such as:

java.lang.IllegalStateException:
The class jenkins.security.QueueItemAuthenticatorConfiguration was not found, potentially not yet loaded
java.lang.IllegalStateException: The class jenkins.security.QueueItemAuthenticatorConfiguration was not found, potentially not yet loaded
    at hudson.ExtensionList.getInstance(ExtensionList.java:166)
    at jenkins.security.QueueItemAuthenticatorConfiguration.get(QueueItemAuthenticatorConfiguration.java:61)
    at jenkins.security.QueueItemAuthenticatorConfiguration$ProviderImpl.getAuthenticators(QueueItemAuthenticatorConfiguration.java:70)
    at jenkins.security.QueueItemAuthenticatorProvider$IteratorImpl.hasNext(QueueItemAuthenticatorProvider.java:44)
    at hudson.model.Queue$Item.authenticate(Queue.java:2332)

The resulting stacktrace will look like this:

020-10-12 18:23:46.262+0000 [id=56] WARNING hudson.model.Descriptor#load: Failed to load /var/lib/jenkins/jenkins.security.QueueItemAuthenticatorConfiguration.xml
java.lang.StackOverflowError
    at com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder.decodeName(XmlFriendlyNameCoder.java:218)
    at com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder.decodeAttribute(XmlFriendlyNameCoder.java:144)
    at com.thoughtworks.xstream.io.AbstractReader.decodeAttribute(AbstractReader.java:75)
    at com.thoughtworks.xstream.io.xml.XppReader.getAttributeName(XppReader.java:151)
    at com.thoughtworks.xstream.io.AttributeNameIterator.next(AttributeNameIterator.java:37)
    at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:282)
    at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:269)

Workaround

While there is no fix for this currently, this workaround does serve to get the instance fully functional again:

  1. Locate the jenkins.security.QueueItemAuthenticatorConfiguration.xml file in the $JENKINS_HOME directory.

  2. Back this up to a safe location.

  3. Remove the jenkins.security.QueueItemAuthenticatorConfiguration.xml file.

  4. Restart Jenkins.

Tested product/plugin versions

CloudBees CI on modern cloud platforms - Managed controller 2.249.1.2

References

Reported Issue: JENKINS-61990