[ https://issues.apache.org/jira/browse/MNG-7433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17519165#comment-17519165 ]
Dan Tran commented on MNG-7433: ------------------------------- here is a brief just to visualize the issue and its steps {code:java} 10:59:16 [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ xxx-mvnrepo --- 10:59:16 [INFO] 10:59:16 [INFO] ------------------< com.xxx.xxx.xxx:sonar-analysis >------------------ 10:59:16 [INFO] Building sonar-analysis 19.11.0-1-SNAPSHOT [538/540] 10:59:16 [INFO] --------------------------------[ pom ]--------------------------------- 10:59:16 [INFO] 10:59:16 [INFO] -----------< com.xxx.xxx.xxx.installer:xxx-puppet-config >------------ 10:59:16 [INFO] Building xxx-puppet-config 19.11.0-1-SNAPSHOT [539/540] 10:59:16 [INFO] --------------------------------[ rpm ]--------------------------------- 10:59:16 [INFO] 10:59:16 [INFO] --- maven-enforcer-plugin:1.4.1:enforce (default) @ sonar-analysis --- 10:59:16 [INFO] 10:59:16 [INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (jacoco-all) @ sonar-analysis --- 10:59:16 [INFO] argLine set to -javaagent:/space/jenkins/workspace/xxx_xxx_xxx_PR-4236/.repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/space/jenkins/workspace/xxx_xxx_xxx_PR-4236/sonar/target/jacoco.exec 10:59:16 [INFO] 10:59:16 [INFO] --- flatten-maven-plugin:1.2.7:flatten (flatten) @ sonar-analysis --- 10:59:16 [INFO] Generating flattened POM of project com.xxx.xxx.xxx:sonar-analysis:pom:19.11.0-1-SNAPSHOT... 10:59:16 [INFO] 10:59:16 [INFO] --- jacoco-maven-plugin:0.8.7:report (jacoco-all) @ sonar-analysis --- 10:59:16 [INFO] Skipping JaCoCo execution due to missing execution data file. 10:59:20 [INFO] 10:59:20 [INFO] --- maven-enforcer-plugin:1.4.1:enforce (default) @ xxx-puppet-config --- 10:59:20 [INFO] 10:59:20 [INFO] --- mdev-maven-plugin:1.6.3:sonar (quiet-sonar-scan-by-default) @ sonar-analysis --- 10:59:20 [INFO] Executing: /bin/sh -c cd '/space/jenkins/workspace/xxx_xxx_xxx_PR-4236' && '/xxx/build/.m2/wrapper/dists/apache-maven-3.8.5-bin/5sf9ufumnhp6odg6f4svjl54q1/apache-maven-3.8.5/bin/mvn' '-ntp' 'sonar:sonar' '-Dsonar.pullrequest.key=4236' '-Dsonar.pullrequest.branch=personal/trand8/maven-3.8.5-2' '-Dsonar.pullrequest.base=master' '--quiet' '-P!sonar' '-s' '/tmp/settings43566726mvn'. Working directory: /space/jenkins/workspace/xxx_xxx_xxx_PR-4236 {code} it shows - after xxx-mvnrepos is done, 2 module then run in parallel: sonar-analysis and xxx-puppet-config. The xxx-puppet-config stalls after sonar-analisys spins another maven instant to run sonar:sonar > [REGRESSION] Multiple maven instances working on same source tree can lock > each other > ------------------------------------------------------------------------------------- > > Key: MNG-7433 > URL: https://issues.apache.org/jira/browse/MNG-7433 > Project: Maven > Issue Type: Bug > Affects Versions: 3.8.5 > Reporter: Dan Tran > Priority: Major > > I have a large multi modules java maven build where: > * phase 1 - basic build + unit tests + jacoco - 40 min > * phase 2 - sonar:sonar 20 min > * phase 3 - final packaging and basic smoke-test - 20 min > To take advantage of Maven multi-threaded build, during the reactor build, > one of our maven module spins another instance of Maven to run sonar:sonar > goal right after the basic build is done. > This means our phase 2 and phase 3 run in parallel sharing the same source > tree, same local maven repo (where sonar:sonar should have all needed > dependencies at the share local maven repo to run its task) > With maven-3.8.5, parallelization is no longer possible, phase 3 is blocked > until phase 2 is done. > I am able to trace it to https://github.com/apache/maven/pull/628 where the > locking started the happen > How does the lock mechanic work? there must be a local file where both Maven > instances are watching each other. Is there an option to disable this lock? -- This message was sent by Atlassian Jira (v8.20.1#820001)