Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37261

CurrentOp shouldn't read OpCtx decorations

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.6
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2018-10-22, Repl 2018-11-05, Repl 2018-11-19
    • 2

      The currentOp command loops over all Clients, and for any that have an associated OpCtx and OperationContextSession it reads the ReadConcernArgs decoration off the OpCtx. This isn't valid as there's no synchronization around writing to the decoration other than that it can only happen from the thread running the OpCtx.
      This means that there's a data race when reading the ReadConcernArgs decoration as it could be modified by the thread running the OpCtx while it is being read by currentOp.

            Assignee:
            vesselina.ratcheva@mongodb.com Vesselina Ratcheva (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: