Bug #50375 ability to resolve symbols from plugins
Submitted: 15 Jan 2010 16:17 Modified: 25 May 2011 18:52
Reporter: Andrii Nikitin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.1+ OS:Any
Assigned to: Geir Høydalsvik CPU Architecture:Any

[15 Jan 2010 16:17] Andrii Nikitin
Description:
Plugins load address is chosen by OS so it is not always possible to resolve plugin's symbols from stack dump.

This is extremely important to troubleshoot crashes, e.g.:

...
mysql/plugin/ha_innodb_plugin.so [0xf2ae8e]
mysql/plugin/ha_innodb_plugin.so [0xf2affe]
libexec/mysqld(rr_sequential(st_read_record*)+0x25) [0x82b83b5]
libexec/mysqld(sub_select(JOIN*, st_join_table*, bool)+0x4d) [0x8238b8d]
...

How to repeat:
n/a

Suggested fix:
As minimum we can write 'load address' of plugin into error log immediately after dlopen() succeeded.
To resolve stack dump now we can combine logged 'load address' with symbols from plugin binary.

I am sure better solution exists.
[26 Jan 2010 11:11] Davi Arnaut
Bug#50521 has been closed as a duplicate of this one.
[26 Jan 2010 11:14] Davi Arnaut
I think it might be related to this: https://bugzilla.redhat.com/show_bug.cgi?id=169017
[26 Jan 2010 11:16] Davi Arnaut
Perhaps the solution is to augment the resolve_stack_dump utility.
[4 Jan 2011 13:02] MySQL Verification Team
on linux you can get pmap -x `pidof mysqld` output and subtract the load address of the innodb plugin (it maybe the same on next startup of mysqld..) to find the real offsets in the .so file. From there it is possible to resolve the stack.
i tried it and it worked once so far..
[25 May 2011 18:52] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
[17 Aug 2011 1:42] MySQL Verification Team
See http://dev.mysql.com/doc/refman/5.5/en/using-stack-trace.html