[SERVER-33987] add thread name to hang analyzer output Created: 19/Mar/18  Updated: 29/Oct/23  Resolved: 11/Apr/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Improvement Priority: Minor - P4
Reporter: Benety Goh Assignee: Samyukta Lanka
Resolution: Fixed Votes: 0
Labels: tig-hanganalyzer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-34519 mongo_lock.py generating malformed gr... Closed
Related
is related to SERVER-28747 Enhance locks output with lock names Closed
Backwards Compatibility: Fully Compatible
Sprint: TIG 2018-04-09, TIG 2018-04-23
Participants:
Linked BF Score: 0

 Description   

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



 Comments   
Comment by Githook User [ 11/Apr/18 ]

Author:

{'email': 'samy.lanka@gmail.com', 'name': 'Samy Lanka', 'username': 'lankas'}

Message: SERVER-33987 add thread name to hang analyzer output
Branch: master
https://github.com/mongodb/mongo/commit/d91bc3cde8d453919fe00a6bd89357d41e79bb19

Generated at Thu Feb 08 04:35:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.