[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-07-29 Thread Daniel Johnson (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17869448#comment-17869448
 ] 

Daniel Johnson commented on MNG-7868:
-

I set out to get a shareable project that can reproduce this.  I messed up as I 
was creating it, but I did still in fact hit the issue, so I am going to share 
the project as-is when issue was hit. This is a simple multi-module project.  
The aggregator is set also as the parent, and declares a few common 
dependencies.  There are 4 modules, modules 1-3 are just inheriting the 
dependencies of the parent POM.  Module4 is also inheriting, but also declares 
dependencies to modules 2 and 3.  I ran the build with `mvn clean install -T 5`

The reason the project is messed up, the `jetty-webapp` and `jetty-servlets` 
dependencies don't actually exist in version 12.0.11, which triggers its own 
failure;
{noformat}
org.apache.maven.project.DependencyResolutionException: Could not resolve 
dependencies for project org.apache.maven:module1:jar:0.1-SNAPSHOT
dependency: org.eclipse.jetty:jetty-webapp:jar:12.0.11 (compile){noformat}
However, in this example I did hit the lock issue, and I hope it may be easier 
with these open-source dependencies to identify what and where the code is 
going wrong.
{noformat}
12:17:58.290 [mvn-builder-module2] [INFO] Diagnostic dump of lock factory
12:17:58.290 [mvn-builder-module2] [INFO] ===
12:17:58.290 [mvn-builder-module2] [INFO] Implementation: 
org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory
12:17:58.290 [mvn-builder-module2] [INFO] Active locks: 1
12:17:58.291 [mvn-builder-module2] [INFO] 
12:17:58.291 [mvn-builder-module2] [INFO] Name: 
artifact:org.eclipse.jetty:jetty-webapp:12.0.11
12:17:58.291 [mvn-builder-module2] [INFO] RefCount: 2
12:17:58.291 [mvn-builder-module2] [INFO]   Thread[mvn-builder-module2,5,main] 
-> [exclusive]
12:17:58.291 [mvn-builder-module2] [INFO]   Thread[mvn-builder-module3,5,main] 
-> [wait-exclusive]
12:17:58.291 [mvn-builder-module2] [INFO]   Thread[mvn-builder-module1,5,main] 
-> []
12:17:58.291 [mvn-builder-module2] [INFO] 
Downloading from internal-repo: 
https:///mirror-repo/org/eclipse/jetty/jetty-client/12.0.11/jetty-client-12.0.11.pom
12:17:58.291 [mvn-builder-module3] [INFO] Diagnostic dump of lock factory
12:17:58.291 [mvn-builder-module3] [INFO] ===
12:17:58.291 [mvn-builder-module3] [INFO] Implementation: 
org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory
12:17:58.291 [mvn-builder-module3] [INFO] Active locks: 2
12:17:58.291 [mvn-builder-module3] [INFO] 
12:17:58.291 [mvn-builder-module3] [INFO] Name: 
artifact:org.eclipse.jetty:jetty-webapp:12.0.11
12:17:58.291 [mvn-builder-module3] [INFO] RefCount: 1
12:17:58.292 [mvn-builder-module3] [INFO]   Thread[BuilderThread 2,5,] -> []
12:17:58.292 [mvn-builder-module3] [INFO]   Thread[mvn-builder-module3,5,main] 
-> [exclusive]
12:17:58.292 [mvn-builder-module3] [INFO]   Thread[mvn-builder-module1,5,main] 
-> []
12:17:58.292 [mvn-builder-module3] [INFO] Name: 
artifact:org.eclipse.jetty:jetty-client:12.0.11
12:17:58.292 [mvn-builder-module3] [INFO] RefCount: 1
12:17:58.292 [mvn-builder-module3] [INFO]   Thread[mvn-builder-module1,5,main] 
-> [exclusive]
...
java.lang.IllegalStateException: Attempt 1: Could not acquire write lock for 
'artifact:org.eclipse.jetty:jetty-webapp:12.0.11' in 30 SECONDS{noformat}
Unfortunately I could not easily reproduce even if deleting my local maven repo 
and building again and again.

[^MNG-7868-reproduce.txt]
[^MNG-7868.zip]

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: MNG-7868-pz_ai_37_lock.txt, MNG-7868-reproduce.txt, 
> MNG-7868.zip, image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or 

[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-07-20 Thread Piotr Zygielo (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17867517#comment-17867517
 ] 

Piotr Zygielo commented on MNG-7868:


Attached {{MNG-7868-pz_ai_37_lock.txt}} with the current failure with mvn 3.9.8 
on Java 21.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: MNG-7868-pz_ai_37_lock.txt, 
> image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-07-09 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17864405#comment-17864405
 ] 

Tamas Cservenak commented on MNG-7868:
--

For start, Tycho does contain uses of SyncContext: 
[https://github.com/search?q=repo%3Aeclipse-tycho%2Ftycho%20SyncContext=code]

(but I have no time to go over all the call stacks, so am unable to tell is 
your use of AbstractCompilerMojo (that to me seems is 
AbstractOSGiCompilerMojo?) affected or not)

But I agree, this is all just hint, in resolver and maven, locks are (should, 
unless there is some bug) held ONLY during resolving.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-07-09 Thread Daniel Johnson (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17864395#comment-17864395
 ] 

Daniel Johnson commented on MNG-7868:
-

[~cstamas] - Nothing too exciting, our company leveraged an open-source UML 
modeling tool (Eclipse Tigerstripe) for past ~15 years.  We wrote a custom 
maven plugin to support "generating" the Tigerstripe models into Java runtime 
code, and so we. It builds on top of the tycho-compiler-plugin (1.7.0) with:


{code:java}
import copied.org.apache.maven.plugin.AbstractCompilerMojo; // from 
tycho-compiler-plugin:1.7.0
@Mojo(name = "compile", requiresDependencyResolution = ResolutionScope.COMPILE, 
threadSafe = true)
public class TigerstripeCompiler extends AbstractCompilerMojo { ... }
{code}

In that code we setup a few custom compile classpath entries, but I guess the 
only relevant section to this problem would be when we add the projects compile 
dependencies to the classpath:


{code:java}
for (Artifact artifact : project.getCompileArtifacts()) {
classpath.add(artifact.getFile().getAbsolutePath());
} {code}
If I understand your above comment, this type of access to the compile 
artifacts should not cause any issue with the locks? The locks would only be 
held during resolution since the Mojo is marked with 
'{_}requiresDependencyResolution = ResolutionScope.COMPILE'.{_}
 
If you have any reason to think the bug may be stemming from this custom 
plugin, and more likely in the underlying tycho-compiler-plugin:1.7.0 itself, 
then I can definitely do more investigation and potentially try updating to a 
newer version of Tycho to see if it resolves.

I will also need to pay more attention, I can't say for sure that every failure 
I have seen with this lock issue has this plugin in use.  Will try to monitor 
and update if I can confirm one way or another.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-07-09 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17864366#comment-17864366
 ] 

Tamas Cservenak commented on MNG-7868:
--

Last paragraph: that is right, lock is held only during download.

I am very curious what is that "custom" plugin...

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-07-09 Thread Daniel Johnson (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17864364#comment-17864364
 ] 

Daniel Johnson commented on MNG-7868:
-

I have seen this failure off and on with 3.9.7/3.9.8.  The only hint I have 
found, is that in my case when it happens, it seems the projects in the reactor 
that "hold" the locked artifact took longer than 30 seconds to build (i.e. mvn 
clean install).  


{code:java}
12:24:11.398 [main] [ERROR] java.lang.IllegalStateException: Could not acquire 
lock(s)
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Could 
not acquire lock(s)
    at java.util.concurrent.FutureTask.report (FutureTask.java:122)
    at java.util.concurrent.FutureTask.get (FutureTask.java:192)
    at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.multiThreadedProjectTaskSegmentBuild
 (MultiThreadedBuilder.java:140)
    at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.build
 (MultiThreadedBuilder.java:101)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:314)
Caused by: java.lang.IllegalStateException: Could not acquire lock(s)
    at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
 (NamedLockFactoryAdapter.java:219)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
(DefaultArtifactResolver.java:276)
    at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
(DefaultArtifactResolver.java:261)
    at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
(DefaultRepositorySystem.java:353)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve 
(DefaultProjectDependenciesResolver.java:184)
    at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies 
(LifecycleDependencyResolver.java:224)
    at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies
 (LifecycleDependencyResolver.java:136)
    at 
org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved 
(MojoExecutor.java:355)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:313)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
(MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
(MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute 
(DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:105)
    at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:193)
    at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:180)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:750)
    Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
read lock for 'artifact:aopalliance:aopalliance:1.0' in 30 SECONDS
        at 

[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852829#comment-17852829
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

It is a {{clean install}} call and the plugin goal being executed when the 
exception was thrown was `biz.aQute.bnd:bnd-testing-maven-plugin:7.0.0:testing` 
(see above).

The parallelization was triggered using {{-T 2}}

The {{sentencepiece}} and {{bar-api}} artifacts are downloaded from a local 
mirror repository. {{module-foo}}, {{module-bar}} are from the reactor.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852790#comment-17852790
 ] 

Tamas Cservenak commented on MNG-7868:
--

