[SERVER-61547] No stacktraces emitted to log by SIGUSR2 on ARM processor Created: 16/Nov/21  Updated: 27/Oct/23  Resolved: 14/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Tausif Rahman (Inactive)
Resolution: Gone away Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-42470 Generate additional configuration for... Closed
Related
Operating System: ALL
Participants:

 Description   

When SIGUSR2 is received by mongod on Intel a stack trace dump of all threads is generated:

{"t":{"$date":"2021-11-16T20:10:20.814Z"},"s":"I","c":"CONTROL","id":23377,"ctx":"SignalHandler","msg":"Received signal","attr":{"signal":12,"error":"User defined signal 2"}}
{"t":{"$date":"2021-11-16T20:10:20.814Z"},"s":"I","c":"CONTROL","id":23378,"ctx":"SignalHandler","msg":"Signal was sent by kill(2)","attr":{"pid":99562,"uid":1000}}
{"t":{"$date":"2021-11-16T20:10:20.814Z"},"s":"I","c":"COMMAND","id":23394,"ctx":"SignalHandler","msg":"Preparing to dump thread stacks","attr":{"numThreads":61}}
{"t":{"$date":"2021-11-16T20:10:20.815Z"},"s":"I","c":"COMMAND","id":23396,"ctx":"SignalHandler","msg":"Signalled threads","attr":{"numThreads":61}}
{"t":{"$date":"2021-11-16T20:10:20.975Z"},"s":"I","c":"COMMAND","id":31423,"ctx":"SignalHandler","msg":"===== multithread stacktrace session begin ====="}
{"t":{"$date":"2021-11-16T20:10:20.975Z"},"s":"I","c":"COMMAND","id":31424,"ctx":"SignalHandler","msg":"Stacktrace Prologue","attr":{"prologue":{"processInfo":{"mongodbVersion":"5.0.2","gitVersion":"6d9ec525e78465dcecadcff99cce953d380fedc8","compiledModules":[],"uname":{"sysname":"Linux","release":"4.14.104-95.84.amzn2.x86_64","version":"#1 SMP Sat Mar 2 00:40:20 UTC 2019","machine":"x86_64"},"somap":[{"b":"000","elfType":3,"buildId":"AC28B99759ECBC952EB86BA3107D1CB198251C26"},{"b":"001","path":"/lib64/libpthread.so.0","elfType":3,"buildId":"38815B3DF105930A63113D9A47F828E0DBD78910"},{"b":"002","path":"/lib64/libc.so.6","elfType":3,"buildId":"2E0E42C415B4A647A03E54E557BA5DCF258A9AFF"}]}}}}
{"t":{"$date":"2021-11-16T20:10:20.975Z"},"s":"I","c":"COMMAND","id":31425,"ctx":"SignalHandler","msg":"Stacktrace Record","attr":{"record":{"name":"FreeMonHTTP-0","tid":99588,"backtrace":[{"b":"000","o":"3DCE849","s":"_ZN5mongo12rawBacktraceEPPvm","s+":"9"},{"b":"000","o":"3DDA573","s":"stateSingletonAction","s+":"123"},{"b":"001","o":"117E0"},{"b":"001","o":"D275","s":"pthread_cond_wait","s+":"1F5"},{"b":"000","o":"3F714FC","s":"_ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE","s+":"C"},{"b":"000","o":"3B92DD6","s":"_ZN5mongo10ThreadPool4Impl13_consumeTasksEv","s+":"D66"},{"b":"000","o":"3B93511","s":"_ZN5mongo10ThreadPool4Impl17_workerThreadBodyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE","s+":"161"},{"b":"000","o":"3B93A20"},{"b":"000","o":"3F74DFF"},{"b":"001","o":"740B"},{"b":"002","o":"ED40F","s":"clone","s+":"3F"}]}}}
...
{"t":{"$date":"2021-11-16T20:10:20.977Z"},"s":"I","c":"COMMAND","id":31426,"ctx":"SignalHandler","msg":"===== multithread stacktrace session end ====="}

However on ARM processors only the first two lines are emitted. This is an important function for certain profiling and debugging tasks.



 Comments   
Comment by Tausif Rahman (Inactive) [ 15/Nov/22 ]

Happy to do so!

Comment by Kelsey Schubert [ 07/Oct/22 ]

I think this can be closed now since SERVER-42470 and SERVER-61856 have been resolved. Is that right?

Comment by Billy Donahue [ 17/Nov/21 ]

I agree with the above comment from acm.

I remember that aarch64 didn't work and x86_64 did, and it didn't bother us much. Something is better than nothing.

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