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

GaleraCluster's one node is Crashed down when many concurrent update was issuing.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.4.6
    • Fix Version/s: 10.4.9
    • Component/s: Galera
    • Labels:
      None
    • Environment:
      VMWare, 3-node Galera Cluster, CentOS7

      Description

      *Galera Cluster was crashed down, when one record was concurrently updating from many connections.
      *
      *Table description
      create table notice(
      id int auto_increment,
      host_id varchar(50),
      mdate datetime,
      primary key(id));

      *Only 3 record was inserted
      insert into notice(host_id, mdate) values(concat(@@hostname, '--', connection_id(), '--', now()), now());
      insert into notice(host_id, mdate) values(concat(@@hostname, '--', connection_id(), '--', now()), now());
      insert into notice(host_id, mdate) values(concat(@@hostname, '--', connection_id(), '--', now()), now());

      *30 connections(3*10 connection) were issuing below same query.
      update notice set host_id = concat(@@hostname, '--', connection_id(), '--', now()) where id = 4;

      *set global wsrep_retry_autocommit=30;

      *Error Log is like below.

      mysqld: /home/buildbot/buildbot/build/wsrep-lib/src/client_state.cpp:232: int wsrep::client_state::after_statement(): Assertion `transaction_.state() == wsrep::transaction::s_aborted' failed.
      190705 17:28:21 [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.

      To report this bug, see https://mariadb.com/kb/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.4.6-MariaDB-log
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=11
      max_threads=153
      thread_count=20
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467732 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.

      Thread pointer: 0x7fd6d404e008
      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 = 0x7fd6e41c9eb0 thread_stack 0x49000
      /GALERA/galera/bin/mysqld(my_print_stacktrace+0x2b)[0x561df71ce93b]
      /GALERA/galera/bin/mysqld(handle_fatal_signal+0x4b7)[0x561df6c2f737]
      sigaction.c:0(__restore_rt)[0x7fd6f89276d0]
      :0(__GI_raise)[0x7fd6f7d73277]
      :0(__GI_abort)[0x7fd6f7d74968]
      :0(__assert_fail_base)[0x7fd6f7d6c096]
      :0(_GI__assert_fail)[0x7fd6f7d6c142]
      /GALERA/galera/bin/mysqld(_ZN5wsrep12client_state15after_statementEv+0x1bc)[0x561df72586ec]
      src/client_state.cpp:258(wsrep::client_state::after_statement())[0x561df69b0bcc]
      sql/wsrep_trans_observer.h:385(wsrep_after_statement)[0x561df69b77a4]
      sql/sp_head.cc:3514(sp_instr_stmt::execute(THD*, unsigned int*))[0x561df69b7fc9]
      sql/sp_head.cc:1348(sp_head::execute(THD*, bool))[0x561df69b42b4]
      sql/sp_head.cc:1758(sp_head::execute_trigger(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_grant_info*))[0x561df69b4a92]
      sql/sql_trigger.cc:2203(Table_triggers_list::process_triggers(THD*, trg_event_type, trg_action_time_type, bool))[0x561df6ad7cae]
      sql/sql_update.cc:1101(mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, bool, unsigned long long*, unsigned long long*))[0x561df6ae48d0]
      sql/sql_parse.cc:4365(mysql_execute_command(THD*))[0x561df6a49dde]
      sql/sql_parse.cc:10013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x561df6a4c5e1]
      sql/sql_class.h:3881(THD::get_stmt_da())[0x561df6a4c76a]
      sql/sql_parse.cc:1813(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x561df6a4ee44]
      sql/sql_parse.cc:1362(do_command(THD*))[0x561df6a4f561]
      sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x561df6b1e87f]
      sql/sql_connect.cc:1308(handle_one_connection)[0x561df6b1e9c4]
      pthread_create.c:0(start_thread)[0x7fd6f891fe25]
      /lib64/libc.so.6(clone+0x6d)[0x7fd6f7e3bbad]

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fd6d42ef270): is an invalid pointer
      Connection ID (thread ID): 16
      Status: KILL_QUERY

      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=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=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.

      We think the query pointer is invalid, but we will try to print it anyway.
      Query: insert into notice_log(hostname, connection_id, time) values(@@hostname, connection_id(), now())

      Writing a core file...
      Working directory at /GALERA_DATA/DATA
      Resource Limits:
      Limit Soft Limit Hard Limit Units
      Max cpu time unlimited unlimited seconds
      Max file size unlimited unlimited bytes
      Max data size unlimited unlimited bytes
      Max stack size 8388608 unlimited bytes
      Max core file size 0 unlimited bytes
      Max resident set unlimited unlimited bytes
      Max processes 3802 3802 processes
      Max open files 65535 65535 files
      Max locked memory 65536 65536 bytes
      Max address space unlimited unlimited bytes
      Max file locks unlimited unlimited locks
      Max pending signals 3802 3802 signals
      Max msgqueue size 819200 819200 bytes
      Max nice priority 0 0
      Max realtime priority 0 0
      Max realtime timeout unlimited unlimited us
      Core pattern: core

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jplindst Jan Lindström
              Reporter:
              Seonghwan Kim Seonghwan Kim
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: