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

BlobStoreManagerImpl is not thread-safe

Details

    • 1
    • Sprint 91

    Description

      The BlobStoreManagerImpl uses a simple HashMap for its stores member which isn't properly protected from concurrent access:

      1. Fire NX3 up with a debugger
      2. Set a breakpoint in BlobStoreManagerImpl.track() (https://github.com/sonatype/nexus-internal/blob/525334ca25c2463544b12dd49aa54ef55ee2a703/components/nexus-core/src/main/java/org/sonatype/nexus/internal/blobstore/BlobStoreManagerImpl.java#L207)
      3. In one browser tab, create a new blob store
      4. Observe breakpoint gets hit, leave thread suspended at it
      5. In another browser tab, create another blob store
      6. Observe breakpoint gets hit again, i.e. a concurrent thread attempts to modify the stores

      Attachments

        Activity

          People

            fmilens Frederick Milens [X] (Inactive)
            bentmann Benjamin Bentmann
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              tigCommentSecurity.panel-title