[SERVER-72596] Stack trace symbolization fails for large stack traces Created: 06/Jan/23 Updated: 29/Oct/23 Resolved: 06/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Charlie Swanson |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
On my machine it appears I can symbolize small stack traces, but not large ones. Largest I got working was 42 frames, smallest non-working was 50 frames. It appears like there is an error in resetting the LibUnwindStepIteration iterator in LibUnwindStepIteration::start(). max.hirschhorn@mongodb.com noticed that the raw iterator resets _i to 0 in start(), but this _i = 0 is missing from the LibUnwind version. Adding that in to LibUnwindStepIteration::start() resolved my issue. I think small ones work because the _i counter can be iterated twice and stay under the maxFrames limit of 100. But if your stack trace is too large it cuts off. I'm not sure why 50 didn't work though, there may be an off-by-one somewhere. Thanks to daniel.gottlieb@mongodb.com and max.hirschhorn@mongodb.com for helping me debug and diagnose. |
| Comments |
| Comment by Githook User [ 06/Jan/23 ] | |||||||||||||||||||||||||||||||
|
Author: {'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}Message: | |||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 06/Jan/23 ] | |||||||||||||||||||||||||||||||
|
I agree with the assessment about the _i variable. Sorry about that! | |||||||||||||||||||||||||||||||
| Comment by Charlie Swanson [ 06/Jan/23 ] | |||||||||||||||||||||||||||||||
|
Oh actually my test of 50 frames actually appears to be >= 100 if I instrument with this patch:
I had previously just been going off the number of lines in the demangled stack trace printed in the log | |||||||||||||||||||||||||||||||
| Comment by Charlie Swanson [ 06/Jan/23 ] | |||||||||||||||||||||||||||||||
|
Sending to Service arch since I believe billy.donahue@mongodb.com has the code context and can probably quickly approve the change or tell us we're missing something. I'm not sure if we can test this effectively. |