Interesting.

You did not provide any stack, so I just guessed "timeout". For
increasing/decreasing "wait time" (def is 30 sec), see here:
https://maven.apache.org/resolver/configuration.html
Look for "aether.syncContext.named.time" and
"aether.syncContext.named.time.unit".
Also good to look at:
https://maven.apache.org/resolver/maven-resolver-named-locks/index.html

And finally, there are redisson and hazelcast provided locks:
https://maven.apache.org/resolver/maven-resolver-named-locks-redisson/index.html

Also, "So I guess it is using the default file-lock?" -- Maven 3.9.1 does
NOT use file locking by default, so unless the docker image you use, or
whatever sets it up....
It would be good to see some stack and what locking is in use.

Note: if it turns out you don't use file locking, but the default (Maven
3.9.1 by default uses in-jvm "rwlock-local" (backed by ReadWriteLock), then
really just increase time....

How about concurrency, I guess this is not a single threaded build?

T

PS: Is late here, my response to your response will probably come in my
morning

On Wed, Mar 22, 2023 at 11:08 PM Dan Tran <dant...@gmail.com> wrote:

> Thanks for the quick response
>
> This is a simple switch from 3.8.7 to 3.9.1 ( did not see this issue when
> tested with  3.9.0). So I guess it is using the default file-lock?
>
> The build runs inside a docker container on Jenkins agent with no antivirus
> checker. The build always starts from scratch
>
> artifact:ch.qos.logback:logback-classic:1.2.10  is common artifact
> used by all components
>
>
> How do I increase timeout?
>
>
> Thanks
>
>
> -D
>
>
> On Wed, Mar 22, 2023 at 11:44 AM Tamás Cservenák <ta...@cservenak.net>
> wrote:
>
> > Howdy Dan,
> >
> > You did not mention what locking implementation you use, what params etc?
> > file-lock? redisson? something else?
> >
> > At the same time, it is rather strange that you mention "at the same
> > artifact" thing... from here and below I will assume you use file locks:
> > - can you do something like lsof on Linux? Meaning, can you ensure
> nothing
> > (some app, IDE or antivirus) is keeping the file open?
> > - can you tell a bit more about that artifact? Is it installed one? Maybe
> > from the current build? A dependency? In case of HUGE build and COMMON
> > artifact (ie. slf4j-api) that is used in almost all modules may be "hot",
> > maybe try to increase lock timeout? Or even radically lessen (that should
> > make problem occur more often perhaps)
> >
> > HTH
> > Tamas
> >
> > On Wed, Mar 22, 2023 at 7:32 PM Dan Tran <dant...@gmail.com> wrote:
> >
> > > Hi
> > >
> > > My large 400+ modules build facing the mentioned locking issue
> > consistently
> > > at the same artifact
> > >
> > > artifact:ch.qos.logback:logback-classic:1.2.10
> > >
> > >
> > > any one see this issue at your build?
> > >
> > >
> > > Thanks
> > >
> > >
> > > -D
> > >
> > >
> > > dont see same issue at smaller build
> > >
> >
>

Reply via email to