-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
active-directory.hpi:2.30
allure-jenkins-plugin:allure-jenkins-plugin.hpi
antisamy-markup-formatter.hpi:159.v25b_c67cd35fb_
apache-httpcomponents-client-4-api.hpi:4.5.14-150.v7a_b_9d17134a_5
badge:badge.hpi
bootstrap5-api.hpi:5.3.0-1
bouncycastle-api.hpi:2.28
branch-api.hpi:2.1109.vdf225489a_16d
caffeine-api.hpi:3.1.6-115.vb_8b_b_328e59d8
checks-api.hpi:2.0.0
cloudbees-folder.hpi:6.815.v0dd5a_cb_40e0e
cobertura:cobertura.hpi
code-coverage-api.hpi:4.7.0
command-launcher.hpi:100.v2f6722292ee8
commons-lang3-api.hpi:3.12.0-36.vd97de6465d5b_
commons-text-api.hpi:1.10.0-36.vc008c8fcda_7b_
credentials-binding.hpi:604.vb_64480b_c56ca_
credentials.hpi:1254.vb_96f366e7b_a_d
dashboard-view.hpi:2.487.vcf0ff9008a_c0
data-tables-api.hpi:1.13.4-2
display-url-api.hpi:2.3.7
dtkit-api.hpi:3.0.2
durable-task.hpi:507.v050055d0cb_dd
echarts-api.hpi:5.4.0-5
email-ext.hpi:2.97
font-awesome-api.hpi:6.4.0-1
forensics-api.hpi:2.3.0
git-client.hpi:4.4.0
git.hpi:5.1.0
groovy.hpi:453.vcdb_a_c5c99890
instance-identity.hpi:173.va_37c494ec4e5
ionicons-api.hpi:56.v1b_1c8c49374e
jackson2-api.hpi:2.15.2-350.v0c2f3f8fc595
jakarta-activation-api.hpi:2.0.1-3
jakarta-mail-api.hpi:2.0.1-3
javax-activation-api.hpi:1.2.0-6
jaxb.hpi:2.3.8-1
job-dsl.hpi:1.83
jquery3-api.hpi:3.7.0-1
junit.hpi:1214.va_2f9db_3e6de0
mailer.hpi:457.v3f72cb_e015e5
mapdb-api.hpi:1.0.9-28.vf251ce40855d
matrix-auth.hpi:3.1.8
matrix-project.hpi:789.v57a_725b_63c79
mina-sshd-api-common.hpi:2.10.0-69.v28e3e36d18eb_
mina-sshd-api-core.hpi:2.10.0-69.v28e3e36d18eb_
parameterized-scheduler.hpi:1.2
pipeline-build-step.hpi:496.v2449a_9a_221f2
pipeline-groovy-lib.hpi:656.va_a_ceeb_6ffb_f7
pipeline-input-step.hpi:468.va_5db_051498a_4
pipeline-milestone-step.hpi:111.v449306f708b_7
pipeline-model-api.hpi:2.2141.v5402e818a_779
pipeline-model-definition.hpi:2.2141.v5402e818a_779
pipeline-model-extensions.hpi:2.2141.v5402e818a_779
pipeline-stage-step.hpi:305.ve96d0205c1c6
pipeline-stage-tags-metadata.hpi:2.2141.v5402e818a_779
pipeline-utility-steps.hpi:2.15.4
plain-credentials.hpi:143.v1b_df8b_d3b_e48
plugin-util-api.hpi:3.3.0
prism-api.hpi:1.29.0-7
resource-disposer.hpi:0.22
scm-api.hpi:676.v886669a_199a_a_
script-security.hpi:1251.vfe552ed55f8d
snakeyaml-api.hpi:1.33-95.va_b_a_e3e47b_fa_4
ssh-credentials.hpi:305.v8f4381501156
ssh-slaves.hpi:2.877.v365f5eb_a_b_eec
structs.hpi:324.va_f5d6774f3a_d
subversion.hpi:2.17.2
token-macro.hpi:359.vb_cde11682e0c
trilead-api.hpi:2.84.v72119de229b_7
variant.hpi:59.vf075fe829ccb
workflow-aggregator.hpi:596.v8c21c963d92d
workflow-api.hpi:1215.v2b_ee3e1b_dd39
workflow-basic-steps.hpi:1017.vb_45b_302f0cea_
workflow-cps.hpi:3691.v28b_14c465a_b_b_
workflow-durable-task-step.hpi:1247.v7f9dfea_b_4fd0
workflow-job.hpi:1308.v58d48a_763b_31
workflow-multibranch.hpi:756.v891d88f2cd46
workflow-scm-step.hpi:415.v434365564324
workflow-step-api.hpi:639.v6eca_cd8c04a_a_
workflow-support.hpi:839.v35e2736cfd5c
ws-cleanup.hpi:0.45
xunit.hpi:3.1.2active-directory.hpi:2.30 allure-jenkins-plugin:allure-jenkins-plugin.hpi antisamy-markup-formatter.hpi:159.v25b_c67cd35fb_ apache-httpcomponents-client-4-api.hpi:4.5.14-150.v7a_b_9d17134a_5 badge:badge.hpi bootstrap5-api.hpi:5.3.0-1 bouncycastle-api.hpi:2.28 branch-api.hpi:2.1109.vdf225489a_16d caffeine-api.hpi:3.1.6-115.vb_8b_b_328e59d8 checks-api.hpi:2.0.0 cloudbees-folder.hpi:6.815.v0dd5a_cb_40e0e cobertura:cobertura.hpi code-coverage-api.hpi:4.7.0 command-launcher.hpi:100.v2f6722292ee8 commons-lang3-api.hpi:3.12.0-36.vd97de6465d5b_ commons-text-api.hpi:1.10.0-36.vc008c8fcda_7b_ credentials-binding.hpi:604.vb_64480b_c56ca_ credentials.hpi:1254.vb_96f366e7b_a_d dashboard-view.hpi:2.487.vcf0ff9008a_c0 data-tables-api.hpi:1.13.4-2 display-url-api.hpi:2.3.7 dtkit-api.hpi:3.0.2 durable-task.hpi:507.v050055d0cb_dd echarts-api.hpi:5.4.0-5 email-ext.hpi:2.97 font-awesome-api.hpi:6.4.0-1 forensics-api.hpi:2.3.0 git-client.hpi:4.4.0 git.hpi:5.1.0 groovy.hpi:453.vcdb_a_c5c99890 instance-identity.hpi:173.va_37c494ec4e5 ionicons-api.hpi:56.v1b_1c8c49374e jackson2-api.hpi:2.15.2-350.v0c2f3f8fc595 jakarta-activation-api.hpi:2.0.1-3 jakarta-mail-api.hpi:2.0.1-3 javax-activation-api.hpi:1.2.0-6 jaxb.hpi:2.3.8-1 job-dsl.hpi:1.83 jquery3-api.hpi:3.7.0-1 junit.hpi:1214.va_2f9db_3e6de0 mailer.hpi:457.v3f72cb_e015e5 mapdb-api.hpi:1.0.9-28.vf251ce40855d matrix-auth.hpi:3.1.8 matrix-project.hpi:789.v57a_725b_63c79 mina-sshd-api-common.hpi:2.10.0-69.v28e3e36d18eb_ mina-sshd-api-core.hpi:2.10.0-69.v28e3e36d18eb_ parameterized-scheduler.hpi:1.2 pipeline-build-step.hpi:496.v2449a_9a_221f2 pipeline-groovy-lib.hpi:656.va_a_ceeb_6ffb_f7 pipeline-input-step.hpi:468.va_5db_051498a_4 pipeline-milestone-step.hpi:111.v449306f708b_7 pipeline-model-api.hpi:2.2141.v5402e818a_779 pipeline-model-definition.hpi:2.2141.v5402e818a_779 pipeline-model-extensions.hpi:2.2141.v5402e818a_779 pipeline-stage-step.hpi:305.ve96d0205c1c6 pipeline-stage-tags-metadata.hpi:2.2141.v5402e818a_779 pipeline-utility-steps.hpi:2.15.4 plain-credentials.hpi:143.v1b_df8b_d3b_e48 plugin-util-api.hpi:3.3.0 prism-api.hpi:1.29.0-7 resource-disposer.hpi:0.22 scm-api.hpi:676.v886669a_199a_a_ script-security.hpi:1251.vfe552ed55f8d snakeyaml-api.hpi:1.33-95.va_b_a_e3e47b_fa_4 ssh-credentials.hpi:305.v8f4381501156 ssh-slaves.hpi:2.877.v365f5eb_a_b_eec structs.hpi:324.va_f5d6774f3a_d subversion.hpi:2.17.2 token-macro.hpi:359.vb_cde11682e0c trilead-api.hpi:2.84.v72119de229b_7 variant.hpi:59.vf075fe829ccb workflow-aggregator.hpi:596.v8c21c963d92d workflow-api.hpi:1215.v2b_ee3e1b_dd39 workflow-basic-steps.hpi:1017.vb_45b_302f0cea_ workflow-cps.hpi:3691.v28b_14c465a_b_b_ workflow-durable-task-step.hpi:1247.v7f9dfea_b_4fd0 workflow-job.hpi:1308.v58d48a_763b_31 workflow-multibranch.hpi:756.v891d88f2cd46 workflow-scm-step.hpi:415.v434365564324 workflow-step-api.hpi:639.v6eca_cd8c04a_a_ workflow-support.hpi:839.v35e2736cfd5c ws-cleanup.hpi:0.45 xunit.hpi:3.1.2
Hi Jenkins Team,
We have an intermittent problem with periodical job item updates when this update is being triggered.
Update logic is straightforward:
1. A list of automatically managed jobs is composed, they are nested inside folders but overall the structure is rather simple, projects are not interlinked within themselves. The list is basically a list of branches of selected remote repositories so their only difference is their names and SCM address.
2. For every item in the list a basic job DSL call is invoked thus updating target item to make all jobs up to date.
Full update process takes about a hour to complete and no parallel updates are made – every item is updated once and then the it goes to the next in order.
We first encountered this problem about half a year ago and this is not happening every launch of update, sometimes this is not reproducible at all (so no errors are shown in build log) leading to successful build.
Least known version of Jenkins core application to have this issue is 2.355 and it is still reproducible on recent versions 2.409 and 2.411 (at the moment of creation of this issue).
All job DSL definitions are mostly the same, an example follows:
pipelineJob('TEST-PROJECT/test-subproject/release_branch') { properties { triggers{ pollSCM {scmpoll_spec("*/2 * * * *")} } } authorization { permissions('CommonUsers', [ 'hudson.model.Item.Build' ]) } definition { cps { sandbox(true) script( """// Basic build pipeline |@Library(value='libraryName', changelog=false)_ |runBuild() } } }
No extra actions performed (direct XML manipulations, etc), only basic job settings and definition are refreshed but this script text.
When processing DSL script text with jobDsl(scriptText: text) following Exception occurs thus effectively failing the build:
java.util.ConcurrentModificationException at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719) at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:741) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270) Caused: java.lang.RuntimeException: Failed to serialize javaposse.jobdsl.plugin.actions.GeneratedObjectsRunAction#modifiedObjects for class javaposse.jobdsl.plugin.actions.GeneratedJobsBuildAction at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:75) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270) Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 9ae3d5e8-2b20-4ec3-b42f-c06611c8cbd0 Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class org.jenkinsci.plugins.workflow.job.WorkflowRun at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1303) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1292) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1265) at hudson.util.XStream2.toXMLUTF8(XStream2.java:386) at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:34) at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1252) at hudson.BulkChange.commit(BulkChange.java:98) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1599) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:509) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:38) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Finished: FAILURE
Additional observations:
1. The same issue has been reported for Job DSL plugin version 1.81 and presumably got fixed by 1.81.1 but now it happens again with 1.83 and 1.84 – their changelog provides no evidence that some functionality has been broken.
2. Problem will not show itself every time this update runs, sometimes is takes a week or even two to reproduce (5 to 10 runs or even more builds).
3. No specific item is affected by this Exception, it can be thrown for any item in the list – be it 100th or 2000th item in list. Removing an item does not alter this behavior.
4. No user interaction occurs during update process – this has been proven by temporary locking all user from access to particular Jenkins instance.
5. Sometimes the problem is not reproducible by hand, sometimes it takes about 20 manual runs to happen.
6. Upgrading or downgrading to recent versions of Jenkins or Job DSL plugins did not alter this behavior.
7. Less intensive job updates (like partial list update or precise item update) almost never triggers this error, it mostly shows up when more than 5000 items are updated one by one (never in parallel).
Notes on similar issues:
1. JENKINS-69064 looks like depicting the same issue but it shows "Fixed but unreleased" status.
2. JENKINS-48974 looks similar but our templates never use Grab.
3. JENKINS-69064 looks fixed but shows "Fixed but unreleased" as well.
The most problematic part in all of this: failing update job build causes executor thread deadlock where this update runs, only full instance restart drops this build from executor process.
Killing the build through UI or by Admin Console commands never helps: it just stucks on executor in "zombie" state. Build queue shows it as in "in progress" but the build itself is "finished with FAILURE" if you try to check its status via Groovy model or by viewing build page.
One current workaround is to increase executor count and then occasionally reboot Jenkins from the full off state.
Any help with the issue is greatly appreciated because it is really annoying to manage every time it happens. Let me know if I can provide any more details on the matter or how this can be investigated next time it happens.
Thanks in advance for any hints and help!