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

Uploading the same image concurrently will cause locking exceptions and HTTP 500s

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: 4.15.0
    • Fix Version/s: None
    • Component/s: Docker
    • Labels:
      None

      Description

      Uploading the same image concurrently will cause locking exceptions and HTTP 500s. This will cause at least one of the concurrent pushes to fail (all may fail as well) and hang DB connections for the timeout/lock period.

      To reproduce

      1. Create an Artifactory instance with Docker
      2. Tag an image that will be pushed to Artifactory
      3. Write a script that will push the image simultaneously (at least 3)
      4. Run the script and notice the artifatory.log error and the client failures (time dependent so may need to delete uploaded image, remove from trash and re-run script.)

      In addition to the client failure, which could be considered okay, there could be leftover files and a general failure to clean up properly.

      Sample Script

      #!/bin/sh                                                                                                                                                                                    
      docker push localhost/nginx > 1.out 2> 1.err &
      docker push localhost/nginx > 2.txt 2> 2.err &
      docker push localhost/nginx > 3.txt 2> 3.err &
      

      Artifactory error/s

      2017-01-05 20:46:58,020 [http-nio-8081-exec-7] [ERROR] (o.j.r.d.v.r.h.DockerV2LocalRepoHandler:291) - Error uploading manifest: 'Lock on LockEntryId docker-local:nginx/_uploads/sha256__0d409d33b27e47423b049f7f863faa08655a8c901749c2b25b93ca67d01a470d not acquired in 120 seconds. Lock info: org.artifactory.addon.ha.provider.HaMapLockWrapper@3e10bcdc.'
      ....
      2017-01-05 20:46:58,027 [http-nio-8081-exec-3] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:48) - Lock on LockEntryId docker-local:nginx/_uploads/sha256__0d409d33b27e47423b049f7f863faa08655a8c901749c2b25b93ca67d01a470d not acquired in 120 seconds. Lock info: org.artifactory.addon.ha.provider.HaMapLockWrapper@5569081c.
      org.artifactory.concurrent.LockingException: Lock on LockEntryId docker-local:nginx/_uploads/sha256__0d409d33b27e47423b049f7f863faa08655a8c901749c2b25b93ca67d01a470d not acquired in 120 seconds. Lock info: org.artifactory.addon.ha.provider.HaMapLockWrapper@5569081c.
      ....
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                arturoa Arturo Aparicio
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: