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

gdb process info included in hang analyzer output

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Tooling & Methods
    • ALL
    • 2

      In a recent patch build, I noticed that the hang analyzer included the backtraces for the gdb process in the generated archive:

      debugger_gdb.log
      debugger_gdb_21307.log
      debugger_gdb_21307_raw_stacks.log
      debugger_mongo.log
      debugger_mongod.log
      debugger_mongod_8100.log
      debugger_mongod_8100_raw_stacks.log
      debugger_mongod_8221.log
      debugger_mongod_8221_raw_stacks.log
      ...
      

      Our custom GDB commands called by the hang analyzer generally assume that the target process is a

      {mongo}

      binary - this results in Python errors logged in the

      {debugger_gdb_N.log}

      files:

      Running Hang Analyzer Supplement - MongoDBDumpLocks
      Not invoking mongod lock dump for: gdb
      Not generating the digraph, since the lock graph is empty
      Running Print JavaScript Stack Supplement
      No JavaScript stack print done for: gdb
      Traceback (most recent call last):
        File "buildscripts/gdb/mongo.py", line 305, in invoke
          session_catalog = get_session_catalog()
        File "buildscripts/gdb/mongo.py", line 91, in get_session_catalog
          session_catalog_dec = get_decoration(get_global_service_context(), "mongo::SessionCatalog")
        File "buildscripts/gdb/mongo.py", line 82, in get_global_service_context
          return gdb.parse_and_eval("'mongo::(anonymous namespace)::globalServiceContext'").dereference()
      gdb.error: No symbol "mongo::(anonymous namespace)::globalServiceContext" in current context.
      Error occurred in Python: No symbol "mongo::(anonymous namespace)::globalServiceContext" in current context.
      Dumping mutex info for all Clients
      Traceback (most recent call last):
        File "buildscripts/gdb/mongo.py", line 408, in invoke
          service_context = get_global_service_context()
        File "buildscripts/gdb/mongo.py", line 82, in get_global_service_context
          return gdb.parse_and_eval("'mongo::(anonymous namespace)::globalServiceContext'").dereference()
      gdb.error: No symbol "mongo::(anonymous namespace)::globalServiceContext" in current context.
      Error occurred in Python: No symbol "mongo::(anonymous namespace)::globalServiceContext" in current context.
      Dumping recovery unit info for all clients and sessions
      Not invoking mongod recovery unit dump for: gdb
      

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: