[MDEV-7333] "'show table status like 'table_name'" on tokudb table lead to MariaDB crash Created: 2014-12-16  Updated: 2015-01-15  Resolved: 2015-01-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - TokuDB
Affects Version/s: 5.5, 10.0
Fix Version/s: 5.5.42, 10.0.16

Type: Bug Priority: Critical
Reporter: robinzhao Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Operating System: Oracle Linux Server release 6.5
Kernel: 3.8.13-44.el6uek.x86_64
MariaDB: 10.0.13, 10.0.14,10.0.15

/etc/my.cnf:
[mysqld]
#plugin-dir=/usr/lib64/mysql/plugin
plugin-load-add=ha_tokudb.so

default-storage-engine=tokudb
tokudb_row_format = tokudb_zlib
tokudb_cache_size = 8G
tokudb_commit_sync = 1
tokudb_fsync_log_period = 0
tokudb_lock_timeout = 100000
tokudb_fs_reserve_percent = 5
tokudb_debug = 0


Issue Links:
Duplicate
is duplicated by MDEV-7259 Upgrade TokuDB from Tokutek.com binar... Open

 Description   

"show table status like 'table_name'" on tokudb table lead to MariaDB crash, i could not get tokudb table DDL information, but insert/update/delete/select on that tokudb table work well.

MariaDB error log

141205 10:54:31 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
 
To report this bug, see http://kb.askmonty.org/en/reporting-bugs
 
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.
 
Server version: 10.0.15-MariaDB-log
key_buffer_size=268435456
read_buffer_size=8388608
max_used_connections=2
max_threads=1001
thread_count=2
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 41283820 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x7f6c667ec008
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 = 0x7f6ed5cbfc48 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2b)[0xb70d4b]
/usr/sbin/mysqld(handle_fatal_signal+0x398)[0x7257b8]
/lib64/libpthread.so.0(+0xf710)[0x7f6ed59d3710]
/lib64/libc.so.6(+0x13386f)[0x7f6ed413586f]
/usr/sbin/mysqld(_ZN6String6appendEPKc+0x2a)[0x643d5a]
/usr/sbin/mysqld(_Z17show_create_tableP3THDP10TABLE_LISTP6StringP14HA_CREATE_INFO17enum_with_db_name+0x1596)[0x631496]
/usr/sbin/mysqld(_Z18mysqld_show_createP3THDP10TABLE_LIST+0x2e2)[0x639102]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x3f5d)[0x5d511d]
/usr/sbin/mysqld[0x5d79d2]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1b20)[0x5d9b90]
/usr/sbin/mysqld(_Z26threadpool_process_requestP3THD+0xa7)[0x6cb127]
/usr/sbin/mysqld[0x6fac2d]
/usr/sbin/mysqld[0xa66a8d]
/lib64/libpthread.so.0(+0x79d1)[0x7f6ed59cb9d1]
/lib64/libc.so.6(clone+0x6d)[0x7f6ed40eab6d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f6c1b02f020): is an invalid pointer
Connection ID (thread ID): 5
Status: NOT_KILLED
 
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on
 
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
141205 10:54:31 mysqld_safe Number of processes running now: 0
141205 10:54:31 mysqld_safe mysqld restarted

https://github.com/Tokutek/tokudb-engine/issues/274



 Comments   
Comment by Elena Stepanova [ 2014-12-18 ]

Hi,

Can you upload the whole datadir (importantly, the <datadir>/<schema>/<tablename>.frm file and all <datadir>/toku files) to our ftp.askmonty.org/private?

Comment by robinzhao [ 2014-12-19 ]

@Elena Stepanova,
upload datadir tar.gz file to ftp.askmonty.org/private done.

filename: Issues_MariaDBServer_MDEV-7333.tar.gz

Comment by Elena Stepanova [ 2014-12-21 ]

Thank you.

So, it happens if the table was initially created with Tokutek binaries and had ROW_FORMAT in the definition (which MariaDB's version does not have). To reproduce:

On a Tokutek build (I used mariadb-5.5.38-tokudb-7.1.7):

create table t2 (i int) engine=TokuDB row_format=tokudb_lzma;

Then start MariaDB (e.g. current 5.5 tree) on the same datadir:

MariaDB [test]> show create table t2 \G
ERROR 2013 (HY000): Lost connection to MySQL server during query

Stack trace from 5.5 revno 4395

#6  <signal handler called>
#7  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
#8  0x00000000006c2ede in String::append (this=0x7f7d346a2270, s=0x0) at 5.5/sql/sql_string.cc:471
#9  0x00000000006ab1f5 in store_create_info (thd=0x7f7d19579060, table_list=0x7f7cf8c4a150, packet=0x7f7d346a2270, create_info_arg=0x0, show_database=false) at 5.5/sql/sql_show.cc:1857
#10 0x00000000006a87b4 in mysqld_show_create (thd=0x7f7d19579060, table_list=0x7f7cf8c4a150) at 5.5/sql/sql_show.cc:1034
#11 0x000000000063670e in mysql_execute_command (thd=0x7f7d19579060) at 5.5/sql/sql_parse.cc:2808
#12 0x000000000063eb3a in mysql_parse (thd=0x7f7d19579060, rawbuf=0x7f7cf8c4a078 "show create table t2", length=20, parser_state=0x7f7d346a3680) at 5.5/sql/sql_parse.cc:5909
#13 0x000000000063277d in dispatch_command (command=COM_QUERY, thd=0x7f7d19579060, packet=0x7f7d1965b061 "show create table t2", packet_length=20) at 5.5/sql/sql_parse.cc:1079
#14 0x0000000000631909 in do_command (thd=0x7f7d19579060) at 5.5/sql/sql_parse.cc:793
#15 0x0000000000733ec2 in do_handle_one_connection (thd_arg=0x7f7d19579060) at 5.5/sql/sql_connect.cc:1266
#16 0x0000000000733981 in handle_one_connection (arg=0x7f7d19579060) at 5.5/sql/sql_connect.cc:1181
#17 0x00007f7d342d9b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#18 0x00007f7d3259020d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Generated at Thu Feb 08 07:18:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.