[~rec] can you tell me more about failed build?
 * what goal was you running
 * I assume you use "built in" parallel builder, so what was -T param
 * anything else that may be important? Like I also assume the two mentioned 
artifacts (sentencepiece and bar-api) are all external dependencies?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852786#comment-17852786
 ] 

Tamas Cservenak commented on MNG-7868:
--

Just realized something: Maven 3.9.7 carries fix for _file locking_ (see 
MRESOLVER-522), while Richard uses LocalReadWriteLockNamedLockFactory.

Which is okay, I just wanted to clear up this. Most probably we still have some 
issues and bugs lurking somewhere.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852783#comment-17852783
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

The bnd plugin version used here is 7.0.0.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852779#comment-17852779
 ] 

Tamas Cservenak commented on MNG-7868:
--

Need to take a peek what is happening in 
aQute.bnd.maven.lib.resolve.DependencyResolver... stay tuned.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852776#comment-17852776
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

{noformat}
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
biz.aQute.bnd:bnd-testing-maven-plugin:7.0.0:testing (osgi-test-execution) on 
project module-foo: Could not acquire lock(s)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
(MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
(MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
(MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute 
(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:105)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:193)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:833)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not acquire 
lock(s)
at aQute.bnd.maven.testing.plugin.TestingMojo.execute (TestingMojo.java:170)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
(MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
(MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
(MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute 
(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:105)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:193)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:833)
Caused by: java.lang.IllegalStateException: Could not acquire lock(s)
at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
 (NamedLockFactoryAdapter.java:219)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
(DefaultArtifactResolver.java:276)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
(DefaultArtifactResolver.java:261)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
(DefaultRepositorySystem.java:353)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve 
(DefaultProjectDependenciesResolver.java:182)
at aQute.bnd.maven.lib.resolve.DependencyResolver.resolve 
(DependencyResolver.java:226)
at aQute.bnd.maven.lib.resolve.DependencyResolver.getFileSetRepository 
(DependencyResolver.java:268)
at aQute.bnd.maven.lib.resolve.BndrunContainer.getFileSetRepository 
(BndrunContainer.java:260)
at aQute.bnd.maven.lib.resolve.BndrunContainer.getFileSetRepository 
(BndrunContainer.java:244)
at aQute.bnd.maven.lib.resolve.BndrunContainer.injectImplicitRepository 

[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852771#comment-17852771
 ] 

Tamas Cservenak commented on MNG-7868:
--

sentencepiece: can you tell what was the stack trace of this:

Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire write 
lock for 'artifact:ai.djl.sentencepiece:sentencepiece:0.26.0' in 30 SECONDS at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
 (NamedLockFactoryAdapter.java:202)

Basically what operation was resolver doing (that made it to acquire lock)?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-06 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852754#comment-17852754
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

[~cstamas] can you read anything useful from the information I have provided?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-05 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852366#comment-17852366
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

Well, that's the information I shared above, right? The lock times out on the 
`sentencepiece` and that is contended only by two separate modules. And that is 
also the only artifact that has a ref-count higher than 1.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-05 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852364#comment-17852364
 ] 

Tamas Cservenak commented on MNG-7868:
--

Thanks! Do not share it, but rather with information in there (ref counts, lock 
types and threads) and knowing your build structure, try to correlate and 
figure out is there "hot artifact" in your build. As I see this is quite bit 
one, with 1199 active locks.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-06-05 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17852352#comment-17852352
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

I have a dump of the lock factory, but I cannot share it in its entirety.

Here a few excerpts that are probably relevant

{noformat}
[INFO] Diagnostic dump of lock factory
[INFO] ===
[INFO] Implementation: 
org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory
[INFO] Active locks: 1199
...
[INFO] [INFO] Name: artifact:ai.djl.sentencepiece:sentencepiece:0.26.0
[INFO] RefCount: 1
[INFO]   Thread[mvn-builder-module-foo,5,main] -> [exclusive]
[INFO]   Thread[mvn-builder-module-bar,5,main] -> []
...
Caused by: java.lang.IllegalStateException: Could not acquire lock(s)
at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
 (NamedLockFactoryAdapter.java:219)
...
Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
write lock for 'artifact:ai.djl.sentencepiece:sentencepiece:0.26.0' in 30 
SECONDS
at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
 (NamedLockFactoryAdapter.java:202)
...
{noformat}

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-31 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851158#comment-17851158
 ] 

