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

add thread name to hang analyzer output

    • Fully Compatible
    • TIG 2018-04-09, TIG 2018-04-23
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It would be nice to include the thread name (present in the gdb stack traces) in the "MongoDB Lock" and cycle detection output of the hang analysis report.

      Example from BF-8399:

      Thread 79: "conn1559" (Thread 0x3ff397ff910 (LWP 35992))
      #0  0x000003ff86d0db98 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/s390x-linux-gnu/libpthread.so.0
      #1  0x000000013862747a in __gthread_cond_timedwait (__abs_timeout=0x3ff397fac60, __mutex=<optimized out>, __cond=<optimized out>) at /opt
      /mongodbtoolchain/v2/include/c++/5.4.0/s390x-mongodb-linux/bits/gthr-default.h:871
      ...
      MongoDB Lock at 0x14b229000 (mongo::MODE_IX) held by thread id 0x3ff395ff910 (LWP 36001) waited on by thread 0x3ff397ff910 (LWP 35992)
      Ignoring GDB error 'PC not saved' in find_frame
      MongoDB Lock at 0x152581e80 (mongo::MODE_X) held by thread id 0x3ff397ff910 (LWP 35992) waited on by thread 0x3ff505ff910 (LWP 35984)
      Ignoring GDB error 'PC not saved' in find_frame
      ...
      MongoDB Lock at 0x14b229000 (mongo::MODE_IX) held by thread id 0x3ff397ff910 (LWP 35992) waited on by thread 0x3ff55fff910 (LWP 60994)
      ...
      Saving digraph to debugger_waitsfor_mongod_60928.gv
      Cycle detected in the graph nodes ['Lock 0x00014b229000', 'Thread 0x03ff505ff910', 'Lock 0x000152581e80', 'Thread 0x03ff397ff910']
      Running Print JavaScript Stack Supplement
      

            Assignee:
            samy.lanka@mongodb.com Samyukta Lanka
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None