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

BlobStoreManagerImpl is not thread-safe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.3.0
    • Component/s: Blobstore
    • Labels:
    • Story Points:
      1
    • Sprint:
      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

            Assignee:
            fmilens Frederick Milens
            Reporter:
            bentmann Benjamin Bentmann
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title