maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@codehaus.org>
Subject [jira] (MINSTALL-103) Concurrency problem with installAtEnd in parallel builds
Date Sat, 09 Nov 2013 15:26:20 GMT

     [ https://jira.codehaus.org/browse/MINSTALL-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Scholte closed MINSTALL-103.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.6
         Assignee: Robert Scholte

Nice catch!
Patch applied, fixed in [r1540329|http://svn.apache.org/r1540329] 
                
> Concurrency problem with installAtEnd in parallel builds
> --------------------------------------------------------
>
>                 Key: MINSTALL-103
>                 URL: https://jira.codehaus.org/browse/MINSTALL-103
>             Project: Maven Install Plugin
>          Issue Type: Bug
>          Components: install:install
>    Affects Versions: 2.5.1
>            Reporter: Hermann Josef Hill
>            Assignee: Robert Scholte
>             Fix For: 2.6
>
>         Attachments: install-plugin.patch
>
>
> In the method {{execute()}} of the class {{InstallMojo}}, the counter {{readyProjectsCounter}}
is used to find the last project to be installed. Unfortunately the counter is incremented
*before* the installation request is added to the queued {{installRequests}}. This may lead
to a race condition where requests are added to {{installRequests}} after the (single) execution
of the queued requests. When this happens to a module to be installed, it is *not* installed.
> Example scenario:
> Think of a parallel build of a reactor with only two modules A and B where the execution
of the install plugin for module A is stopped by a context change directly after the line
that sets {{projectsReady}}. The counter {{readyProjectsCounter}} is now one step before the
"finish line".
> If the install plugin for module B is executed now, it will set {{projectsReady}}, enqueue
its own installation request and then execute all enqueued installation requests. The installation
request for A is not enqueued at this point, so it can't be executed - and the install plugin
for module A won't execute it because it thinks "it will be executed later".
> Granted, the window of vulnerability is rather small, but such bugs tend to bite you
unexpectedly...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message