Tokutek / mariadb-5.5

TokuDB for MariaDB 5.5
http://www.tokutek.com/products/tokudb-for-mysql/
GNU Lesser General Public License v2.1
85 stars 23 forks source link

MDEV-5750 RQG test temporal_functions.yy crashes on sql_time.cc:1114 at time_to_daytime_interval(MYSQL_TIME*): Assertion `ltime->year == 0' #49

Closed joel9001 closed 10 years ago

joel9001 commented 10 years ago

Here is the RQG test that causes this crash:

./runall.pl --grammar=conf/temporal/temporal_functions.yy --duration=300 --queries=100000000 --threads=64 --basedir=/mnt/ssd/mysql/mariadb-5.5.35-tokudb-7.1.5-rc.3-debug-e-linux-x86_64 --vardir=/mnt/ssd/mysql/vardir1 --mask-level=0 --mask=0 --seed=1 --mysqld=--general_log --sqltrace

joel9001 commented 10 years ago

Here is the stack trace from this crash:

140226 22:39:40 [ERROR] mysqld got signal 6 ; 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.

Thread pointer: 0x0x7fe26d928060 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 = 0x7fe26e2d0e28 thread_stack 0x48000 mysys/stacktrace.c:246(my_print_stacktrace)[0xb879c8] sql/signal_handler.cc:155(handle_fatal_signal)[0x6ecb94] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfbb0)[0x7fe288d1bbb0] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7fe288372f77] /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fe2883765e8] /lib/x86_64-linux-gnu/libc.so.6(+0x2fd43)[0x7fe28836bd43] /lib/x86_64-linux-gnu/libc.so.6(+0x2fdf2)[0x7fe28836bdf2] sql/sql_time.cc:1115(time_to_daytime_interval(st_mysqltime))[0x640a8c] sql/item_timefunc.cc:2149(Item_extract::val_int())[0x78deff] sql/item.cc:1304(Item::get_date(st_mysqltime, unsigned long long))[0x700e37] sql/item_func.h:162(Item_func::get_arg0_time(st_mysqltime))[0x78b007] sql/item_cmpfunc.cc:906(get_datetimevalue(THD, Item_, Item_, Item, bool_))[0x71f356] sql/item_cmpfunc.cc:961(Arg_comparator::compare_datetime())[0x71fdd0] sql/item_cmpfunc.cc:1908(Item_func_gt::val_int())[0x71af4f] sql/item.cc:215(Item::val_bool())[0x6ff95d] sql/item_cmpfunc.cc:4695(Item_cond_and::val_int())[0x718f01] sql/item.cc:215(Item::val_bool())[0x6ff95d] sql/item_cmpfunc.cc:4713(Item_cond_or::val_int())[0x718e73] sql/sql_class.h:2657(THD::is_error() const)[0x5bece4] sql/sql_select.cc:16799(subselect(JOIN, st_jointable, bool))[0x5c864b] sql/sql_select.cc:16461(do_select)[0x5d8835] sql/sql_select.cc:2859(JOIN::exec())[0x5ed7b4] sql/sql_select.cc:3081(mysqlselect(THD, Item_, TABLELIST, unsigned int, List&, Item_, unsigned int, storder, storder, Item_, storder, unsigned long long, selectresult, st_select_lexunit, st_selectlex))[0x5e7339] sql/sql_select.cc:319(handleselect(THD, LEX_, selectresult, unsigned long))[0x5ede0a] sql/sql_parse.cc:4702(execute_sqlcom_select)[0x59007b] sql/sql_parse.cc:2235(mysql_executecommand(THD))[0x595eee] sql/sql_parse.cc:5813(mysqlparse(THD, char_, unsigned int, Parserstate))[0x59d7c5] sql/sql_parse.cc:1072(dispatch_command(enum_servercommand, THD, char_, unsigned int))[0x59e356] sql/sql_parse.cc:797(docommand(THD))[0x59fbaa] sql/sql_connect.cc:1266(do_handle_one_connection(THD*))[0x660fc6] sql/sql_connect.cc:1183(handle_one_connection)[0x6610b8] /lib/x86_64-linux-gnu/libpthread.so.0(+0x7f6e)[0x7fe288d13f6e] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fe2884369cd]

Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7fe24adff078): SELECT GREATEST( '0000-00-00 00:00:00' , '0000-00-00 00:00:00' ) AS c1 , col_int_key AS c2 , col_date_key AS c3 FROM C WHERE col_varchar_nokey >= DATE( '0000-00-00' ) AND col_datetime_nokey < col_int_key OR col_datetime_key > CAST( EXTRACT( DAY_MINUTE FROM GREATEST( col_time_nokey , FROM_DAYS( 8 ) , UTC_DATE() ) ) AS TIME ) AND col_int_key < UTC_DATE() ORDER BY 1

joel9001 commented 10 years ago

Here is the show table status output confirming the table 'C' is indeed a TokuDB table:

MariaDB [test]> show table status; +-------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +-------+--------+---------+-------------+------+----------------+-------------+---------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | A | TokuDB | 10 | tokudb_zlib | 1 | 0 | 0 | 9223372036854775807 | 0 | 73728 | 1 | 2014-02-26 14:51:49 | 2014-02-26 14:51:49 | NULL | latin1_swedish_ci | NULL | | | | AA | TokuDB | 10 | tokudb_zlib | 1 | 0 | 0 | 9223372036854775807 | 0 | 73728 | 10 | 2014-02-26 14:51:49 | 2014-02-26 14:51:49 | NULL | latin1_swedish_ci | NULL | | | | B | TokuDB | 10 | tokudb_zlib | 1 | 46 | 46 | 9223372036854775807 | 52 | 73728 | 2 | 2014-02-26 14:51:49 | 2014-02-26 14:51:50 | NULL | latin1_swedish_ci | NULL | | | | BB | TokuDB | 10 | tokudb_zlib | 1 | 46 | 46 | 9223372036854775807 | 55 | 73728 | 11 | 2014-02-26 14:51:49 | 2014-02-26 14:51:49 | NULL | latin1_swedish_ci | NULL | | | | C | TokuDB | 10 | tokudb_zlib | 20 | 45 | 914 | 9223372036854775807 | 1085 | 73728 | 21 | 2014-02-26 14:51:49 | 2014-02-2

joel9001 commented 10 years ago

I will attempt to reproduce using InnoDB.

joel9001 commented 10 years ago

Core file is located at:

tokuspare-1:/mnt/ssd/mysql/vardir1/master-data/core

elenst commented 10 years ago

Refiled as https://mariadb.atlassian.net/browse/MDEV-5750. Test case is in the JIRA report.

tmcallaghan commented 10 years ago

Moved to Jira as https://tokutek.atlassian.net/browse/DB-516