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

Galera crashes when deleting records

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.4.17
    • Fix Version/s: N/A
    • Component/s: Galera
    • Labels:
      None
    • Environment:
      Operating System: Ubuntu 20.04.1 LTS
      Architecture: x86-64

      Description

      MariaDB in Galera cluster crashes when deleting multiple records.

      log output:
      {{
      RECORD LOCKS space id 539 page no 4 n bits 528 index GEN_CLUST_INDEX of table `tiandeeshop`.`mod_zasilkovna_queue` trx id 71457211 lock_mode X locks rec but not gap
      Record lock, heap no 2 PHYSICAL RECORD: n_fields 5; compact format; info bits 0
      0: len 6; hex 0000010bce83; asc ;;
      1: len 6; hex 000000000000; asc ;;
      2: len 7; hex 80000000000000; asc ;;
      3: len 4; hex 800bd4cf; asc ;;
      4: len 5; hex 99a78aa0c3; asc ;;

      Record lock, heap no 3 PHYSICAL RECORD: n_fields 5; compact format; info bits 0
      0: len 6; hex 0000010bce84; asc ;;
      1: len 6; hex 000000000000; asc ;;
      2: len 7; hex 80000000000000; asc ;;
      3: len 4; hex 800bd4d1; asc ;;
      4: len 5; hex 99a78aa0c3; asc ;;

      Record lock, heap no 4 PHYSICAL RECORD: n_fields 5; compact format; info bits 0
      0: len 6; hex 0000010bce85; asc ;;
      1: len 6; hex 000000000000; asc ;;
      2: len 7; hex 80000000000000; asc ;;
      3: len 4; hex 800bd4d3; asc ;;
      4: len 5; hex 99a78aa0c3; asc ;;

      ...
      2020-12-15 9:58:01 11 [ERROR] InnoDB: WSREP state:
      2020-12-15 9:58:01 11 [ERROR] WSREP: Thread BF trx_id: 71457214 thread: 11 seqno: 31487754 client_state: exec client_mode: high priority transaction_mode: executing applier: 1 toi: 0 local: 0 query: DELETE FROM mod_zasilkovna_queue WHERE (id_order = '919888')<98>yØ_^S^A
      2020-12-15 9:58:01 11 [ERROR] WSREP: Thread BF trx_id: 71457211 thread: 23 seqno: 31487756 client_state: exec client_mode: high priority transaction_mode: executing applier: 1 toi: 0 local: 0 query: DELETE FROM mod_zasilkovna_queue WHERE (id_order = '919912')<98>yØ_^S^A
      2020-12-15 09:58:01 0x7f6dcc08d700 InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-10.4.17/storage/innobase/lock/lock0lock.cc line 687

      ...

      Server version: 10.4.17-MariaDB-1:10.4.17+maria~focal-log
      key_buffer_size=2147483648
      read_buffer_size=16777216
      max_used_connections=1
      max_threads=302
      thread_count=28
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 12000530 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.

      Thread pointer: 0x7f6450000c48
      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 = 0x7f6dcc08ce08 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x32)[0x55ecf66826f2]
      /usr/sbin/mysqld(handle_fatal_signal+0x55d)[0x55ecf6139cbd]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f70559043c0]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f7054ff118b]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f7054fd0859]
      /usr/sbin/mysqld(+0x5b0a59)[0x55ecf5e09a59]
      /usr/sbin/mysqld(+0x58d277)[0x55ecf5de6277]
      /usr/sbin/mysqld(+0xaf8db6)[0x55ecf6351db6]
      /usr/sbin/mysqld(+0xafe8d2)[0x55ecf63578d2]
      /usr/sbin/mysqld(+0xb88d71)[0x55ecf63e1d71]
      /usr/sbin/mysqld(+0xab28c9)[0x55ecf630b8c9]
      /usr/sbin/mysqld(+0xab2c89)[0x55ecf630bc89]
      /usr/sbin/mysqld(_ZN7handler11ha_rnd_nextEPh+0x4e)[0x55ecf614003e]
      /usr/sbin/mysqld(_ZN14Rows_log_event8find_rowEP14rpl_group_info+0x576)[0x55ecf6255116]
      /usr/sbin/mysqld(_ZN21Delete_rows_log_event11do_exec_rowEP14rpl_group_info+0x92)[0x55ecf62552b2]
      /usr/sbin/mysqld(_ZN14Rows_log_event14do_apply_eventEP14rpl_group_info+0x23f)[0x55ecf62487af]
      /usr/sbin/mysqld(_Z18wsrep_apply_eventsP3THDP14Relay_log_infoPKvm+0x1b9)[0x55ecf60b4359]
      /usr/sbin/mysqld(_ZN21Wsrep_applier_service15apply_write_setERKN5wsrep7ws_metaERKNS0_12const_bufferERNS0_14mutable_bufferE+0xa3)[0x55ecf609d053]
      /usr/sbin/mysqld(+0xe96400)[0x55ecf66ef400]
      /usr/sbin/mysqld(_ZN5wsrep12server_state8on_applyERNS_21high_priority_serviceERKNS_9ws_handleERKNS_7ws_metaERKNS_12const_bufferE+0xc1)[0x55ecf66f0451]
      /usr/sbin/mysqld(+0xea6bcc)[0x55ecf66ffbcc]
      src/trx_handle.cpp:391(galera::TrxHandleSlave::apply(void*, wsrep_cb_status (void*, wsrep_ws_handle const*, unsigned int, wsrep_buf const*, wsrep_trx_meta const*, bool*), wsrep_trx_meta const&, bool&))[0x7f705435ebf5]
      src/replicator_smm.cpp:504(galera::ReplicatorSMM::apply_trx(void*, galera::TrxHandleSlave&))[0x7f70543a3bf2]
      src/gu_logger.hpp:96(gu::Logger::no_log(gu::LogLevel))[0x7f70543b8d18]
      src/replicator_str.cpp:1136(galera::ReplicatorSMM::recv_IST(void*))[0x7f70543bb062]
      src/replicator_smm.cpp:396(galera::ReplicatorSMM::async_recv(void*))[0x7f70543a8ce3]
      src/wsrep_provider.cpp:263(galera_recv)[0x7f70543c51d1]
      /usr/sbin/mysqld(_ZN5wsrep18wsrep_provider_v2611run_applierEPNS_21high_priority_serviceE+0x12)[0x55ecf6700152]
      /usr/sbin/mysqld(+0x85d1c3)[0x55ecf60b61c3]
      /usr/sbin/mysqld(_Z15start_wsrep_THDPv+0x2ec)[0x55ecf60a7dac]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609)[0x7f70558f8609]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f70550cd293]
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f6f342ab993): DELETE FROM mod_zasilkovna_queue WHERE (id_order = '919888')

      Connection ID (thread ID): 11
      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=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 https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
      information that should help you find out what is causing the crash.
      Writing a core file...
      Working directory at /var/lib/mysql
      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 257487 257487 processes
      Max open files 400000 400000 files
      Max locked memory 65536 65536 bytes
      Max address space unlimited unlimited bytes
      Max file locks unlimited unlimited locks
      Max pending signals 257487 257487 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
      }}

      mysqld --print-defaults
      {{
      mysqld would have been started with the following arguments:
      --port=3306 --bind-address=0.0.0.0 --datadir=/var/lib/mysql --socket=/var/run/mysqld/mysqld.sock --pid-file=/var/run/mysqld/mysqld.pid --log-error=/var/log/mysql/mysql.err --slow_query_log=1 --slow_query_log_file=/var/log/mysql-slow.log --long_query_time=2 --symbolic-links=0 --user=mysql --key_buffer_size=1G --max_allowed_packet=512M --table_open_cache=1024 --sort_buffer_size=16M --read_buffer_size=16M --read_rnd_buffer_size=32M --myisam_sort_buffer_size=64M --table_cache=2000 --thread_cache_size=8 --query_cache_size=16M --max_connections=151 --tmp_table_size=64M --max_heap_table_size=64M --join_buffer_size=1M --wait_timeout=1800 --net_read_timeout=120 --skip-name-resolve --back_log=100 --max_connect_errors=4294967295 --open-files-limit=100000 --interactive_timeout=3600 --connect_timeout=120 --innodb_file_per_table=1 --innodb_buffer_pool_size=32G --innodb_log_file_size=128M --innodb_log_buffer_size=8M --innodb_flush_log_at_trx_commit=1 --innodb_lock_wait_timeout=600 --wsrep_on=ON --wsrep_provider=/usr/lib/galera/libgalera_smm.so --wsrep_cluster_name=diamondplus --wsrep_node_address=10.80.65.51 --wsrep_cluster_address=gcomm://10.80.65.51,10.80.65.52,10.80.65.53 --wsrep_sst_method=mariabackup --wsrep_sst_auth=wsrep_sst:h3CyYVZWTNQhHzsV --wsrep_provider_options=gcache.size=10G;cert.log_conflicts=YES --wsrep_max_ws_size=1073741824 --wsrep_convert_LOCK_to_trx=0 --wsrep_retry_autocommit=4 --wsrep_replicate_myisam=1 --wsrep_slave_threads=20 --binlog_format=ROW --default-storage-engine=InnoDB --innodb_autoinc_lock_mode=2 --wsrep_sync_wait=1 --wsrep_log_conflicts=ON --bind-address=:: --character-set-server=utf8 --collation-server=utf8_general_ci --max_connections=300 --max_connect_errors=4294967295 --key_buffer_size=2G --tmp_table_size=1G --max_heap_table_size=2G --max_allowed_packet=128M --memlock=0 --sysdate_is_now=1 --thread_cache_size=256 --table_open_cache=2048 --table_definition_cache=2048 --lower_case_table_names=0 --query_cache_size=0 --query_cache_type=0 --long_query_time=2 --open_files_limit=100000 --interactive_timeout=3600 --wait_timeout=3600 --join_buffer_size=1M --read_buffer_size=16M --read_rnd_buffer_size=32M --sort_buffer_size=16M --slow_query_log=1 --slow_query_log_file=/var/log/mysql/mariadb-slow.log --long_query_time=2 --tmpdir=/var/tmp_sql --default_tmp_storage_engine=memory --innodb_flush_log_at_trx_commit=1 --innodb_file_per_table=1 --innodb_flush_neighbors=0 --innodb_doublewrite=0 --innodb_log_file_size=512M --innodb_log_buffer_size=16M --innodb_log_files_in_group=2 --innodb_flush_method=O_DIRECT --innodb_autoinc_lock_mode=2 --innodb_open_files=80000 --innodb_use_native_aio=0 --innodb_use_atomic_writes=0 --innodb_stats_on_metadata=0 --innodb_deadlock_detect=1 --innodb_print_all_deadlocks=1 --sync_binlog=0 --sql_mode= --skip-log-bin --innodb_buffer_pool_size=32G --innodb_buffer_pool_instances=32 --innodb_thread_concurrency=10 --innodb_read_io_threads=5 --innodb_write_io_threads=5 --innodb_io_capacity=1000
      }}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              radeksprta radeksprta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration