You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "liuchangcheng (Jira)" <ji...@apache.org> on 2022/09/21 13:20:00 UTC
[jira] [Updated] (MNG-7545) CLONE - Multithreaded building can create bad files for downloaded artifacts in local repository
[ https://issues.apache.org/jira/browse/MNG-7545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
liuchangcheng updated MNG-7545:
-------------------------------
Description:
Within a parallel build, modules A and B can start at the same time and decide at the same time that they need to download artifact X. Since X is not available locally, both can start download of X. Both will download X and both will try to write the file for X to disk.
On Windows platforms, one of them can fail with file locking problems. On Unixes the contents of the written file can be non-deterministic.
This issue is related to MNG-2802 in the sense that it can create a corrupted artifact file in the local repository, and it can happen to ANY file written. But as opposed to MNG-2802 the synhronization needed to fix this issue is basically only within a single running maven process, so regular java mechanisms can apply, whereas MNG-2802 probably needs to use a totally different solution space.
is this issue fixed?
we are still facing this problem with maven 3.8.3
was:
Within a parallel build, modules A and B can start at the same time and decide at the same time that they need to download artifact X. Since X is not available locally, both can start download of X. Both will download X and both will try to write the file for X to disk.
On Windows platforms, one of them can fail with file locking problems. On Unixes the contents of the written file can be non-deterministic.
This issue is related to MNG-2802 in the sense that it can create a corrupted artifact file in the local repository, and it can happen to ANY file written. But as opposed to MNG-2802 the synhronization needed to fix this issue is basically only within a single running maven process, so regular java mechanisms can apply, whereas MNG-2802 probably needs to use a totally different solution space.
> CLONE - Multithreaded building can create bad files for downloaded artifacts in local repository
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-7545
> URL: https://issues.apache.org/jira/browse/MNG-7545
> Project: Maven
> Issue Type: Bug
> Components: Artifacts and Repositories
> Affects Versions: 3.0-beta-1
> Reporter: liuchangcheng
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 3.8.2, 4.0.0-alpha-1, 4.0.0
>
>
> Within a parallel build, modules A and B can start at the same time and decide at the same time that they need to download artifact X. Since X is not available locally, both can start download of X. Both will download X and both will try to write the file for X to disk.
> On Windows platforms, one of them can fail with file locking problems. On Unixes the contents of the written file can be non-deterministic.
> This issue is related to MNG-2802 in the sense that it can create a corrupted artifact file in the local repository, and it can happen to ANY file written. But as opposed to MNG-2802 the synhronization needed to fix this issue is basically only within a single running maven process, so regular java mechanisms can apply, whereas MNG-2802 probably needs to use a totally different solution space.
>
> is this issue fixed?
> we are still facing this problem with maven 3.8.3
--
This message was sent by Atlassian Jira
(v8.20.10#820010)