Solaris 11 has a working backtrace() function (which we use for stack traces), but Solaris 10 does not. When present, this function, and related functions backtrace_symbols and backtrace_symbols_fd, are found in libc.so.1, which is generally in /lib/64 (aka /lib/amd64).
We should not have an external reference to backtrace but should instead search for it in libc.so.1 and use it if found. If not found, we should emulate it using printstack() and walkcontext(). This will make the same binary runnable on both Solaris 10 and Solaris 11 and will use the native function on Solaris 11.
References:
https://blogs.oracle.com/mandalika/entry/c_c_printing_stack_trace
man page for walkcontext / printstack
Old description:
backtrace() symbol does not exist on all Solaris (but it apparently exists for our build?)
We should investigate and remove backtrace() support from Solaris
ld.so.1: mongod: fatal: relocation error: file mongod: symbol backtrace: referenced symbol not found
- is depended on by
-
SERVER-9761 Mongo executables should be built with '-z now' or equivalent on all nix platforms
- Closed
- related to
-
SERVER-7283 Switch to libtcmalloc_and_profiler instead of libtcmalloc_minimal
- Closed