The CurOp constructor should initialize its variables prior to being added to the stack of active CurOp objects

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Diagnostics
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-12-14
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      See: https://github.com/mongodb/mongo/blob/f10e0ad7caf897b6444580d618e4a1e1577793d3/src/mongo/db/curop.cpp#L356-L371

      On L356, we call the constructor on L363 to add the CurOp object onto the stack of active CurOp objects before initializing its _lockStatsBase member variable.

      This is problematic as it makes the CurOp object available for external use before being fully initialized. For example, the currentOp command tries to access _lockStatsBase for all active CurOp objects.

            Assignee:
            Gregory Wlodarek
            Reporter:
            Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: