[SERVER-42032] mongodb-javascript-stack always fails when running in hang_analyzer.py Created: 01/Jul/19 Updated: 29/Oct/23 Resolved: 12/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc3, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pavithra Vetriselvan | Assignee: | Max Hirschhorn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | tig-hanganalyzer | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v4.2
|
||||
| Sprint: | STM 2019-07-29 | ||||
| Participants: | |||||
| Story Points: | 1 | ||||
| Description |
Original descriptionIn gdb, if we're in a frame that does not know about mongo::mozjs:kCurrentScope, then we will not print a javascript stack trace. This can be especially useful when debugging our integration tests and gdb optimizes variables out of the core dump. max.hirschhorn figured out that switching the frame in gdb (frame 1) and then running mongodb-javascript-stack will work fine. Perhaps we can arbitrarily switch frames here before trying to print the stack trace. |
| Comments |
| Comment by Githook User [ 12/Jul/19 ] | |||||||
|
Author: {'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}Message: (cherry picked from commit 4bdf1fd63dc793a6d36d1f9da660c9747478206b) | |||||||
| Comment by Githook User [ 12/Jul/19 ] | |||||||
|
Author: {'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}Message: | |||||||
| Comment by Max Hirschhorn [ 01/Jul/19 ] | |||||||
|
Interestingly enough, it looks like the SpiderMonkey developers have hit this same kind of issue before in https://bugzilla.mozilla.org/show_bug.cgi?id=1483323. They ended up replacing their usage of gdb.parse_and_eval(). We could do the same by changing the logic in MongoDBJavaScriptStack.javascript_stack() to something along the lines of the following:
Another hack would be to switch frames before running gdb.parse_and_eval(). While this issue was reported for the mongodb-javascript-stack command, there are other usages of gdb.parse_and_eval() which read from thread-local variables. CC acm
|