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 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.21-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=3
max_threads=153
thread_count=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467003 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x7fdac266f008
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 = 0x7fdad74cfd30 thread_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_duplicatesPPS
6_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 to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7fdaa8818548): is an invalid pointer
Connection ID (thread ID): 3
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.
I also did a test on MariaDB 10.0.17 on windows still no luck.