[SERVER-8159] Write backtrace error to "log()" for backtrace_symbols Created: 13/Jan/13 Updated: 02/Apr/13 Resolved: 02/Apr/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Azat Khuzhin | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | open_pull_request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MONGO_HAVE_EXECINFO_BACKTRACE |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Write erros to "log()" instead of ostream, as for windows version of "printStackTrace()" |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 02/Apr/13 ] |
| Comment by Azat Khuzhin [ 14/Jan/13 ] |
|
Yes. |
| Comment by Tad Marshall [ 14/Jan/13 ] |
|
So your concern is just the error message when the call to backtrace_symbols() fails, not the backtrace itself? |
| Comment by Azat Khuzhin [ 14/Jan/13 ] |
|
Tad, thanks for explanation. I don't know about |
| Comment by Azat Khuzhin [ 14/Jan/13 ] |
|
Pull request https://github.com/mongodb/mongo/pull/356 |
| Comment by Tad Marshall [ 13/Jan/13 ] |
|
I think the concern had been that writing to the log stream might fail and so writing to stdout might be more reliable, but since we use dup2() to redirect stdout to the log stream I don't think there is any difference in reliability. We had to send the output directly to the log stream in Windows because stdout does not work when running as a Windows service, even when redirected with dup2(). Sending the text directly to the log stream has the advantage of capturing timestamps and thread names, which is helpful in debugging. |