[ 
https://issues.apache.org/jira/browse/HDFS-3757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430686#comment-13430686
 ] 

Andy Isaacson commented on HDFS-3757:
-------------------------------------

This adds {{-rdynamic}} to the link. That means we're putting every symbol in 
the dynamic symbol table, which is a pretty big hammer to improve this issue.  
I don't know how this will interact with HDFS-3742 "use linker version script", 
it's possible that they will conflict or one will override the other.

The {{backtrace(3)}} interface is GNU specific.  This would need to be ifdeffed 
I suppose?

There's no fundamental reason why symbols need to be added to the dynamic 
symbol table to get symbols decoded, that's a limitation of GNU 
{{<execinfo.h>}}; I am pretty sure there's a STABS interpreting backtrace 
library out there.   This might best be implemented as a postprocessor rather 
than a library, since once you've SEGVed you might well be operating in a 
busted environment (malloc might segv again, for example).

So I'm not very optimistic about the benefits of this change, it has knock-on 
effects and potential risks and the upside isn't very high (although sometimes 
it's incredibly helpful, to be sure!).
                
> libhdfs: improve native stack traces
> ------------------------------------
>
>                 Key: HDFS-3757
>                 URL: https://issues.apache.org/jira/browse/HDFS-3757
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: libhdfs
>    Affects Versions: 2.2.0-alpha
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>            Priority: Minor
>         Attachments: HDFS-3757.001.patch
>
>
> When libhdfs crashes, we often don't get very good stack traces.  It would be 
> nice to get a better stack trace for the thread that crashed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to