Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27713

Crash after a conflict of applier thread with stored procedure call by event scheduler

    XMLWordPrintable

Details

    Description

      MariaDB Server 10.5.11 crashes as follows on CentOS 7.9:

      Jan 24 15:27:10 host mariadbd: 2022-01-24 15:27:10 0 [Note] WSREP: cluster conflict due to high priority abort for threads:
      Jan 24 15:27:10 host mariadbd: 2022-01-24 15:27:10 0 [Note] WSREP: Winning thread:
      Jan 24 15:27:10 host mariadbd: THD: 17, mode: high priority, state: exec, conflict: executing, seqno: 2349780871
      Jan 24 15:27:10 host mariadbd: SQL: INSERT INTO some_table
      Jan 24 15:27:10 host mariadbd: (col1, col2, ...)
      Jan 24 15:27:10 host mariadbd: VALUES (val1, val2, ... )
      Jan 24 15:27:10 host mariadbd: 2022-01-24 15:27:10 0 [Note] WSREP: Victim thread:
      Jan 24 15:27:10 host mariadbd: THD: 2704636, mode: local, state: exec, conflict: executing, seqno: -1
      Jan 24 15:27:10 host mariadbd: SQL: UPDATE `some_table
      Jan 24 15:27:10 host mariadbd: SET col3 = 1
      Jan 24 15:27:10 host mariadbd: WHERE col3 = 0
      Jan 24 15:27:10 host mariadbd: AND id >= NAME_CONST('some_id',8682004)
      Jan 24 15:27:10 host mariadbd: AND id < NAME_CONST('lsome_other_id',8682004) + NAME_CONST('some_size',1000)
      Jan 24 15:27:10 host mariadbd: 2022-01-24 15:27:10 0 [Note] WSREP: context: /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.5.11/storage/innobase/handler/ha_innodb.cc:18724
      ...
      Jan 24 15:27:10 host mariadbd: 220124 15:27:10 [ERROR] mysqld got signal 11 ;
      Jan 24 15:27:10 host mariadbd: This could be because you hit a bug. It is also possible that this binary
      Jan 24 15:27:10 host mariadbd: or one of the libraries it was linked against is corrupt, improperly built,
      Jan 24 15:27:10 host mariadbd: or misconfigured. This error can also be caused by malfunctioning hardware.
      Jan 24 15:27:10 host mariadbd: To report this bug, see https://mariadb.com/kb/en/reporting-bugs
      Jan 24 15:27:10 host mariadbd: We will try our best to scrape up some info that will hopefully help
      Jan 24 15:27:10 host mariadbd: diagnose the problem, but since we have already crashed,
      Jan 24 15:27:10 host mariadbd: something is definitely wrong and this may fail.
      Jan 24 15:27:10 host mariadbd: Server version: 10.5.11-MariaDB-log
      Jan 24 15:27:10 host mariadbd: key_buffer_size=134217728
      Jan 24 15:27:10 host mariadbd: read_buffer_size=131072
      Jan 24 15:27:10 host mariadbd: max_used_connections=6421
      Jan 24 15:27:10 host mariadbd: max_threads=100002
      Jan 24 15:27:10 host mariadbd: thread_count=1164
      Jan 24 15:27:10 host mariadbd: It is possible that mysqld could use up to
      Jan 24 15:27:10 host mariadbd: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 219323278 K bytes of memory
      Jan 24 15:27:10 host mariadbd: Hope that's ok; if not, decrease some variables in the equation.
      Jan 24 15:27:10 host mariadbd: Thread pointer: 0x7ef8942caac8
      Jan 24 15:27:10 host mariadbd: Attempting backtrace. You can use the following information to find out
      Jan 24 15:27:10 host mariadbd: where mysqld died. If you see no messages after this, something went
      Jan 24 15:27:10 host mariadbd: terribly wrong...
      Jan 24 15:27:10 host mariadbd: stack_bottom = 0x7f0844ef6a5f thread_stack 0x49000
      Jan 24 15:27:10 host mariadbd: ??:0(my_print_stacktrace)[0x56451470179e]
      Jan 24 15:27:10 host mariadbd: ??:0(handle_fatal_signal)[0x564514106457]
      ...
      Jan 24 15:27:11 host mariadbd: sigaction.c:0(__restore_rt)[0x7f099808f630]
      Jan 24 15:27:11 host mariadbd: ??:0(MDL_lock::reschedule_waiters())[0x564513ffef9b]
      Jan 24 15:27:11 host mariadbd: ??:0(MDL_lock::remove_ticket(LF_PINS*, MDL_lock::Ticket_list MDL_lock::*, MDL_ticket*))[0x564513fff1b4]
      Jan 24 15:27:11 host mariadbd: ??:0(MDL_context::release_lock(enum_mdl_duration, MDL_ticket*))[0x564513fffac4]
      Jan 24 15:27:11 host mariadbd: ??:0(Item_func_release_lock::val_int())[0x564514173b4b]
      Jan 24 15:27:11 host mariadbd: ??:0(Item_string_with_introducer::is_cs_specified() const)[0x564513eb6d65]
      Jan 24 15:27:11 host mariadbd: ??:0(mysql_do(THD*, List<Item>&))[0x564514268039]
      Jan 24 15:27:11 host mariadbd: ??:0(mysql_execute_command(THD*))[0x564513f03361]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_instr_stmt::exec_core(THD*, unsigned int*))[0x564513e5a506]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned int*, bool, sp_instr*))[0x564513e62fe2]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_instr_stmt::execute(THD*, unsigned int*))[0x564513e639dc]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_head::execute(THD*, bool))[0x564513e5e524]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_head::execute_procedure(THD*, List<Item>*))[0x564513e5fc1f]
      Jan 24 15:27:11 host mariadbd: ??:0(comp_ne_creator(bool))[0x564513ef6aca]
      Jan 24 15:27:11 host mariadbd: ??:0(Sql_cmd_call::execute(THD*))[0x564513efb48a]
      Jan 24 15:27:11 host mariadbd: ??:0(mysql_execute_command(THD*))[0x564513f032be]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_instr_stmt::exec_core(THD*, unsigned int*))[0x564513e5a506]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned int*, bool, sp_instr*))[0x564513e62fe2]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_instr_stmt::execute(THD*, unsigned int*))[0x564513e639dc]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_head::execute(THD*, bool))[0x564513e5e524]
      Jan 24 15:27:11 host mariadbd: ??:0(sp_head::execute_procedure(THD*, List<Item>*))[0x564513e5fc1f]
      Jan 24 15:27:11 host mariadbd: ??:0(Event_job_data::execute(THD*, bool))[0x564513fda28f]
      Jan 24 15:27:11 host mariadbd: ??:0(Event_worker_thread::run(THD*, Event_queue_element_for_exec*))[0x564514285f88]
      Jan 24 15:27:11 host mariadbd: ??:0(event_worker_thread)[0x56451428603a]
      Jan 24 15:27:11 host mariadbd: ??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x56451435356d]
      Jan 24 15:27:12 host mariadbd: pthread_create.c:0(start_thread)[0x7f0998087ea5]
      Jan 24 15:27:12 host kernel: traps: mariadbd[92203] general protection ip:7f0997526712 sp:7efb3dd09030 error:0 in libc-2.17.so[7f09974a4000+1c4000]
      Jan 24 15:27:14 host systemd: mariadb.service: main process exited, code=killed, status=11/SEGV 
      

      I can not find any MDEV with similar stack trace.

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              valerii Valerii Kravchuk
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.