maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herve Boutemy (JIRA)" <>
Subject [jira] (MCHECKSTYLE-244) LicenseResourceManager component is not thread safe and causes parallel build failures
Date Mon, 18 Aug 2014 12:21:10 GMT


Herve Boutemy commented on MCHECKSTYLE-244:

I see that a lot of classes extending AbstractResourceLoader are effectively marked as instantiation-strategy="per-lookup"
(like FileResourceLoader, JarResourceLoader, ...)

and since we didn't mark LicenseResourceManager as per-lookup, only a single instance is used,
with its Map<String, ResourceLoader> resourceLoaders containing a FileResourceLoader:
so in theory, I now see how this can lead to the actual problem in FileResourceLoader as used
by LicenseResourceManager, and how simply marking LicenseResourceManager as per-lookup will
fix the issue

now I only have one problem: how to reproduce the issue and check that it is fixed by the
do you have a sample project to reproduce the issue?

> LicenseResourceManager component is not thread safe and causes parallel build failures
> --------------------------------------------------------------------------------------
>                 Key: MCHECKSTYLE-244
>                 URL:
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.12, 2.12.1
>            Reporter: Konstantin Pokrovsky
>         Attachments: MCHECKSTYLE-244.patch
> {{LicenseResouceManager}} component does not specify instantiation strategy. By default
plexus uses singleton strategey which leads to {{ConcurrentModificationException}} in parallel
maven builds.
> Example: when two {{DefaultCheckstyleExecutors}} try to use one licence manager: one
calls {{addSearchPath}} on {{FileResourceLoader}} while the other one iterating over paths
in {{getResource}} on the same {{FileResourceLoader}} .
> MCHECKSTYLE-238 and MCHECKSTYLE-230 are exactly about this situation. Right now the plugin
for some reason is marked as thread safe although it definetly produces exceptions in parallel
multimodule builds.
> {{DefaultCheckstyleRssGenerator}} is a point of attention because it is also singleton

This message was sent by Atlassian JIRA

View raw message