Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-24151

Race condition in HA-C when pom and sha1 requests for proxy repo go to different nodes

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.22.1
    • Fix Version/s: None
    • Component/s: HA, Maven
    • Labels:
      None
    • Notability:
      3

      Description

      There is a race condition in Maven proxy repositories when running in HA.  

      1. Start with a proxy repository of maven central that has no content
      2. Request both a pom file and the pom's sha1 through different nodes in an HA cluster at the same time
      3. This will sometimes result in the following error shown below.

      The reason for this is that we proactively download the sha1 file along with the pom. So you end up with both the request for the pom and the request for the sha1 attempting to fetch the same file at the same time.

       

      2020-06-05 00:21:28,495+0000 ERROR [qtp1520110420-39637] *UNKNOWN org.sonatype.nexus.blobstore.file.FileBlobStore - No file to delete found at /nexus-data/blobs/default/content/vol-25/chap-28/d2ed840e-3f19-4e9b-9306-c9fbb59c182f.bytes
      java.io.FileNotFoundException: /nexus-data/blobs/default/content/vol-25/chap-28/d2ed840e-3f19-4e9b-9306-c9fbb59c182f.bytes
      at org.sonatype.nexus.blobstore.file.FileBlobStore.delete(FileBlobStore.java:654)
      at org.sonatype.nexus.blobstore.file.FileBlobStore.doDeleteHard(FileBlobStore.java:507)
      at org.sonatype.nexus.blobstore.BlobStoreSupport.deleteHard(BlobStoreSupport.java:210)
      at org.sonatype.nexus.blobstore.file.FileBlobStore$$EnhancerByGuice$$1efe84e6.CGLIB$deleteHard$34(<generated>)
      at org.sonatype.nexus.blobstore.file.FileBlobStore$$EnhancerByGuice$$1efe84e6$$FastClassByGuice$$159ee318.invoke(<generated>)
      at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
      at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
      at org.sonatype.nexus.blobstore.file.FileBlobStore$$EnhancerByGuice$$1efe84e6.deleteHard(<generated>)
      at org.sonatype.nexus.blobstore.file.FileBlobStore.doDelete(FileBlobStore.java:469)
      at org.sonatype.nexus.blobstore.BlobStoreSupport.delete(BlobStoreSupport.java:148)
      at org.sonatype.nexus.blobstore.file.FileBlobStore$$EnhancerByGuice$$1efe84e6.CGLIB$delete$43(<generated>)
      at org.sonatype.nexus.blobstore.file.FileBlobStore$$EnhancerByGuice$$1efe84e6$$FastClassByGuice$$159ee318.invoke(<generated>)
      at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
      at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
      at org.sonatype.nexus.blobstore.file.FileBlobStore$$EnhancerByGuice$$1efe84e6.delete(<generated>)
      at org.sonatype.nexus.repository.storage.BlobTx.commit(BlobTx.java:174)
      at org.sonatype.nexus.repository.storage.StorageTxImpl.commit(StorageTxImpl.java:180)
      at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
      at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
      at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:66)
      at com.sun.proxy.$Proxy221.commit(Unknown Source)
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:68)
      at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
      at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl$$EnhancerByGuice$$6a301de2.doPut(<generated>)
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.put(MavenFacetImpl.java:303)
      at org.sonatype.nexus.repository.maven.internal.proxy.MavenProxyFacet.store(MavenProxyFacet.java:89)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.doGet(ProxyFacetSupport.java:271)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.lambda$1(ProxyFacetSupport.java:245)
      at org.sonatype.nexus.common.io.CooperatingFuture.performCall(CooperatingFuture.java:122)
      at com.sonatype.nexus.hazelcast.internal.io.DistributedCooperatingFuture.performCall(DistributedCooperatingFuture.java:50)
      at org.sonatype.nexus.common.io.CooperatingFuture.call(CooperatingFuture.java:64)
      at org.sonatype.nexus.common.io.ScopedCooperationFactorySupport$ScopedCooperation.cooperate(ScopedCooperationFactorySupport.java:99)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:236)

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Rich Seddon Rich Seddon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title