← Back to team overview

maria-discuss team mailing list archive

MariaDB Crashes due to Stored Procedure

 

I created two Store procedures to time table scheduling some months back and test it at the time which was fine. The first procedure has a cursor to navigate a list of records and call the second procedure. The Second Procedure has two cursors for different scenarios.

Now trying to a final test before moving to production and it crashes my MariaDB Server mid way. Even when I called the Second Procedure individually with static parameters, after three to five calls MariaDB still crashes.

The Operating system is Centos 6.6, MariaDB 10.0.21 and error from log displays is as follows

|This could be because you hit a bug.It isalso possible that this binary orone ofthe libraries it was linked against iscorrupt,improperly built,ormisconfigured.This error can also be caused bymalfunctioning hardware.Toreport this bug,see http://kb.askmonty.org/en/reporting-bugs We will try our best toscrape up someinfo that will hopefully help diagnose the problem,but since we have already crashed,something isdefinitely wrong andthis may fail.Server version:10.0.21-MariaDB key_buffer_size=134217728read_buffer_size=131072max_used_connections=3max_threads=153thread_count=2It ispossible that mysqld could useup tokey_buffer_size +(read_buffer_size +sort_buffer_size)*max_threads =467003K bytes ofmemory Hope that's ok;ifnot,decrease somevariables inthe equation.Thread pointer:0x0x7fdac266f008 Attempting backtrace.You can usethe followinginformation tofind out wheremysqld died.Ifyou see no messages after this,something went terribly wrong...stack_bottom =0x7fdad74cfd30thread_stack 0x48000/usr/sbin/mysqld(my_print_stacktrace+0x2b)[0xb7f84b]/usr/sbin/mysqld(handle_fatal_signal+0x398)[0x72b758]/lib64/libpthread.so.0(+0xf710)[0x7fdad710b710]/usr/sbin/mysqld(_ZN13st_select_lex17mark_as_dependentEP3THDPS_P4Item+0xa0)[0x5c8410]/usr/sbin/mysqld[0x73c544]/usr/sbin/mysqld(_ZN10Item_field15fix_outer_fieldEP3THDPP5FieldPP4Item+0x62f)[0x74c78f]/usr/sbin/mysqld(_ZN10Item_field10fix_fieldsEP3THDPP4Item+0x432)[0x74ce72]/usr/sbin/mysqld(_Z12setup_fieldsP3THDPP4ItemR4ListIS1_E17enum_mark_columnsPS5_b+0x163)[0x594a03]/usr/sbin/mysqld[0x6168f3]/usr/sbin/mysqld(_ZN18st_select_lex_unit7prepareEP3THDP13select_resultm+0x39c)[0x6648ac]/usr/sbin/mysqld(_Z21mysql_derived_prepareP3THDP3LEXP10TABLE_LIST+0x206)[0x5b4bc6]/usr/sbin/mysqld(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0x193)[0x5b5bd3]/usr/sbin/mysqld(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x5ca857]/usr/sbin/mysqld(_ZN10TABLE_LIST14handle_derivedEP3LEXj+0x4f)[0x679f2f]/usr/sbin/mysqld(_Z28mysql_handle_list_of_derivedP3LEXP10TABLE_LISTj+0x3f)[0x5b5d4f]/usr/sbin/mysqld(_Z20mysql_prepare_insertP3THDP10TABLE_LISTP5TABLER4ListI4ItemEPS7_S8_S8_15enum_duplicatesPPS6_bbb+0xb8)[0x5c09a8]/usr/sbin/mysqld(_Z27mysql_insert_select_prepareP3THD+0x72)[0x5c0e62]/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x556f)[0x5d94bf]/usr/sbin/mysqld(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x1e)[0x81d26e]/usr/sbin/mysqld(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x8b)[0x82285b]/usr/sbin/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x155)[0x822d45]/usr/sbin/mysqld(_ZN7sp_head7executeEP3THDb+0x6c9)[0x820529]/usr/sbin/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x5f6)[0x821796]/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x31f9)[0x5d7149]/usr/sbin/mysqld(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x1e)[0x81d26e]/usr/sbin/mysqld(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x8b)[0x82285b]/usr/sbin/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x155)[0x822d45]/usr/sbin/mysqld(_ZN7sp_head7executeEP3THDb+0x6c9)[0x820529]/usr/sbin/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x5f6)[0x821796]/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x31f9)[0x5d7149]/usr/sbin/mysqld[0x5da9d7]/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1d0d)[0x5dce4d]/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x453)[0x69a2d3]/usr/sbin/mysqld(handle_one_connection+0x42)[0x69a3a2]/lib64/libpthread.so.0(+0x79d1)[0x7fdad71039d1]/lib64/libc.so.6(clone+0x6d)[0x7fdad581d8fd]Trying toget somevariables.Somepointers may be invalid andcause the dumptoabort.Query (0x7fdaa8818548):isan invalid pointer Connection ID (thread ID):3Status: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=onThe manual page at http://dev.mysql.com/doc/mysql/en/crashing.html containsinformation that should help you find out what iscausing the crash.|

I also did a test on MariaDB 10.0.17 on windows still no luck.


Follow ups