Tamas Cservenak commented on MNG-7868:
--

Can anyone grab a lock "diag" dump?

 

[https://maven.apache.org/resolver/maven-resolver-named-locks/index.html#diagnostic-collection-in-case-of-failures]

Warning: {_}system property{_}, not a Maven user property (so mvn -D will NOT 
do it, one needs MAVEN_OPTS or alike to have the System property set up on 
system boot).

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-31 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851148#comment-17851148
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

We here wo go:

{noformat}
Apache Maven 3.9.7 (8b094c9513efc1b9ce2d952b3b9c8eaedaf8cbf0)
Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: .../jdk-17.0.5+8

[ERROR] Could not acquire lock(s)
java.lang.IllegalStateException: Could not acquire lock(s)
at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
 (NamedLockFactoryAdapter.java:219)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
(DefaultArtifactResolver.java:276)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
(DefaultArtifactResolver.java:261)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
(DefaultRepositorySystem.java:353)
at 
org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal
 (DefaultPluginDependenciesResolver.java:219)
at 
org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve 
(DefaultPluginDependenciesResolver.java:165)
at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm 
(DefaultMavenPluginManager.java:377)
at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.lambda$setupPluginRealm$1
 (DefaultMavenPluginManager.java:340)
at org.apache.maven.plugin.DefaultPluginRealmCache.lambda$get$0 
(DefaultPluginRealmCache.java:156)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent 
(ConcurrentHashMap.java:1740)
at org.apache.maven.plugin.DefaultPluginRealmCache.get 
(DefaultPluginRealmCache.java:154)
at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm 
(DefaultMavenPluginManager.java:339)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm 
(DefaultBuildPluginManager.java:205)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:98)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
(MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
(MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
(MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute 
(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:105)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:193)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:833)
Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
read lock for 'artifact:commons-io:commons-io:2.15.1' in 30 SECONDS
at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
 (NamedLockFactoryAdapter.java:202)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
(DefaultArtifactResolver.java:276)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
(DefaultArtifactResolver.java:261)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
(DefaultRepositorySystem.java:353)
at 
org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal
 (DefaultPluginDependenciesResolver.java:219)
at 
org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve 
(DefaultPluginDependenciesResolver.java:165)
at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm 
(DefaultMavenPluginManager.java:377)
at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.lambda$setupPluginRealm$1
 (DefaultMavenPluginManager.java:340)
at org.apache.maven.plugin.DefaultPluginRealmCache.lambda$get$0 

[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-31 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851082#comment-17851082
 ] 

Slawomir Jaranowski commented on MNG-7868:
--

{quote}
Interesting, and failure happened only in the scope of mentioned plugin?
{quote}

 I don't know ... In {{1.18.x}} I have switched resolving artifacts from 
{{org.apache.maven.repository.RepositorySystem}} to {{Resolver API}}


> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-31 Thread Piotr Zygielo (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851069#comment-17851069
 ] 

Piotr Zygielo commented on MNG-7868:


{quote}Interesting, and failure happened only in the scope of mentioned plugin?
{quote}
This happened in GitHub workflow, in multi-module project, in run #1 (next 
re-run for the same sources was completed successfully), with two other modules 
(one Spring Boot) finished with success, and then two next XXX, YYY failing in 
{{pgpverify-maven-plugin:check}} only.
The project YYY uses {{m-shade-p}} (its upgrade to 3.6.0 caused CI to run) but 
{{pgpverify}} fired first and {{shade}} didn't participate in the build at this 
stage I believe.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-31 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851060#comment-17851060
 ] 

Tamas Cservenak commented on MNG-7868:
--

[~sjaranowski] ping

Interesting, and failure happened only in the scope of mentioned plugin?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-31 Thread Piotr Zygielo (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851036#comment-17851036
 ] 

Piotr Zygielo commented on MNG-7868:


{quote} All affected users: please upgrade to 3.9.7 and report back.
{quote}
I observed (once, no {{-e}} available, cannot reproduce so far) with maven 
3.9.7, java 21 (corretto), ubuntu, starting with empty repository used 
exclusively by the one maven execution (but with {{-T2C}}), following:
{code:java}
Error:  Failed to execute goal 
org.simplify4u.plugins:pgpverify-maven-plugin:1.18.1:check (default) on project 
XXX: Execution default of goal 
org.simplify4u.plugins:pgpverify-maven-plugin:1.18.1:check failed: Could not 
acquire lock(s) -> [Help 1]
Error:  Failed to execute goal 
org.simplify4u.plugins:pgpverify-maven-plugin:1.18.1:check (default) on project 
YYY: Execution default of goal 
org.simplify4u.plugins:pgpverify-maven-plugin:1.18.1:check failed: Could not 
acquire lock(s) -> [Help 1]
{code}

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-27 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849808#comment-17849808
 ] 

Tamas Cservenak commented on MNG-7868:
--

Am not knowledgeable about this specific plugin internals, but in general: no. 
When a plugin depends on something that is listed as "constituent" of Maven 
Core, classloader will use Maven Core classes and not plugin dependency 
specified ones.

Can you paste -e output? is it very same as with 3.9.6?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-27 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849772#comment-17849772
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

Is it possible that a plugin like {{bnd-testing-maven-plugin}} is still using 
an older version of the resolver plugin that does not have the fix, or should 
it automatically be using whatever resolver version Maven brings along?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-27 Thread Richard Eckart de Castilho (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849756#comment-17849756
 ] 

Richard Eckart de Castilho commented on MNG-7868:
-

I have switched Maven to 3.9.7 on Jenkins and commented out the workarounds and 
it still fails with the lock problem.

{noformat}
[ERROR] Failed to execute goal 
biz.aQute.bnd:bnd-testing-maven-plugin:7.0.0:testing (osgi-test-execution) on 
project XXX: Could not acquire lock(s) -> [Help 1]
{noformat}

When I re-activate the workarounds, it is more stable:

{noformat}
-Daether.connector.basic.threads=8 
-Daether.metadataResolver.threads=8 
-Daether.syncContext.named.time=120
-Daether.syncContext.named.factory=file-lock 
-Daether.syncContext.named.nameMapper=file-gav
{noformat}


> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-25 Thread Joe Witt (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849482#comment-17849482
 ] 

Joe Witt commented on MNG-7868:
---

Thanks for the bump on the thread with that info.  Moving 
[nifi|https://issues.apache.org/jira/browse/NIFI-13300] to 3.9.7.  initial 
findings are encouraging. Will reply with any trouble. 

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-05-25 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849476#comment-17849476
 ] 

Tamas Cservenak commented on MNG-7868:
--

All affected users: please upgrade to 3.9.7 and report back. The MRESOLVER-522 
should fix the problem of "hot artifacts".

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-04-10 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17835633#comment-17835633
 ] 

Tamas Cservenak commented on MNG-7868:
--

Yes, most probably will get fixed, the contender is 
https://issues.apache.org/jira/browse/MRESOLVER-522 where these "hot artifacts" 
(logback-classic, etc) are "oversleeping" the time window, and hence throwing 
"could not acquire lock..." errors.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-04-10 Thread Nan Ni (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17835631#comment-17835631
 ] 

Nan Ni commented on MNG-7868:
-

I frequently encounter lock acquisition issues on my CI system (Linux), 
particularly when the local Maven repository starts empty (when the workspace 
is not reused). The problem is easily replicable in my local environment 
(macOS), with a high likelihood of occurring. It appears that the problem 
predominantly affects frequently used artifacts, such as "logback-classic" and 
similar high-demand dependencies. Will this problem be fixed in the later 3.9.x 
version?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: image-2024-04-10-15-44-37-013.png, screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-02-16 Thread Artur Linhart (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17818128#comment-17818128
 ] 

Artur Linhart commented on MNG-7868:


This issue is not limited to Windows, on Debian Linux it occurs too - in our 
case as well on local stations, as in Jenkins.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2024-02-15 Thread Pino Silvaggio (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17817836#comment-17817836
 ] 

Pino Silvaggio commented on MNG-7868:
-

I have this error, since bumping to 3.9.3
and it's under linux...

 !screenshot-1.png! 

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
> Attachments: screenshot-1.png
>
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-11-22 Thread Steve Loughran (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17788731#comment-17788731
 ] 

Steve Loughran commented on MNG-7868:
-

ooh, this has started for me too, macos, 

{code}
 mvn --version
Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
Maven home: /opt/homebrew/Cellar/maven/3.9.2/libexec

{code}

let me do a homebrew update, resolver update and if no joy, do the diagnostics 
here

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-10-28 Thread Joe Witt (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780647#comment-17780647
 ] 

Joe Witt commented on MNG-7868:
---

but of course this time it ran beautifully.  Oh boy

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-10-28 Thread Joe Witt (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780646#comment-17780646
 ] 

Joe Witt commented on MNG-7868:
---

I see.  Since we're not generally specifying such things I'd like to see if I 
can capture this kind of output while running as we normally would.  So for now 
i'm going to give the following a go and hopefully the problem happens.


{noformat}
mvn -T 1.0C clean install -Pcontrib-check \
-Dorg.slf4j.simpleLogger.showThreadName=true 
-Dorg.slf4j.simpleLogger.showDateTime=true \
-Dorg.slf4j.simpleLogger.log.org.eclipse.aether=trace -l 
~/Downloads/mavenbuild.log
{noformat}


> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-10-28 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780645#comment-17780645
 ] 

Tamas Cservenak commented on MNG-7868:
--

Yup. mvn by default uses rwlock-local/gav, while mvnd by default 
file-lock/file-gav.

You could place those many options into {{.mvn/maven.confg}} (each -D on new 
line), so need for that long cmd line.

The locks diag _requires Java System Property_, so not {{-D}} (maven user 
property), so that one needs to go into {{.mvn/jvm.config}} or {{MAVEN_OPTS}}!

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-10-28 Thread Joe Witt (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780644#comment-17780644
 ] 

Joe Witt commented on MNG-7868:
---

Certainly can try.  I'm using a build string such as

mvn -T 1.0C clean install -Pcontrib-check \
-Dorg.slf4j.simpleLogger.showThreadName=true 
-Dorg.slf4j.simpleLogger.showDateTime=true \
-Dorg.slf4j.simpleLogger.log.org.eclipse.aether=trace -l 
~/Downloads/file-lock-file-gav-build.log \
-Daether.connector.basic.threads=8 -Daether.metadataResolver.threads=8 \
-Daether.syncContext.named.time=120 \
-Daether.syncContext.named.factory=file-lock 
-Daether.syncContext.named.nameMapper=file-gav

Wasn't clear to me which factory or name mapper I had been using so I am 
guessing here with 'file-lock' and 'file-gav' respectively.  

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-10-28 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780643#comment-17780643
 ] 

Tamas Cservenak commented on MNG-7868:
--

[~joewitt] If you can "afford" (unsure how big the build is) to run build with 
turned on [lock 
diag|https://issues.apache.org/jira/browse/MNG-7868?focusedCommentId=17761829=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17761829]
 as I still have no feedback from anyone about "hot artifacts", so it is still 
just a theory... (afford= as it increases heap use)

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-10-28 Thread Joe Witt (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780638#comment-17780638
 ] 

Joe Witt commented on MNG-7868:
---

Hello.  We in Apache NiFi run into this very same issue quite frequently and we 
certainly have hot artifacts used all over the place and we very much are 
multi-module.  I see this on OSX (quite often).  

FWIW I just added 

-Daether.connector.basic.threads=8 -Daether.metadataResolver.threads=8
-Daether.syncContext.named.time=120

To my normal build string and indeed this time it ran clean.

I will say this issue happens sometimes more than others.  I've gone days 
without seeing it then today it happened two builds in a row.

Thanks

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-25 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768766#comment-17768766
 ] 

Tamas Cservenak commented on MNG-7868:
--

Maven:

{{$LOCK_FACTORY=rwlock-local}}

{{$NAME_MAPPER=gav}}

 

is the default in maven. Warning! Mvnd does OVERRIDE Maven defaults, it uses 
{{file-lock}} and {{{}file-gav{}}}, see 
https://github.com/apache/maven-mvnd/blob/15d622e18546b64593a49f9da9b372f237da1fb6/daemon/src/main/java/org/mvndaemon/mvnd/syncontext/DaemonNamedLockFactoryAdapterFactoryImpl.java#L48

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-25 Thread Jira


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768759#comment-17768759
 ] 

