Bug #50521 InnoDB Plugin does not print helpful symbols in the stacktrace
Submitted: 21 Jan 2010 19:26 Modified: 26 Jan 2010 11:10
Reporter: Matthew Lord Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version:5.1.42 OS:Linux (2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux)
Assigned to: Assigned Account CPU Architecture:Any
Tags: assert, crash, InnoDB plugin, stacktrace

[21 Jan 2010 19:26] Matthew Lord
Description:
The InnoDB Plugin doesn't resolve symbols in the stacktrace that's sent to 
the error log.  Here's an example:

thd: 0x2103850
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f039177e0d0 thread_stack 0x40000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2e)[0x8ad46e]
/usr/local/mysql/bin/mysqld(handle_segfault+0x322)[0x5e05c2]
/lib/libpthread.so.0[0x7f03a24a4190]
/lib/libc.so.6(gsignal+0x35)[0x7f03a187e4b5]
/lib/libc.so.6(abort+0x180)[0x7f03a1881f50]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff801a5]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff802b1]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff8792a]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff677cc]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff67a4c]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff5eded]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff3ede6]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff3f51d]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff6e605]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff7089d]
/usr/local/mysql-advanced-gpl-5.1.42-linux-x86_64-glibc23/lib/plugin/ha_innodb_plugin.so[0x7f039ff9a0ed]
/usr/local/mysql/bin/mysqld(_ZN7handler7ha_openEP8st_tablePKcii+0x3f)[0x6cef6f]
/usr/local/mysql/bin/mysqld(_Z21open_table_from_shareP3THDP14st_table_sharePKcjjjP8st_tableb+0x56a)[0x63123a]
/usr/local/mysql/bin/mysqld[0x62afbb]
/usr/local/mysql/bin/mysqld(_Z10open_tableP3THDP10TABLE_LISTP11st_mem_rootPbj+0x58f)[0x62bddf]
/usr/local/mysql/bin/mysqld(_Z11open_tablesP3THDPP10TABLE_LISTPjj+0x6a9)[0x62cc69]
/usr/local/mysql/bin/mysqld(_Z30open_normal_and_derived_tablesP3THDP10TABLE_LISTj+0x1e)[0x62cdde]
/usr/local/mysql/bin/mysqld(_Z18mysqld_list_fieldsP3THDP10TABLE_LISTPKc+0x22)[0x6ffed2]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xc9a)[0x5f712a]
/usr/local/mysql/bin/mysqld(_Z10do_commandP3THD+0xe6)[0x5f7c36]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x246)[0x5ea526]
/lib/libpthread.so.0[0x7f03a249ba04]
/lib/libc.so.6(clone+0x6d)[0x7f03a192a80d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x2125de0 = 
thd->thread_id=1
thd->killed=NOT_KILLED

How to repeat:
# start mysqld using --innodb_file_per_table

use test;

create table t1(id int auto_increment primary key)engine=innodb;

# shutdown mysqld

# edit the t1.ibd file and remove the first character

# startup mysqld

use test;
select * from t1;

Suggested fix:
We should resolve the stack frames in the same manner that we do for the standard InnoDB version and for general mysqld calls.
[26 Jan 2010 11:10] Davi Arnaut
Closed as a duplicate of Bug#50375.