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

remove globalLockManager wrapper for debugger scripts

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

      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@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: