[SERVER-58278] remove globalLockManager wrapper for debugger scripts Created: 06/Jul/21  Updated: 29/Oct/23  Resolved: 13/Jul/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-56019 timeseries_index.js hangs in burn_in_... Closed
is related to SERVER-52516 Make LockManager a ServiceContext dec... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-07-26
Participants:
Linked BF Score: 29

 Description   

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.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 12/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58278 remove wrapper for global lock manager used by debugger scripts
Branch: master
https://github.com/mongodb/mongo/commit/637b6a732067e8a8fc14c212e5178908626ab861

Comment by Githook User [ 11/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: Revert "SERVER-58278 remove wrapper for global lock manager used by debugger scripts"

This reverts commit 77ecd0e27d32a956e19d412de667acb9c252be4d.
Branch: master
https://github.com/mongodb/mongo/commit/313e446b509d0250f8402344f4fa0df6986df104

Comment by Githook User [ 11/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58278 remove wrapper for global lock manager used by debugger scripts
Branch: master
https://github.com/mongodb/mongo/commit/77ecd0e27d32a956e19d412de667acb9c252be4d

Comment by Githook User [ 10/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58278 update lldb hang analyzer call to global lock manager
Branch: master
https://github.com/mongodb/mongo/commit/b7f62d2b00bbe98f8bddc9a3a02e7f97adf4ff21

Comment by Githook User [ 09/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58278 update gdb hang analyzer call to global lock manager
Branch: master
https://github.com/mongodb/mongo/commit/e40e2c6027f56f971c854fa1de55570b2c8ee18a

Generated at Thu Feb 08 05:44:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.