This PR adds synchronization for operations done with LRM resources property, because during a Jenkins start with recent plugin version I've still occasionally got that ConcurrentModificationException. My best guess is that freePostMortemResources() (explicitly mentioned in the starting page stack trace) and perhaps deleteNotExistingNodes() locked horns.
The XML mentioned a number of resources, all are ephemeral=true (probably saved with a graceful shutdown, then slated for deletion during start-up as no living jobs referenced them). On that system, there are no lockable resources defined persistently.
Testing done
Deployed into the Jenkins instance that suffered the issue. It started and seems to work correctly (gotta run some builds that lock/unlock stuff, to be more sure), and cleaned away many of the ephemeral resources.
On one restart I saw two remaining (one claimed locked by a job that was aborted by the restart), on another one remained and did not disappear after I claimed and released it via UI.
Proposed upgrade guidelines
N/A
Localizations
[ ] English
[ ] German
[ ] French
[ ] Slovak
[ ] Czech
[ ] ...
Submitter checklist
[ ] The Jira / Github issue, if it exists, is well-described.
[ ] The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples).
The changelog generator for plugins uses the pull request title as the changelog entry.
Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during the upgrade.
[ ] There is automated testing or an explanation that explains why this change has no tests.
[ ] New public functions for internal use only are annotated with @NoExternalUse. In case it is used by non java code the Used by {@code <panel>.jelly} Javadocs are annotated.
See #604, #601 and similar efforts.
This PR adds synchronization for operations done with LRM resources property, because during a Jenkins start with recent plugin version I've still occasionally got that ConcurrentModificationException. My best guess is that
freePostMortemResources()
(explicitly mentioned in the starting page stack trace) and perhapsdeleteNotExistingNodes()
locked horns.The XML mentioned a number of resources, all are
ephemeral=true
(probably saved with a graceful shutdown, then slated for deletion during start-up as no living jobs referenced them). On that system, there are no lockable resources defined persistently.Testing done
Deployed into the Jenkins instance that suffered the issue. It started and seems to work correctly (gotta run some builds that lock/unlock stuff, to be more sure), and cleaned away many of the ephemeral resources.
On one restart I saw two remaining (one claimed locked by a job that was aborted by the restart), on another one remained and did not disappear after I claimed and released it via UI.
Proposed upgrade guidelines
N/A
Localizations
Submitter checklist
@NoExternalUse
. In case it is used by non java code theUsed by {@code <panel>.jelly}
Javadocs are annotated.