Why do I receive lots of Warnings on Build reads?

Issue

  • Jenkins logs have multiple occurrences of stack trace which shows WARNING: Request processing failed.

    Caused by: com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException: No such field 
    ...
    ...
    ---- Debugging information ----
     field               : [nameOfThefield]
     class               : [Missingtag]
     required-type       : [Required type]
     converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
     path                : [Path to the field in the XML File]
     line number         : [line in the xml file containing the tag]
     version             : not available
    -------------------------------
    
  • On the UI side you notice various missing builds in the history of impacted jobs.

Environment

  • CloudBees Jenkins Platform (Legacy)

Resolution

The symptoms above can be related to several different causes:

Memory Issues

Your instance works perfectly, but suddenly starts throwing these warnings in the logs and finally degrades so that a restart is needed.

  • You have to correct the GC and memory settings for your instance, as well as adjust parameters. These parameters are described in the article Prepare Jenkins for Support

Plugin version mismatch

You upgraded some plugins, used them in your builds and then downgraded them.

  • In this case the resolution is related to the detection of the plugin that is failing, usually by reviewing the missing field, and upgrading the plugin to a version including it.

The use of the Move/Copy/Promote plugin

The problem appears after someone used the Move/Copy/Promote feature in your instance. Referenced as CJP-6452, this problem was fixed in Operations Center Context Plugin 2.32.0.13 bundled in Client Master 2.32.3.1 and above for the rolling release line Client Master 2.46.24.0.2 and above for the fixed release line.

Usually a restart fixes the issue.

You can verify if you are impacted by this issue by executing the following script in your Jenkins script console (http(s)://YOUR_INSTANCE/script)

import com.thoughtworks.xstream.XStream

/**
 * Get information about the converter for the class passed in
 * @param xs The XSTREAM
 * @param clazz The object class
 * @return
 */
def xsInfo(xsHolder, Class clazz) {
    println "Converter ${xsHolder} for ${clazz}: "
    println " Converter Type: ${xsHolder.XSTREAM2.converterLookup.lookupConverterForType(clazz)}"
    println " ReflectionProviderType: ${xsHolder.XSTREAM2.reflectionProvider.class}"
}

//Print information about the converters
xsInfo(hudson.model.Items, <CLASS>.class)
xsInfo(hudson.model.Run, <CLASS>.class)
xsInfo(jenkins.model.Jenkins, <CLASS>.class)

Where <CLASS> is the class from the Debugging Information detail in the stack trace (for example hudson.matrix.AxisList).

Here is a (non exhaustive) list of classes that can be impacted:

  • hudson.matrix.AxisList.class
  • htmlpublisher.HtmlPublisherTarget.HTMLBuildAction.class
  • hudson.tasks.MailMessageIdAction.class
  • hudson.tasks.junit.TestResultAction.class
  • com.tikal.jenkins.plugins.multijob.MultiJobBuilder.MultiJobAction.class
  • com.tikal.jenkins.plugins.multijob.MultiJobBuild.class

An instance not impacted by CJP-6452 should return something like :

Converter class hudson.model.Items for class <CLASS>: 
 Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
Converter class hudson.model.Run for class <CLASS>: 
 Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
Converter class jenkins.model.Jenkins for class <CLASS>: 
 Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
Converter class com.cloudbees.opscenter.replication.ItemReplicationRecord for class <CLASS>: 
 Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider

While an instance impacted by CJP-6452 should return something like :

Converter class hudson.model.Items for class <CLASS>: 
 Converter Type: com.thoughtworks.xstream.converters.reflection.ReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
Converter class hudson.model.Run for class <CLASS>: 
 Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
Converter class jenkins.model.Jenkins for class <CLASS>: 
 Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
Converter class com.cloudbees.opscenter.replication.ItemReplicationRecord for class <CLASS>: 
 Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx
 ReflectionProviderType: class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider

Note the Converter Type: com.thoughtworks.xstream.converters.reflection.ReflectionConverter@xxxxxxxx instead of Converter Type: hudson.util.RobustReflectionConverter@xxxxxxxx.

When impacted, you’ll have to upgrade your instance to fix the issue.

You can temporarily restart your instance as a workaround. You’ll have to advice you users to not use the Move/Copy/Promote feature of the product before you upgrade (there is no solution to disable it).

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.