remove globalLockManager wrapper for debugger scripts

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2021-07-26
    • 29
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-52516, the global lock manager was converted to a decoration on the service context. However, our gdb and lldb debugger scripts were still referencing the 'globalLockManager' variable in the anonymous namespace. Subsequently, a wrapper class and instance was introduced to provide backwards compatibility. Unfortunately, the wrapper instance, without any explicit references to it in the LockState code, is susceptible to being optimized out by the compiler. This leads to errors in the hang analyzer output trying to access the lock manager:

      Ignoring error 'Can't take address of "mongo::(anonymous namespace)::globalLockManager" which isn't an lvalue.' in dump_mongod_locks
      

      Since the debugger scripts are intended for internal diagnostic purposes, we should remove the existing indirection and update these scripts to access the lock manager through the getGlobalLockManager() function.

            Assignee:
            Benety Goh
            Reporter:
            Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: