Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-20537

Deadlock when two snapshots of the same artifact are deployed at the same time

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 6.13.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      One of our developers committed to his feature branch whilst merging into the delivery branch. This led to two builds being executed simultaneously by Jenkins, one a fraction of a second after the other, with the same version. Artifactory returned an internal server error and failed one of the builds:

      2019-11-06 13:50:38,773 [http-nio-8081-exec-881] [INFO ] (o.a.e.UploadServiceImpl:399) - Deploy to 'libs-snapshot:com/sysmech/zen/blah/blah/1.0.0-SNAPSHOT/blah-1.0.0-20191106.135040-12.jar' Content-Length: 193949
      2019-11-06 13:50:59,669 [http-nio-8081-exec-885] [ERROR] (o.a.r.d.DbStoringRepoMixin:290) - Couldn't save resource libs-snapshot:com/sysmech/zen/blah/blah/1.0.0-SNAPSHOT/blah/x.y.z-20191106.135039-12.jar, reason:
      java.lang.reflect.UndeclaredThrowableException: null
          at com.sun.proxy.$Proxy75.next(Unknown Source)
          at org.artifactory.storage.db.fs.dao.NodesDao.getChildren(NodesDao.java:250)
          at org.artifactory.storage.db.fs.service.FileServiceImpl.loadChildren(FileServiceImpl.java:272)
          at org.artifactory.storage.fs.tree.FolderNode.getChildrenItemNode(FolderNode.java:74)
          at org.artifactory.storage.fs.tree.FolderNode.getChildren(FolderNode.java:56)
          at org.artifactory.maven.MavenMetadataCalculator.folderContainsPoms(MavenMetadataCalculator.java:422)
          at org.artifactory.maven.MavenMetadataCalculator.createSnapshotsMetadata(MavenMetadataCalculator.java:210)
          at org.artifactory.maven.MavenMetadataCalculator.calculateAndSet(MavenMetadataCalculator.java:179)
          at org.artifactory.maven.MavenMetadataCalculator.calculate(MavenMetadataCalculator.java:154)
          at org.artifactory.maven.MavenMetadataServiceImpl.calculateMavenMetadata(MavenMetadataServiceImpl.java:81)
          at sun.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
          at com.sun.proxy.$Proxy179.calculateMavenMetadata(Unknown Source)
          at org.artifactory.repo.interceptor.MavenMetadataCalculationInterceptor.afterCreate(MavenMetadataCalculationInterceptor.java:73)
          at org.artifactory.repo.interceptor.storage.StorageInterceptorsImpl.afterCreate(StorageInterceptorsImpl.java:69)
          at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
          at com.sun.proxy.$Proxy184.afterCreate(Unknown Source)
          at org.artifactory.repo.db.DbStoringRepoMixin.invokeAfterCreateInterceptors(DbStoringRepoMixin.java:405)
          at org.artifactory.repo.db.DbStoringRepoMixin.saveResource(DbStoringRepoMixin.java:244)
          at org.artifactory.repo.db.DbLocalRepo.saveResource(DbLocalRepo.java:154)
          at org.artifactory.repo.service.RepositoryServiceImpl.saveResourceInTransaction(RepositoryServiceImpl.java:1876)
          at sun.reflect.GeneratedMethodAccessor446.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
          at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
          at com.sun.proxy.$Proxy178.saveResourceInTransaction(Unknown Source)
          at org.artifactory.repo.service.RepositoryServiceImpl.saveResource(RepositoryServiceImpl.java:1864)
          at sun.reflect.GeneratedMethodAccessor448.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
          at com.sun.proxy.$Proxy178.saveResource(Unknown Source)
          at org.artifactory.engine.UploadServiceImpl.uploadItemWithContent(UploadServiceImpl.java:569)
          at org.artifactory.engine.UploadServiceImpl.uploadItemWithProvidedContent(UploadServiceImpl.java:552)
          at org.artifactory.engine.UploadServiceImpl.uploadItem(UploadServiceImpl.java:429)
          at org.artifactory.engine.UploadServiceImpl.uploadFile(UploadServiceImpl.java:419)
          at org.artifactory.engine.UploadServiceImpl.uploadArtifact(UploadServiceImpl.java:400)
          at org.artifactory.engine.UploadServiceImpl.adjustResponseAndUpload(UploadServiceImpl.java:221)
          at org.artifactory.engine.UploadServiceImpl.validateRequestAndUpload(UploadServiceImpl.java:187)
          at org.artifactory.engine.UploadServiceImpl.upload(UploadServiceImpl.java:130)
          at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
          at org.artifactory.request.aop.RequestAdvice.invoke(RequestAdvice.java:67)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
          at com.sun.proxy.$Proxy200.upload(Unknown Source)
          at org.artifactory.webapp.servlet.RepoFilter.doUpload(RepoFilter.java:254)
          at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:172)
          at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:97)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.lambda$doFilter$1(ArtifactoryAuthenticationFilterChain.java:134)
          at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
          at org.artifactory.webapp.servlet.authentication.ArtifactoryBasicAuthenticationFilter.doFilter(ArtifactoryBasicAuthenticationFilter.java:96)
          at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.doFilter(ArtifactoryAuthenticationFilterChain.java:170)
          at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:311)
          at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:208)
          at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:167)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:77)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.artifactory.webapp.servlet.ArtifactoryCsrfFilter.doFilter(ArtifactoryCsrfFilter.java:86)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164)
          at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
          at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:124)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
          at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:304)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
          at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
          at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
          at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
          at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException: null
          at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.jfrog.storage.wrapper.ResultSetWrapper.invoke(ResultSetWrapper.java:77)
          ... 110 common frames omitted

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              josh.watson Josh Watson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: