jenkinsci / jenkinsci/cloud-stats-plugin

[JENKINS-41037] Unable to serialize lists because of ConcurrentModificationException

Open
#178 14 comments 0 reactions 0 assignees View on GitHub
component:cloud-stats-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
13
Forks
21
Avg merge
20h 33m
Merged PRs (30d)
1

Description

This keeps up reported as Flaked tests as it seems to clash with some other test (related activity) and gets retried correctly. (Using synchronized mocks makes no difference).

Reproducible by https://github.com/jenkinsci/resource-disposer-plugin/commit/bc5f00008cc31a680e103dd7bd804bd64b0a4668 and mvn clean package. Not by mvn clean package -Dtest=AsyncResourceDisposerTest#combined of course.

```
Caused by: java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
at java.util.LinkedList$ListItr.next(LinkedList.java:886)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:73)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:223)
at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:210)
... 128 more

```

---
Originally reported by olivergondza, imported from: Unable to serialize lists because of ConcurrentModificationException


  • status: In Progress
  • priority: Minor
  • component(s): cloud-stats-plugin
  • label(s): xstream
  • resolution: Unresolved
  • votes: 4
  • watchers: 12
  • imported: 20251216-182730

Raw content of original issue

This keeps up reported as Flaked tests as it seems to clash with some other test (related activity) and gets retried correctly. (Using synchronized mocks makes no difference).

Reproducible by https://github.com/jenkinsci/resource-disposer-plugin/commit/bc5f00008cc31a680e103dd7bd804bd64b0a4668 and mvn clean package. Not by mvn clean package -Dtest=AsyncResourceDisposerTest#combined of course.


Caused by: java.util.ConcurrentModificationException

at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
at java.util.LinkedList$ListItr.next(LinkedList.java:886)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:73)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:223)
at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:210)
... 128 more

Contributor guide

Open the contributing guide

Research direction

Start by checking commit bc5f00008cc31a680e103dd7bd804bd64b0a4668 and reproducing the failure with mvn clean package, then compare it with AsyncResourceDisposerTest#combined. Trace the ConcurrentModificationException through XStream's CollectionConverter and Jenkins' RobustReflectionConverter; done means the full package run no longer produces this serialization failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.