[SERVER-5852] freebsd 64-bit backtrace segfaults Created: 16/May/12 Updated: 28/Oct/15 Resolved: 08/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
FreeBSD 64-bit |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
If you run 'test', it typically prints stack traces as part of 'cursor' test. 32-bit works fine but 64-bit crashes with a segfault in libexecinfo in the backtrace() function. |
| Comments |
| Comment by Andy Schwerin [ 10/Jul/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Existing tests exercised this bug. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 27/Jun/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry Sam, I forgot Doc Changes should have gone to None. We ended up not using libunwind for FreeBSD after all, so the library dependency is back to libexecinfo. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andy Schwerin [ 08/Jun/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Just need to use frame pointers in 64-bit FreeBSD, so their unwinder will work. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by auto [ 08/Jun/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: This makes execinfo:backtrace() work, and should have a minimal impact on | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by auto [ 24/May/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'login': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: Revert " This reverts commit e6f9efc3c372f5bc8871df838c6e891117655a88. This may be resubmitted as a generic replacement for backtrace() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 24/May/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
change documentation for 'building freebsd' to mention that it needs libunwind installed instead of libexecinfo now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by auto [ 24/May/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'login': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 23/May/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I got something working, will commit soon | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Crosta [ 22/May/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is a proof-of-concept for printing stack information on FreeBSD using libunwind: (add to stacktrace.cpp after the first #if block)
SConstruct also needs to check for libunwind, and set the appropriate macro:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Crosta [ 18/May/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I can file a bug with FreeBSD, but it would be nice if we had a small reproducing test case to submit with it – can you help me make one (or make one yourself?) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 18/May/12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@dcrosta, do we have version 1.1_3 of libexecinfo? There were apparently some 64-bit fixes made in the latest version that 1.1_2 doesn't have. |