[SERVER-4548] Print more info on segfault Created: 22/Dec/11  Updated: 29/Feb/12  Resolved: 20/Jan/12

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

Type: Improvement Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-4544 "unable to connect to mongo program o... Closed
Participants:

 Description   

Currently there is very little useful information on segfault:

Wed Dec 21 19:49:21 Invalid access at address: 0x2aaaab9c6ad0
Wed Dec 21 19:49:21 Got signal: 11 (Segmentation fault).
Wed Dec 21 19:49:21 Backtrace:
0xb4c164 0xb50b2c 0x2aaaaacd5540 0x2aaaab9c6ad0 
 /mnt/home/buildbot/slave/Linux_64bit/mongo/mongod(_ZN5mongo10abruptQuitEi+0x3d4) [0xb4c164]
 /mnt/home/buildbot/slave/Linux_64bit/mongo/mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x22c) [0xb50b2c]
 /lib64/libpthread.so.0 [0x2aaaaacd5540]
 /lib64/libc.so.6 [0x2aaaab9c6ad0]

It seems that the address printed after "Invalid access at address" is the address of the instruction pointer in the thread that received the segfault signal. It would be nice to have the address that was actually faulted on, as well as the stack trace of the thread that triggered the segfault instead of the one that received the signal.



 Comments   
Comment by Spencer Brody (Inactive) [ 22/Dec/11 ]

Even if we can't get the stack trace from the offending thread, it'd still be nice to see if we can at least get the address that was dereferenced to cause the fault. Big difference between seeing a fault on 0, ffffffff, etc, or just some random address. Right now segfaults like the one pasted in the description are basically impossible to track down.

Comment by Eric Milkie [ 22/Dec/11 ]

I think we are going to leave this one as a mystery. The stack trace addresses are absolute, not relative, and we don't record the image address mappings in the stack trace, so there is no way to translate the absolute addresses into relative addresses for further debugging...

Generated at Thu Feb 08 03:06:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.