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

Crash with sigsegv and assertion `lookup_handler != this' failed in handler::ha_check_overlaps

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.5
    • Fix Version/s: 10.5
    • Component/s: Galera, Versioned Tables
    • Labels:
      None
    • Environment:
      Galera 26.4.4(rae24803), CentOS 7.

      Description

      Run this test from 'mysql-test/suite/galera/t':

      --source include/galera_cluster.inc
      --source include/have_innodb.inc
       
      --connect (con1,localhost,root,,test)
      --connect (con2,localhost,root,,test)
       
      CREATE TABLE IF NOT EXISTS t1 (id INT AUTO_INCREMENT, f VARCHAR(16), start_time DATE, end_time DATE, PERIOD FOR per(start_time, end_time), PRIMARY KEY(id, per WITHOUT OVERLAPS));
      CREATE TABLE IF NOT EXISTS t2 (id VARCHAR(32), f INT, start_time DATE, end_time DATE, PERIOD FOR per(start_time, end_time), PRIMARY KEY(id), UNIQUE(f, per WITHOUT OVERLAPS));
      CREATE OR REPLACE TABLE t3 LIKE t1;
       
      INSERT IGNORE INTO t2 (start_time, end_time) VALUES ('1976-01-08', '1993-08-02'), ('1976-08-01', '2001-03-31') ORDER BY 1;
       
      START TRANSACTION;
      UPDATE IGNORE t2 SET start_time = '1976-03-27', end_time = '2037-08-14' ORDER BY start_time, end_time;
      --send
       
      DELETE t3.* FROM t1, t3;
      --connection con1
      --send
       
      ALTER TABLE t1 FORCE;
       
      --connection con2
      --reap
       
      CREATE TABLE IF NOT EXISTS t4 AS SELECT * FROM t3;
       
      # Cleanup
      DROP TABLE t1, t2, t3, t4;
      --source include/galera_end.inc
      

      It fails on 10.5, and does not fail on 10.4, 86c50a25.

      mysqld.1.err:

      10.5, 01e8459d

      mariadbd: /home/stepan/mariadb/10.5/sql/handler.cc:6863: int handler::ha_check_overlaps(const uchar*, const uchar*): Assertion `lookup_handler != this' failed.
      200609 14:11:26 [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.5.4-MariaDB-debug-log
      key_buffer_size=1048576
      read_buffer_size=131072
      max_used_connections=4
      max_threads=153
      thread_count=8
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63700 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f0e34966258
      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 = 0x7f0e86bb1ce8 thread_stack 0x49000
      /home/stepan/mariadb/10.5/sql/mariadbd(my_print_stacktrace+0x40)[0x5580462b37f8]
      mysys/stacktrace.c:306(my_print_stacktrace)[0x558045967447]
      sigaction.c:0(__restore_rt)[0x7f0eacc8a5d0]
      :0(__GI_raise)[0x7f0eaaf78207]
      :0(__GI_abort)[0x7f0eaaf798f8]
      :0(__assert_fail_base)[0x7f0eaaf71026]
      :0(__GI___assert_fail)[0x7f0eaaf710d2]
      /home/stepan/mariadb/10.5/sql/mariadbd(_ZN7handler17ha_check_overlapsEPKhS1_+0x4b5)[0x55804597e633]
      sql/handler.cc:6864(handler::ha_check_overlaps(unsigned char const*, unsigned char const*))[0x55804597f4f0]
      sql/handler.cc:7038(handler::ha_update_row(unsigned char const*, unsigned char const*))[0x558045ae87b1]
      sql/log_event_server.cc:8325(Update_rows_log_event::do_exec_row(rpl_group_info*))[0x558045ae023f]
      sql/log_event_server.cc:5650(Rows_log_event::do_apply_event(rpl_group_info*))[0x558045508e6d]
      sql/log_event.h:1496(Log_event::apply_event(rpl_group_info*))[0x558045d9678b]
      sql/wsrep_applier.cc:208(wsrep_apply_events(THD*, Relay_log_info*, void const*, unsigned long))[0x558045d77902]
      sql/wsrep_high_priority_service.cc:127(apply_events(THD*, Relay_log_info*, wsrep::const_buffer const&, wsrep::mutable_buffer&))[0x558045d7a25e]
      sql/wsrep_high_priority_service.cc:676(Wsrep_replayer_service::apply_write_set(wsrep::ws_meta const&, wsrep::const_buffer const&, wsrep::mutable_buffer&))[0x55804634a1e3]
      src/server_state.cpp:328(apply_write_set(wsrep::server_state&, wsrep::high_priority_service&, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x55804634db33]
      src/server_state.cpp:1127(wsrep::server_state::on_apply(wsrep::high_priority_service&, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x558046364a85]
      wsrep/high_priority_service.hpp:48(wsrep::high_priority_service::apply(wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x558046361da1]
      src/trx_handle.cpp:387(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&))[0x7f0ea5627500]
      src/trx_handle.hpp:826(galera::TrxHandleMaster::lock())[0x7f0ea5664b2e]
      src/trx_handle.hpp:1126(~TrxHandleLock)[0x7f0ea56794ed]
      /home/stepan/mariadb/10.5/sql/mariadbd(_ZN5wsrep18wsrep_provider_v266replayERKNS_9ws_handleEPNS_21high_priority_serviceE+0x57)[0x558046363599]
      src/wsrep_provider_v26.cpp:858(wsrep::wsrep_provider_v26::replay(wsrep::ws_handle const&, wsrep::high_priority_service*))[0x558045d75553]
      sql/wsrep_client_service.cc:271(Wsrep_client_service::replay())[0x558046359e31]
      src/transaction.cpp:1703(wsrep::transaction::replay(wsrep::unique_lock<wsrep::mutex>&))[0x558046356807]
      src/transaction.cpp:816(wsrep::transaction::after_statement())[0x558046343a5e]
      src/client_state.cpp:249(wsrep::client_state::after_statement())[0x558045602400]
      sql/wsrep_trans_observer.h:424(wsrep_after_statement(THD*))[0x55804561a18b]
      sql/sql_parse.cc:7826(wsrep_mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x558045606d4b]
      sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5580456054ca]
      sql/sql_parse.cc:1356(do_command(THD*))[0x5580457ac200]
      sql/sql_connect.cc:1411(do_handle_one_connection(CONNECT*, bool))[0x5580457abf44]
      sql/sql_connect.cc:1315(handle_one_connection)[0x558045cee186]
      pthread_create.c:0(start_thread)[0x7f0eacc82dd5]
      ??:0(__clone)[0x7f0eab03fead]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f0ea489d2ab): UPDATE IGNORE t2 SET start_time = '1976-03-27', end_time = '2037-08-14' ORDER BY start_time, end_time
      Connection ID (thread ID): 1
      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,not_null_range_scan=off
       
      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.
      Writing a core file...
      Working directory at /home/stepan/mariadb/10.5/mysql-test/var/mysqld.1/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        unlimited            unlimited            bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             4096                 23005                processes 
      Max open files            1024                 1024                 files     
      Max locked memory         65536                65536                bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       23005                23005                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: |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I %h
      

      mysqld.2.err:

      10.5, 01e8459d

      200609 14:11:26 [ERROR] mysqld got signal 11 ;
      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.5.4-MariaDB-debug-log
      key_buffer_size=1048576
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=4
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63700 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f72f4002018
      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 = 0x7f730c049d20 thread_stack 0x49000
      /home/stepan/mariadb/10.5/sql/mariadbd(my_print_stacktrace+0x40)[0x55fe2ad5e7f8]
      mysys/stacktrace.c:306(my_print_stacktrace)[0x55fe2a412447]
      sigaction.c:0(__restore_rt)[0x7f73138835d0]
      /home/stepan/mariadb/10.5/sql/mariadbd(_Z8key_copyPhPKhPK6st_keyjb+0x86)[0x55fe2a54038e]
      sql/key.cc:130(key_copy(unsigned char*, unsigned char const*, st_key const*, unsigned int, bool))[0x55fe2a42953a]
      sql/handler.cc:6847(handler::ha_check_overlaps(unsigned char const*, unsigned char const*))[0x55fe2a429cb7]
      sql/handler.cc:6986(handler::ha_write_row(unsigned char const*))[0x55fe2a59123a]
      sql/log_event_server.cc:7260(Rows_log_event::write_row(rpl_group_info*, bool))[0x55fe2a591594]
      sql/log_event_server.cc:7480(Write_rows_log_event::do_exec_row(rpl_group_info*))[0x55fe2a58b23f]
      sql/log_event_server.cc:5650(Rows_log_event::do_apply_event(rpl_group_info*))[0x55fe29fb3e6d]
      sql/log_event.h:1496(Log_event::apply_event(rpl_group_info*))[0x55fe2a84178b]
      sql/wsrep_applier.cc:208(wsrep_apply_events(THD*, Relay_log_info*, void const*, unsigned long))[0x55fe2a822902]
      sql/wsrep_high_priority_service.cc:127(apply_events(THD*, Relay_log_info*, wsrep::const_buffer const&, wsrep::mutable_buffer&))[0x55fe2a824684]
      sql/wsrep_high_priority_service.cc:525(Wsrep_applier_service::apply_write_set(wsrep::ws_meta const&, wsrep::const_buffer const&, wsrep::mutable_buffer&))[0x55fe2adf51e3]
      src/server_state.cpp:328(apply_write_set(wsrep::server_state&, wsrep::high_priority_service&, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x55fe2adf8b33]
      src/server_state.cpp:1127(wsrep::server_state::on_apply(wsrep::high_priority_service&, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x55fe2ae0fa85]
      wsrep/high_priority_service.hpp:48(wsrep::high_priority_service::apply(wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x55fe2ae0cda1]
      src/trx_handle.cpp:387(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&))[0x7f730c220500]
      src/replicator_smm.cpp:504(galera::ReplicatorSMM::apply_trx(void*, galera::TrxHandleSlave&))[0x7f730c258b1a]
      src/replicator_smm.cpp:2145(galera::ReplicatorSMM::process_trx(void*, boost::shared_ptr<galera::TrxHandleSlave> const&))[0x7f730c25e659]
      src/gcs_action_source.cpp:63(galera::GcsActionSource::process_writeset(void*, gcs_action const&, bool&))[0x7f730c2374e9]
      src/gcs_action_source.cpp:110(galera::GcsActionSource::dispatch(void*, gcs_action const&, bool&))[0x7f730c237b2a]
      src/gcs_action_source.cpp:29(~Release)[0x7f730c237d5e]
      src/replicator_smm.cpp:390(galera::ReplicatorSMM::async_recv(void*))[0x7f730c25ebdb]
      src/wsrep_provider.cpp:263(galera_recv)[0x7f730c2717f8]
      /home/stepan/mariadb/10.5/sql/mariadbd(_ZN5wsrep18wsrep_provider_v2611run_applierEPNS_21high_priority_serviceE+0x30)[0x55fe2ae0dc8c]
      src/wsrep_provider_v26.cpp:731(wsrep::wsrep_provider_v26::run_applier(wsrep::high_priority_service*))[0x55fe2a84260a]
      sql/wsrep_thd.cc:58(wsrep_replication_process(THD*, void*))[0x55fe2a833f47]
      sql/wsrep_mysqld.cc:2965(start_wsrep_THD(void*))[0x55fe2a799186]
      pthread_create.c:0(start_thread)[0x7f731387bdd5]
      ??:0(__clone)[0x7f7311c38ead]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f72ffdf7f7b): INSERT IGNORE INTO t2 (start_time, end_time) VALUES ('1976-01-08', '1993-08-02'), ('1976-08-01', '2001-03-31') ORDER BY 1
      Connection ID (thread ID): 1
      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,not_null_range_scan=off
       
      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.
      Writing a core file...
      Working directory at /home/stepan/mariadb/10.5/mysql-test/var/mysqld.2/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        unlimited            unlimited            bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             4096                 23005                processes 
      Max open files            1024                 1024                 files     
      Max locked memory         65536                65536                bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       23005                23005                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: |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I %h
      

        Attachments

        1. 200610_mysqld1_10.5.err
          27 kB
          Stepan Patryshev
        2. 200610_mysqld2_10.5.err
          24 kB
          Stepan Patryshev
        3. overlap_galera_200609.test
          1 kB
          Stepan Patryshev

          Issue Links

            Activity

              People

              Assignee:
              seppo Seppo Jaakola
              Reporter:
              stepan.patryshev Stepan Patryshev
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: