On Thu, Sep 08, 2016 at 09:07:33AM -0400, Jeff Darcy wrote: > In a few places in our code (e.g. gf_log_callingfn) we use the "backtrace" and "backtrace_symbols" functions from libc to log stack traces. Unfortunately, these functions don't seem very smart about dynamically loaded libraries - such as translators, where most of our code lives. They give us the object plus offset from where the object was loaded into memory, which isn't that easy to turn into a function name (let alone a file and line number). It seems like libunwind can do better, getting at least to the function name. AFAICT it's supported and packaged on all of our platforms, though there might be version differences. Newer versions can supposedly get to file and line, which would be even better. Before I get further into this, two questions for all of you: > > (1) Has somebody already gone down this path? Does it work? > > (2) Are there any other reasons we wouldn't want to switch? No objections from me. We can get to function names, files and line numbers when installing the -debuginfo packages, loading the xlator .so in gdb and such. But that really is too difficult for most users (and requires the exact same GlusterFS version + architecture as the logs). Enhancing this will hopefully get us better bug reports and maybe even some more contributors sending patches. When you get this to work, please remove contrib/libexecinfo as well. Thanks! Niels
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-devel