[SERVER-27873] Dump a JavaScript backtrace of any code running in SpiderMonkey in hang_analyzer.py Created: 31/Jan/17  Updated: 08/Jan/24  Resolved: 16/Mar/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.4.5, 3.5.5

Type: Improvement Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Jonathan Abrahams
Resolution: Done Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.4
Sprint: TIG 2017-03-27
Participants:
Linked BF Score: 15

 Description   

Invoke this from GDB & WinDBG



 Comments   
Comment by Githook User [ 28/Apr/17 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-27873 Dump a JavaScript backtrace of any code running in SpiderMonkey in hang_analyzer.py

(cherry picked from commit eaf3190fd59d291bb537cd3f3edde7e6abab7466)
Branch: v3.4
https://github.com/mongodb/mongo/commit/4e3f537629e43d1c2f0909fbbb8f19217b8b2887

Comment by Githook User [ 16/Mar/17 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-27873 Dump a JavaScript backtrace of any code running in SpiderMonkey in hang_analyzer.py
Branch: master
https://github.com/mongodb/mongo/commit/eaf3190fd59d291bb537cd3f3edde7e6abab7466

Comment by Jonathan Abrahams [ 10/Mar/17 ]

Accomplishing this in Windows (CDB/winDBG) is not quite as straightforward. I've posted a stackoverflow question to see if we can solve it.

Comment by Jonathan Abrahams [ 09/Mar/17 ]

This code snippet should work in GDB to print returned strings:

printf "%s\n", mongo::mozjs::kCurrentScope->buildStackString().c_str()

Result:

joinAll/<@jstests/concurrency/fsm_libs/thread_mgr.js:177:13
joinAll@jstests/concurrency/fsm_libs/thread_mgr.js:176:9
runWorkloadGroup@jstests/concurrency/fsm_libs/runner.js:544:32
runWorkloads/<@jstests/concurrency/fsm_libs/runner.js:697:1
runWorkloads@jstests/concurrency/fsm_libs/runner.js:679:17
serial@jstests/concurrency/fsm_libs/runner.js:748:1
@jstests/concurrency/fsm_all_replication.js:16:1

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