Jörg Hohwiller commented on MNG-7868:
-

For the record: I did not entirely forget this issue.
Actually I did follow the instructions 
(https://maven.apache.org/resolver/maven-resolver-named-locks/analyzing-lock-issues.html)
 and created an according script:
{code}
#!/bin/bash
build=1
LOCK_FACTORY="file-lock"
NAME_MAPPER="file-gav"
LOCAL_REPO=$M2_REPO
$MAVEN_HOME/bin/mvn clean compile -T1C -B -DskipTests 
-Dmaven.repo.local=$LOCAL_REPO \
-Dorg.slf4j.simpleLogger.showThreadName=true 
-Dorg.slf4j.simpleLogger.showDateTime=true \
-Dorg.slf4j.simpleLogger.log.org.eclipse.aether=trace -l 
$LOCK_FACTORY-$NAME_MAPPER-$build.log \
-Daether.connector.basic.threads=8 -Daether.metadataResolver.threads=8 \
-Daether.syncContext.named.time=120 \
-Daether.syncContext.named.factory=$LOCK_FACTORY 
-Daether.syncContext.named.nameMapper=$NAME_MAPPER; \
{code}
However, with that I was unable to reproduce the problem.
Can someone shed a light what options I should use for {{LOCK_FACTORY}} and 
{{NAME_MAPPER}} to emulate the default behavior of maven so I can reproduce the 
error with the detailed logging? I was already puzzled enough from your website 
instructions to figure out any working options for these parameters. The 
documentation might be clear for maven core developers but not for maven users 
without further insights.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-07 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17762653#comment-17762653
 ] 

Tamas Cservenak commented on MNG-7868:
--

And finally one more remark: IF my theory of "hot artifacts" is right, with 
"properly big (or having some attributes like layout or something am not aware 
yet)" project should always manifest, unrelated to lock implementation used (so 
it should happen with JVM-local locking, file locking but also 
Hazelcast/Redisson). This is somewhat confirmed on the mvnd issue.

I have to add, and was stated on mvnd issue, that Windows FS locking most 
probably just adds another layer of "uncertainty", so IMHO use of WinFS is NOT 
a prerequisite for this bug, but it may just exacerbate it.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-07 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17762630#comment-17762630
 ] 

Tamas Cservenak commented on MNG-7868:
--

Ideas to try IF "hot artifacts" theory proves right:
For example assume that there is a big multi module build where each module 
depend on slf4j-api (HOW it depends does not matter, inherited from parent POM, 
directly refd + depMgt, etc, all that matters that effective POM of each module 
contains direct dependency on slf4j-api).

1. Refactor the build in following way (very simplified, but only to get the 
idea, the goal is really to "prime" local repo and let all the modules enter 
the "happy path"): 
* introduce new module in reactor like "common-libs", make that one module 
depend on slf4j-api, and all the existing module depend on common-libs instead 
of slf4j-api directly. This will cause following:
* all existing modules will be scheduled by smart build AFTER common-libs is 
built
* common-libs will possibly use exclusive lock to get slf4j-api, while all the 
others modules will end up on "happy path" (shared lock, as local repo is 
primed)

2. OR Resolver code change to reduce the "coarseness" of SyncContext (currently 
it causes exclusion for each resolution, ie. both context may resolve 10 
artifacts with only one overlapping -- the "hot" one), but this is not gonna 
happen in Maven 3.x/Resolver 1.x timeframe, but most probably in Resolver 2.x 
that is to be picked up by Maven 4.x.
 

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-07 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17762628#comment-17762628
 ] 

Michael Osipov commented on MNG-7868:
-

Please note: 
https://maven.apache.org/resolver/maven-resolver-named-locks/analyzing-lock-issues.html

With that you can simply query how long a hot artifact has been locked. I bet 
it is simply not a bug here, but high request count, or lock starvation.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-07 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17762618#comment-17762618
 ] 

Tamas Cservenak commented on MNG-7868:
--

As mentioned on linked mvnd GH issue:
* my suspicion is about "hot artifacts" (commonly used libraries across MANY 
modules, typical examples are slf4j-api or alike ones)
* lock dump (emitted if lock diag enabled AND error like you reported happens) 
will make us able to either prove my "hot artifacts" theory, OR totally dismiss 
it (and then look somewhere else).

To interpret lock diag dump, project knowledge is needed (as it is very low 
level, will emit lock names with refs and acquired locksteps), as locks names 
(hopefully file-gav mapper used, not file-hgav that obfuscates/sha1 locks 
names) will contain {{G~A~V}} strings, and it is the project owner (and not me) 
who is be able to identify "in-reactor" and "external dep" artifacts from it...

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-07 Thread Jira


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17762590#comment-17762590
 ] 

Jörg Hohwiller commented on MNG-7868:
-

[~cstamas] thanks for your quick response and your suggestions!

> And one more strange thing: your stack trace does not align properly with 
> Resolver 1.9.14 that is used in Maven 3.9.4, or do I miss something here?

You are right:

[https://github.com/apache/maven-resolver/blob/4605205db7d1a3f47f8e477cec08a699b7f5ac16/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/NamedLockFactoryAdapter.java#L219]

Actually I was doing a lot of different tests and collected logs and 
errors/exceptions. In order to report the issue, I updated to the latest maven 
version and reproduced the error again. However, the stacktrace was from a 
previous test (most probably with maven 3.8.6).

I will enable diagnostic feature and follow your suggestions trying to 
reproduce the error.

What I can already say is that I can also reproduce the error when local repo 
is populated. But I will double-check.

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-04 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17761829#comment-17761829
 ] 

Tamas Cservenak commented on MNG-7868:
--

And one more thing: 
https://maven.apache.org/resolver/maven-resolver-named-locks/index.html#diagnostic-collection-in-case-of-failures
And on failure please post the diag output here (be aware, that especially 
with big builds, diag will increase heap requirement, so you will need to 
experiment maybe)

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-04 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17761782#comment-17761782
 ] 

Tamas Cservenak commented on MNG-7868:
--

And one more strange thing: your stack trace does not align properly with 
Resolver 1.9.14 that is used in Maven 3.9.4, or do I miss something here?

For ref: 1.9.14 DefaultArtifactResolver
https://github.com/apache/maven-resolver/blob/maven-resolver-1.9.14/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultArtifactResolver.java#L259



> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-04 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17761778#comment-17761778
 ] 

Tamas Cservenak commented on MNG-7868:
--

As experiment, could you do an experiment? 
- do a clean checkout somewhere
- use empty (non existed) local repository
- do the build on 1 thread to make local repo populated
- repeat the build in MT mode

Of course, not needed, if you do see same errors on prepopulated local 
repositories...

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7868) "Could not acquire lock(s)" error in concurrent maven builds

2023-09-04 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17761777#comment-17761777
 ] 

Tamas Cservenak commented on MNG-7868:
--

Do you see some correlation of this bug and state of local repository (ie. 
empty, or fully populated, so no download happens)?

> "Could not acquire lock(s)" error in concurrent maven builds
> 
>
> Key: MNG-7868
> URL: https://issues.apache.org/jira/browse/MNG-7868
> Project: Maven
>  Issue Type: Bug
> Environment: windows, maven 3.9.4
>Reporter: Jörg Hohwiller
>Priority: Major
>
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) 
> on project foo.bar: Execution default-install of goal 
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not 
> acquire lock(s) -> [Help 1]
> {code}
> I am using maven 3.9.4 on windows:
> {code}
> $ mvn -v
> Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
> Maven home: D:\projects\test\software\mvn
> Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: 
> D:\projects\test\software\java
> Default locale: en_US, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
> I searched for this bug and found issues like MRESOLVER-332 that first look 
> identical or similar but do not really seem to be related so I decided to 
> create this issue.
> For this bug I made the following observations:
> * it only happens with concurrent builds: {{mvn -T ...}}
> * is seems to be windows related (at least mainly happens on windows)
> * it is in-deterministic and is not so easy to create an isolated and simple 
> project and a reproducible scenario that always results in this error. 
> However, I get this very often in my current project with many modules (500+).
> * it is not specific to the maven-install-plugin and also happens from other 
> spots in maven:
> I also got this stacktrace:
> {code}
> Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire 
> write lock for 
> 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock'
>  in 30 SECONDS
> at 
> org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire
>  (NamedLockFactoryAdapter.java:202)
> at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve 
> (DefaultArtifactResolver.java:271)
> at 
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts 
> (DefaultArtifactResolver.java:259)
> at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies 
> (DefaultRepositorySystem.java:352)
> {code}
> See also this related discussion:
> https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377



--
This message was sent by Atlassian Jira
(v8.20.10#820010)