From 26e5f9dda13efad33e867742ea4e42e479b51b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Tue, 16 Jan 2018 22:57:52 +0200 Subject: MDEV-14229: Stack trace is not resolved for shared objects Resolving a stacktrace including functions in dynamic libraries requires us to look inside the libraries for the symbols. Addr2line needs to be started with the correct binary for each address on the stack. To do this, figure out which library it is using dladdr, then if the addr2line binary was started with a different binary, fork it again with the correct one. We only have one addr2line process running at any point during the stacktrace resolving step. The maximum number of forks for addr2line should generally be around 6. One for server stacktrace code, one for plugin code, one when going back into server code, one for pthread library, one for libc, one for the _start function in the server. More can come up if plugin calls server function which goes back to a plugin, etc. --- config.h.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'config.h.cmake') diff --git a/config.h.cmake b/config.h.cmake index dfdd4215e4a..99a2ebdd093 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -148,6 +148,7 @@ #cmakedefine HAVE_CUSERID 1 #cmakedefine HAVE_CXX_NEW 1 #cmakedefine HAVE_DIRECTIO 1 +#cmakedefine HAVE_DLADDR 1 #cmakedefine HAVE_DLERROR 1 #cmakedefine HAVE_DLOPEN 1 #cmakedefine HAVE_DOPRNT 1 -- cgit v1.2.1