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

Server hangs on purge or failing assertions `!rw_lock_own_flagged(lock, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S)' / `!rw_lock_own(lock, RW_LOCK_S)'

    XMLWordPrintable

Details

    Description

      Note: I couldn't reproduce failures described here on 10.4, but it's not clean either, it occasionally fails on the same test cases in some other ways or hangs on shutdown, which may or may not be related to this issue.

      Test case 1

      --source include/have_innodb.inc
       
      SET GLOBAL innodb_stats_persistent= OFF;
       
      CREATE TABLE t1 (
          pk int,
          a blob,
          b blob as (left (a, 20)),
          primary key (pk),
          key (b(20))
      ) ENGINE=InnoDB;
       
      INSERT INTO t1 (pk,a) VALUES (1,'foo'),(2,'bar');
      DELETE FROM t1;
      INSERT INTO t1 (pk,a) VALUES (1,'foo'),(2,'bar');
       
      --source include/restart_mysqld.inc
      --sleep 5
       
      # Cleanup
      DROP TABLE t1;
      

      Test case 2

      --source include/have_innodb.inc
       
      SET GLOBAL innodb_stats_persistent= ON;
       
      CREATE TABLE t1 (
          pk int auto_increment,
          a int,
          b blob,
          primary key (pk),
          unique (b),
          unique (a)
      ) ENGINE=InnoDB;
       
      INSERT INTO t1 VALUES (1,0,'foo'),(2,1,NULL);
      DELETE FROM t1;
      INSERT INTO t1 VALUES (1,0,'foo'),(2,1,NULL);
       
      --let $restart_parameters= --innodb_stats_persistent=on
      --source include/restart_mysqld.inc
      --sleep 5
       
      # Cleanup
      DROP TABLE t1;
      

      Test case 1 causes a hang on a non-debug 10.5 server and an assertion failure on a debug server:

      10.5 non-debug 65b93cef hang

      Thread 9 (Thread 0x7f25111f6700 (LWP 16832)):
      #0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
      #1  0x0000557549b0e176 in os_event::wait (this=0x55754cdf30f8) at /data/src/10.5/storage/innobase/os/os0event.cc:158
      #2  os_event::wait_low (reset_sig_count=1, this=0x55754cdf30f8) at /data/src/10.5/storage/innobase/os/os0event.cc:325
      #3  os_event_wait_low (event=0x55754cdf30f8, reset_sig_count=<optimized out>) at /data/src/10.5/storage/innobase/os/os0event.cc:502
      #4  0x0000557549bac7eb in sync_array_wait_event (arr=arr@entry=0x55754cccdff8, cell=@0x7f25111f1e58: 0x55754ccce098) at /data/src/10.5/storage/innobase/sync/sync0arr.cc:456
      #5  0x0000557549bae7e2 in rw_lock_s_lock_spin (lock=lock@entry=0x7f2513815388, pass=pass@entry=0, file_name=file_name@entry=0x55754a0d59f8 "/data/src/10.5/storage/innobase/btr/btr0cur.cc", line=line@entry=6671) at /data/src/10.5/storage/innobase/sync/sync0rw.cc:367
      #6  0x0000557549c38bdb in rw_lock_s_lock_func (pass=0, line=6671, file_name=0x55754a0d59f8 "/data/src/10.5/storage/innobase/btr/btr0cur.cc", lock=0x7f2513815388) at /data/src/10.5/storage/innobase/include/sync0rw.ic:294
      #7  pfs_rw_lock_s_lock_func (pass=0, line=6671, file_name=0x55754a0d59f8 "/data/src/10.5/storage/innobase/btr/btr0cur.cc", lock=0x7f2513815388) at /data/src/10.5/storage/innobase/include/sync0rw.ic:644
      #8  buf_page_mtr_lock (line=6671, file=0x55754a0d59f8 "/data/src/10.5/storage/innobase/btr/btr0cur.cc", mtr=0x7f25111f2c30, rw_latch=1, block=<optimized out>) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:2985
      #9  buf_page_get_low (page_id=..., zip_size=zip_size@entry=0, rw_latch=rw_latch@entry=1, guess=<optimized out>, mode=<optimized out>, file=<optimized out>, line=<optimized out>, mtr=<optimized out>, err=<optimized out>, allow_ibuf_merge=<optimized out>) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:3571
      #10 0x0000557549c38c7d in buf_page_get_gen (page_id=..., zip_size=zip_size@entry=0, rw_latch=rw_latch@entry=1, guess=guess@entry=0x0, mode=mode@entry=10, file=file@entry=0x55754a0d59f8 "/data/src/10.5/storage/innobase/btr/btr0cur.cc", line=6671, mtr=0x7f25111f2c30, err=0x7f25111f22dc, allow_ibuf_merge=false) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:3640
      #11 0x0000557549c16fd5 in btr_cur_open_at_rnd_pos_func (latch_mode=1, file=0x55754a0d59f8 "/data/src/10.5/storage/innobase/btr/btr0cur.cc", line=6671, mtr=0x7f25111f2c30, cursor=0x7f25111f22f0, index=<optimized out>) at /data/src/10.5/storage/innobase/btr/btr0cur.cc:2969
      #12 btr_estimate_number_of_different_key_vals (index=index@entry=0x7f24f4015890) at /data/src/10.5/storage/innobase/btr/btr0cur.cc:6671
      #13 0x0000557549c90a17 in dict_stats_update_transient_for_index (index=index@entry=0x7f24f4015890) at /data/src/10.5/storage/innobase/dict/dict0stats.cc:887
      #14 0x0000557549c97b59 in dict_stats_update_transient (table=0x7f24f4013630) at /data/src/10.5/storage/innobase/dict/dict0stats.cc:945
      #15 dict_stats_update (table=table@entry=0x7f24f4013630, stats_upd_option=<optimized out>) at /data/src/10.5/storage/innobase/dict/dict0stats.cc:3329
      #16 0x0000557549aa3d01 in dict_stats_init (table=<optimized out>) at /data/src/10.5/storage/innobase/include/dict0stats.ic:165
      #17 ha_innobase::open (this=0x7f24f400eae0, name=0x7f24f400c678 "./test/t1") at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:5830
      #18 0x000055754978c89a in handler::ha_open (this=0x7f24f400eae0, table_arg=table_arg@entry=0x7f24f400dce8, name=0x7f24f400c678 "./test/t1", mode=2, test_if_locked=test_if_locked@entry=18, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /data/src/10.5/sql/handler.cc:2954
      #19 0x000055754964a25c in open_table_from_share (thd=thd@entry=0x7f24f4000a98, share=share@entry=0x7f24f400c1e0, alias=alias@entry=0x7f24f400b828, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=<optimized out>, is_create_table=<optimized out>, partitions_to_open=<optimized out>) at /data/src/10.5/sql/table.cc:4186
      #20 0x0000557549523769 in open_table (thd=thd@entry=0x7f24f4000a98, table_list=table_list@entry=0x7f24f400b7e0, ot_ctx=ot_ctx@entry=0x7f25111f4520) at /data/src/10.5/sql/sql_base.cc:1988
      #21 0x000055754953b701 in open_purge_table (thd=thd@entry=0x7f24f4000a98, db=db@entry=0x7f25111f45b0 "test", dblen=<optimized out>, tb=tb@entry=0x7f25111f4680 "t1", tblen=<optimized out>) at /data/src/10.5/sql/sql_class.cc:4730
      #22 0x0000557549a8dd4a in innodb_find_table_for_vc (thd=0x7f24f4000a98, table=0x7f24f4013630) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:20642
      #23 0x0000557549a9b0c1 in innobase_allocate_row_for_vcol (thd=thd@entry=0x7f24f4000a98, index=index@entry=0x7f24f4015890, heap=heap@entry=0x7f25111f47d0, table=table@entry=0x7f25111f47e0, record=record@entry=0x7f25111f47e8, storage=storage@entry=0x7f25111f47d8) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:20785
      #24 0x0000557549b98835 in row_vers_build_clust_v_col (row=row@entry=0x7f24f400b3b0, clust_index=clust_index@entry=0x7f24f4014cf0, index=index@entry=0x7f24f4015890, heap=0x7f24f400b338) at /data/src/10.5/storage/innobase/row/row0vers.cc:465
      #25 0x0000557549b9b424 in row_vers_old_has_index_entry (also_curr=also_curr@entry=true, rec=0x7f2513cf807f "\200", mtr=mtr@entry=0x7f25111f4930, index=index@entry=0x7f24f4015890, ientry=ientry@entry=0x7f24f40145d0, roll_ptr=1125899927290647, trx_id=0) at /data/src/10.5/storage/innobase/row/row0vers.cc:929
      #26 0x0000557549b7f8e1 in row_purge_poss_sec (node=node@entry=0x55754ce5fae8, index=index@entry=0x7f24f4015890, entry=entry@entry=0x7f24f40145d0, sec_pcur=sec_pcur@entry=0x7f25111f4e80, sec_mtr=sec_mtr@entry=0x7f25111f5100, is_tree=is_tree@entry=false) at /data/src/10.5/storage/innobase/row/row0purge.cc:245
      #27 0x0000557549b7fdab in row_purge_remove_sec_if_poss_leaf (node=node@entry=0x55754ce5fae8, index=index@entry=0x7f24f4015890, entry=entry@entry=0x7f24f40145d0) at /data/src/10.5/storage/innobase/row/row0purge.cc:466
      #28 0x0000557549b80cad in row_purge_remove_sec_if_poss (entry=0x7f24f40145d0, index=<optimized out>, node=0x55754ce5fae8) at /data/src/10.5/storage/innobase/row/row0purge.cc:568
      #29 row_purge_del_mark (node=0x55754ce5fae8) at /data/src/10.5/storage/innobase/row/row0purge.cc:638
      #30 row_purge_record_func (node=node@entry=0x55754ce5fae8, undo_rec=undo_rec@entry=0x55754ce6edd8 "", thr=thr@entry=0x55754ce5fa40, updated_extern=<optimized out>) at /data/src/10.5/storage/innobase/row/row0purge.cc:1048
      #31 0x0000557549b81c54 in row_purge (thr=0x55754ce5fa40, undo_rec=0x55754ce6edd8 "", node=0x55754ce5fae8) at /data/src/10.5/storage/innobase/row/row0purge.cc:1109
      #32 row_purge_step (thr=thr@entry=0x55754ce5fa40) at /data/src/10.5/storage/innobase/row/row0purge.cc:1158
      #33 0x0000557549b36d1c in que_thr_step (thr=0x1e) at /data/src/10.5/storage/innobase/que/que0que.cc:947
      #34 que_run_threads_low (thr=0x1e) at /data/src/10.5/storage/innobase/que/que0que.cc:1009
      #35 que_run_threads (thr=thr@entry=0x55754ce5fa40) at /data/src/10.5/storage/innobase/que/que0que.cc:1049
      #36 0x0000557549ba49b0 in srv_task_execute () at /data/src/10.5/storage/innobase/srv/srv0srv.cc:2030
      #37 purge_worker_callback () at /data/src/10.5/storage/innobase/srv/srv0srv.cc:2195
      #38 0x0000557549d285c2 in tpool::task_group::execute (this=0x55754b1db0c0 <purge_task_group>, t=0x55754b1bc860 <purge_worker_task>) at /data/src/10.5/tpool/task_group.cc:55
      #39 0x0000557549d2747f in tpool::thread_pool_generic::worker_main (this=0x55754ccf7fa0, thread_var=0x55754cd079b0) at /data/src/10.5/tpool/tpool_generic.cc:518
      #40 0x00007f251e9b1e6f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #41 0x00007f251f2bf4a4 in start_thread (arg=0x7f25111f6700) at pthread_create.c:456
      #42 0x00007f251e33dd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      all threads are attached as threads.txt

      10.5 debug 65b93cef

      Version: '10.5.5-MariaDB-debug-log'  socket: '/data/bld/10.5-debug-nightly/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
      mariadbd: /data/src/10.5/storage/innobase/sync/sync0rw.cc:760: void rw_lock_sx_lock_func(rw_lock_t*, ulint, const char*, unsigned int): Assertion `!rw_lock_own(lock, RW_LOCK_S)' failed.
      200626 16:13:56 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f04727bcf12 in __GI___assert_fail (assertion=0x5638cd724d15 "!rw_lock_own(lock, RW_LOCK_S)", file=0x5638cd724b80 "/data/src/10.5/storage/innobase/sync/sync0rw.cc", line=760, function=0x5638cd725820 <rw_lock_sx_lock_func(rw_lock_t*, unsigned long, char const*, unsigned int)::__PRETTY_FUNCTION__> "void rw_lock_sx_lock_func(rw_lock_t*, ulint, const char*, unsigned int)") at assert.c:101
      #8  0x00005638ccfb6abc in rw_lock_sx_lock_func (lock=0x7f046781c7d0, pass=0, file_name=0x5638cd7487c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=227) at /data/src/10.5/storage/innobase/sync/sync0rw.cc:760
      #9  0x00005638cd08304d in pfs_rw_lock_sx_lock_func (lock=0x7f046781c7d0, pass=0, file_name=0x5638cd7487c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=227) at /data/src/10.5/storage/innobase/include/sync0rw.ic:678
      #10 0x00005638cd08a666 in buf_page_mtr_lock (block=0x7f046781c750, rw_latch=4, mtr=0x7f0465ff92d0, file=0x5638cd7487c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=227) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:2989
      #11 0x00005638cd08c279 in buf_page_get_low (page_id=..., zip_size=0, rw_latch=4, guess=0x0, mode=10, file=0x5638cd7487c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=227, mtr=0x7f0465ff92d0, err=0x7f0465ff91cc, allow_ibuf_merge=false) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:3571
      #12 0x00005638cd08c5f2 in buf_page_get_gen (page_id=..., zip_size=0, rw_latch=4, guess=0x0, mode=10, file=0x5638cd7487c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=227, mtr=0x7f0465ff92d0, err=0x7f0465ff91cc, allow_ibuf_merge=false) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:3640
      #13 0x00005638ccdda754 in btr_block_get_func (index=..., page=3, mode=4, merge=false, file=0x5638cd7487c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=227, mtr=0x7f0465ff92d0) at /data/src/10.5/storage/innobase/include/btr0btr.h:240
      #14 0x00005638cd01fbf1 in btr_root_block_get (index=0x7f04580165a8, mode=RW_SX_LATCH, mtr=0x7f0465ff92d0) at /data/src/10.5/storage/innobase/btr/btr0btr.cc:226
      #15 0x00005638cd020a60 in btr_get_size (index=0x7f04580165a8, flag=2, mtr=0x7f0465ff92d0) at /data/src/10.5/storage/innobase/btr/btr0btr.cc:603
      #16 0x00005638cd102ffb in dict_stats_update_transient_for_index (index=0x7f04580165a8) at /data/src/10.5/storage/innobase/dict/dict0stats.cc:858
      #17 0x00005638cd103329 in dict_stats_update_transient (table=0x7f04580148c8) at /data/src/10.5/storage/innobase/dict/dict0stats.cc:945
      #18 0x00005638cd109161 in dict_stats_update (table=0x7f04580148c8, stats_upd_option=DICT_STATS_RECALC_TRANSIENT) at /data/src/10.5/storage/innobase/dict/dict0stats.cc:3329
      #19 0x00005638ccd70daa in dict_stats_init (table=0x7f04580148c8) at /data/src/10.5/storage/innobase/include/dict0stats.ic:165
      #20 0x00005638ccd7ac54 in ha_innobase::open (this=0x7f0458011980, name=0x7f045800dae8 "./test/t1") at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:5830
      #21 0x00005638cc9224de in handler::ha_open (this=0x7f0458011980, table_arg=0x7f0458010698, name=0x7f045800dae8 "./test/t1", mode=2, test_if_locked=18, mem_root=0x0, partitions_to_open=0x0) at /data/src/10.5/sql/handler.cc:2954
      #22 0x00005638cc706c81 in open_table_from_share (thd=0x7f0458000ce8, share=0x7f045800d550, alias=0x7f045800ca28, db_stat=33, prgflag=8, ha_open_flags=18, outparam=0x7f0458010698, is_create_table=false, partitions_to_open=0x0) at /data/src/10.5/sql/table.cc:4186
      #23 0x00005638cc51be4a in open_table (thd=0x7f0458000ce8, table_list=0x7f045800c9e0, ot_ctx=0x7f0465ffa4d0) at /data/src/10.5/sql/sql_base.cc:1988
      #24 0x00005638cc552854 in open_purge_table (thd=0x7f0458000ce8, db=0x7f0465ffa560 "test", dblen=4, tb=0x7f0465ffa630 "t1", tblen=2) at /data/src/10.5/sql/sql_class.cc:4730
      #25 0x00005638ccd983ba in innodb_find_table_for_vc (thd=0x7f0458000ce8, table=0x7f04580148c8) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:20642
      #26 0x00005638ccd98989 in innobase_allocate_row_for_vcol (thd=0x7f0458000ce8, index=0x7f04580173c8, heap=0x7f0465ffa7a0, table=0x7f0465ffa7b0, record=0x7f0465ffa7b8, storage=0x7f0465ffa7a8) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:20785
      #27 0x00005638ccf9a6cb in row_vers_build_clust_v_col (row=0x7f045800c558, clust_index=0x7f04580165a8, index=0x7f04580173c8, heap=0x7f045800c4b8) at /data/src/10.5/storage/innobase/row/row0vers.cc:465
      #28 0x00005638ccf9b92c in row_vers_old_has_index_entry (also_curr=true, rec=0x7f0467d0807f "\200", mtr=0x7f0465ffa900, index=0x7f04580173c8, ientry=0x7f0458015c08, roll_ptr=1125899927290647, trx_id=0) at /data/src/10.5/storage/innobase/row/row0vers.cc:929
      #29 0x00005638ccf5ab20 in row_purge_poss_sec (node=0x5638d00ec6d8, index=0x7f04580173c8, entry=0x7f0458015c08, sec_pcur=0x7f0465ffae30, sec_mtr=0x7f0465ffb0d0, is_tree=false) at /data/src/10.5/storage/innobase/row/row0purge.cc:245
      #30 0x00005638ccf5b4c0 in row_purge_remove_sec_if_poss_leaf (node=0x5638d00ec6d8, index=0x7f04580173c8, entry=0x7f0458015c08) at /data/src/10.5/storage/innobase/row/row0purge.cc:466
      #31 0x00005638ccf5b9ac in row_purge_remove_sec_if_poss (node=0x5638d00ec6d8, index=0x7f04580173c8, entry=0x7f0458015c08) at /data/src/10.5/storage/innobase/row/row0purge.cc:568
      #32 0x00005638ccf5bbbd in row_purge_del_mark (node=0x5638d00ec6d8) at /data/src/10.5/storage/innobase/row/row0purge.cc:638
      #33 0x00005638ccf5d5e0 in row_purge_record_func (node=0x5638d00ec6d8, undo_rec=0x5638d00fbd60 "", thr=0x5638d00ec630, updated_extern=false) at /data/src/10.5/storage/innobase/row/row0purge.cc:1048
      #34 0x00005638ccf5d8a2 in row_purge (node=0x5638d00ec6d8, undo_rec=0x5638d00fbd60 "", thr=0x5638d00ec630) at /data/src/10.5/storage/innobase/row/row0purge.cc:1109
      #35 0x00005638ccf5da21 in row_purge_step (thr=0x5638d00ec630) at /data/src/10.5/storage/innobase/row/row0purge.cc:1158
      #36 0x00005638ccec873e in que_thr_step (thr=0x5638d00ec630) at /data/src/10.5/storage/innobase/que/que0que.cc:947
      #37 0x00005638ccec89d5 in que_run_threads_low (thr=0x5638d00ec630) at /data/src/10.5/storage/innobase/que/que0que.cc:1009
      #38 0x00005638ccec8c25 in que_run_threads (thr=0x5638d00ec630) at /data/src/10.5/storage/innobase/que/que0que.cc:1049
      #39 0x00005638ccfa462b in srv_task_execute () at /data/src/10.5/storage/innobase/srv/srv0srv.cc:2030
      #40 0x00005638ccfa4e29 in purge_worker_callback () at /data/src/10.5/storage/innobase/srv/srv0srv.cc:2195
      #41 0x00005638cd1c01d4 in tpool::task_group::execute (this=0x5638cea0d0e0 <purge_task_group>, t=0x5638cea0ce60 <purge_worker_task>) at /data/src/10.5/tpool/task_group.cc:55
      #42 0x00005638cd1c058a in tpool::task::execute (this=0x5638cea0ce60 <purge_worker_task>) at /data/src/10.5/tpool/task.cc:47
      #43 0x00005638cd1b9d72 in tpool::thread_pool_generic::worker_main (this=0x5638cff480b0, thread_var=0x5638cff57bc0) at /data/src/10.5/tpool/tpool_generic.cc:518
      #44 0x00005638cd1bffe5 in std::__invoke_impl<void, void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(std::__invoke_memfun_deref, void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) (__f=@0x7f0468001ee8: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x5638cd1b9cda <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __t=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x82096fb>, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x8209707>) at /usr/include/c++/6/functional:227
      #45 0x00005638cd1bff57 in std::__invoke<void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) (__fn=@0x7f0468001ee8: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x5638cd1b9cda <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x82096fb>, __args#1=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x8209707>) at /usr/include/c++/6/functional:251
      #46 0x00005638cd1bfeeb in std::_Mem_fn_base<void (tpool::thread_pool_generic::*)(tpool::worker_data*), true>::operator()<tpool::thread_pool_generic*, tpool::worker_data*>(tpool::thread_pool_generic*&&, tpool::worker_data*&&) const (this=0x7f0468001ee8, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x82096fb>, __args#1=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x8209707>) at /usr/include/c++/6/functional:604
      #47 0x00005638cd1bfe9d in std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=0x7f0468001ed8) at /usr/include/c++/6/functional:1391
      #48 0x00005638cd1bfd9b in std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)>::operator()() (this=0x7f0468001ed8) at /usr/include/c++/6/functional:1380
      #49 0x00005638cd1bfd7a in std::thread::_State_impl<std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)> >::_M_run() (this=0x7f0468001ed0) at /usr/include/c++/6/thread:197
      #50 0x00007f0473104e6f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #51 0x00007f04747454a4 in start_thread (arg=0x7f0465ffc700) at pthread_create.c:456
      #52 0x00007f0472879d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Test case 2 fails with a slightly different assertion on 10.5 debug and seemingly passes on 10.5 non-debug:

      10.5 debug 65b93cef

      mariadbd: /data/src/10.5/storage/innobase/include/sync0rw.ic:288: void rw_lock_s_lock_func(rw_lock_t*, ulint, const char*, unsigned int): Assertion `!rw_lock_own_flagged(lock, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S)' failed.
      200626 16:16:30 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fdcc2a47f12 in __GI___assert_fail (assertion=0x55591f1343e0 "!rw_lock_own_flagged(lock, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S)", file=0x55591f1343a8 "/data/src/10.5/storage/innobase/include/sync0rw.ic", line=288, function=0x55591f138de0 <_ZZL19rw_lock_s_lock_funcP9rw_lock_tmPKcjE19__PRETTY_FUNCTION__> "void rw_lock_s_lock_func(rw_lock_t*, ulint, const char*, unsigned int)") at assert.c:101
      #8  0x000055591ea4b332 in rw_lock_s_lock_func (lock=0x7fdcbc2807d0, pass=0, file_name=0x55591f1117c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=1288) at /data/src/10.5/storage/innobase/include/sync0rw.ic:288
      #9  0x000055591ea4bf9b in pfs_rw_lock_s_lock_func (lock=0x7fdcbc2807d0, pass=0, file_name=0x55591f1117c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=1288) at /data/src/10.5/storage/innobase/include/sync0rw.ic:644
      #10 0x000055591ea53639 in buf_page_mtr_lock (block=0x7fdcbc280750, rw_latch=1, mtr=0x7fdcb63f4650, file=0x55591f1117c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=1288) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:2985
      #11 0x000055591ea55279 in buf_page_get_low (page_id=..., zip_size=0, rw_latch=1, guess=0x0, mode=10, file=0x55591f1117c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=1288, mtr=0x7fdcb63f4650, err=0x0, allow_ibuf_merge=false) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:3571
      #12 0x000055591ea555f2 in buf_page_get_gen (page_id=..., zip_size=0, rw_latch=1, guess=0x0, mode=10, file=0x55591f1117c8 "/data/src/10.5/storage/innobase/btr/btr0btr.cc", line=1288, mtr=0x7fdcb63f4650, err=0x0, allow_ibuf_merge=false) at /data/src/10.5/storage/innobase/buf/buf0buf.cc:3640
      #13 0x000055591e9ec4aa in btr_read_autoinc_with_fallback (table=0x7fdc9c0148d8, col_no=0) at /data/src/10.5/storage/innobase/btr/btr0btr.cc:1285
      #14 0x000055591e743865 in initialize_auto_increment (table=0x7fdc9c0148d8, field=0x7fdc9c00e0b0) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:5755
      #15 0x000055591e744532 in ha_innobase::open (this=0x7fdc9c011f60, name=0x7fdc9c00daf8 "./test/t1") at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:6008
      #16 0x000055591e2eb4de in handler::ha_open (this=0x7fdc9c011f60, table_arg=0x7fdc9c0110e8, name=0x7fdc9c00daf8 "./test/t1", mode=2, test_if_locked=18, mem_root=0x0, partitions_to_open=0x0) at /data/src/10.5/sql/handler.cc:2954
      #17 0x000055591e0cfc81 in open_table_from_share (thd=0x7fdc9c000cf8, share=0x7fdc9c00d560, alias=0x7fdc9c00ca38, db_stat=33, prgflag=8, ha_open_flags=18, outparam=0x7fdc9c0110e8, is_create_table=false, partitions_to_open=0x0) at /data/src/10.5/sql/table.cc:4186
      #18 0x000055591dee4e4a in open_table (thd=0x7fdc9c000cf8, table_list=0x7fdc9c00c9f0, ot_ctx=0x7fdcb63f54d0) at /data/src/10.5/sql/sql_base.cc:1988
      #19 0x000055591df1b854 in open_purge_table (thd=0x7fdc9c000cf8, db=0x7fdcb63f5560 "test", dblen=4, tb=0x7fdcb63f5630 "t1", tblen=2) at /data/src/10.5/sql/sql_class.cc:4730
      #20 0x000055591e7613ba in innodb_find_table_for_vc (thd=0x7fdc9c000cf8, table=0x7fdc9c0148d8) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:20642
      #21 0x000055591e761989 in innobase_allocate_row_for_vcol (thd=0x7fdc9c000cf8, index=0x7fdc9c0180e8, heap=0x7fdcb63f57a0, table=0x7fdcb63f57b0, record=0x7fdcb63f57b8, storage=0x7fdcb63f57a8) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:20785
      #22 0x000055591e9636cb in row_vers_build_clust_v_col (row=0x7fdc9c00c568, clust_index=0x7fdc9c0165b8, index=0x7fdc9c0180e8, heap=0x7fdc9c00c4c8) at /data/src/10.5/storage/innobase/row/row0vers.cc:465
      #23 0x000055591e96492c in row_vers_old_has_index_entry (also_curr=true, rec=0x7fdcbc76c07f "\200", mtr=0x7fdcb63f5900, index=0x7fdc9c0180e8, ientry=0x7fdc9c015c18, roll_ptr=1970324857618918, trx_id=0) at /data/src/10.5/storage/innobase/row/row0vers.cc:929
      #24 0x000055591e923b20 in row_purge_poss_sec (node=0x55592129c6f8, index=0x7fdc9c0180e8, entry=0x7fdc9c015c18, sec_pcur=0x7fdcb63f5e30, sec_mtr=0x7fdcb63f60d0, is_tree=false) at /data/src/10.5/storage/innobase/row/row0purge.cc:245
      #25 0x000055591e9244c0 in row_purge_remove_sec_if_poss_leaf (node=0x55592129c6f8, index=0x7fdc9c0180e8, entry=0x7fdc9c015c18) at /data/src/10.5/storage/innobase/row/row0purge.cc:466
      #26 0x000055591e9249ac in row_purge_remove_sec_if_poss (node=0x55592129c6f8, index=0x7fdc9c0180e8, entry=0x7fdc9c015c18) at /data/src/10.5/storage/innobase/row/row0purge.cc:568
      #27 0x000055591e924bbd in row_purge_del_mark (node=0x55592129c6f8) at /data/src/10.5/storage/innobase/row/row0purge.cc:638
      #28 0x000055591e9265e0 in row_purge_record_func (node=0x55592129c6f8, undo_rec=0x7fdca4009330 "", thr=0x55592129c650, updated_extern=false) at /data/src/10.5/storage/innobase/row/row0purge.cc:1048
      #29 0x000055591e9268a2 in row_purge (node=0x55592129c6f8, undo_rec=0x7fdca4009330 "", thr=0x55592129c650) at /data/src/10.5/storage/innobase/row/row0purge.cc:1109
      #30 0x000055591e926a21 in row_purge_step (thr=0x55592129c650) at /data/src/10.5/storage/innobase/row/row0purge.cc:1158
      #31 0x000055591e89173e in que_thr_step (thr=0x55592129c650) at /data/src/10.5/storage/innobase/que/que0que.cc:947
      #32 0x000055591e8919d5 in que_run_threads_low (thr=0x55592129c650) at /data/src/10.5/storage/innobase/que/que0que.cc:1009
      #33 0x000055591e891c25 in que_run_threads (thr=0x55592129c650) at /data/src/10.5/storage/innobase/que/que0que.cc:1049
      #34 0x000055591e96d62b in srv_task_execute () at /data/src/10.5/storage/innobase/srv/srv0srv.cc:2030
      #35 0x000055591e96de29 in purge_worker_callback () at /data/src/10.5/storage/innobase/srv/srv0srv.cc:2195
      #36 0x000055591eb891d4 in tpool::task_group::execute (this=0x5559203d60e0 <purge_task_group>, t=0x5559203d5e60 <purge_worker_task>) at /data/src/10.5/tpool/task_group.cc:55
      #37 0x000055591eb8958a in tpool::task::execute (this=0x5559203d5e60 <purge_worker_task>) at /data/src/10.5/tpool/task.cc:47
      #38 0x000055591eb82d72 in tpool::thread_pool_generic::worker_main (this=0x5559210f8150, thread_var=0x555921107be0) at /data/src/10.5/tpool/tpool_generic.cc:518
      #39 0x000055591eb88fe5 in std::__invoke_impl<void, void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(std::__invoke_memfun_deref, void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) (__f=@0x5559212cd458: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x55591eb82cda <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __t=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x82096fb>, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x8209707>) at /usr/include/c++/6/functional:227
      #40 0x000055591eb88f57 in std::__invoke<void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) (__fn=@0x5559212cd458: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x55591eb82cda <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x82096fb>, __args#1=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x8209707>) at /usr/include/c++/6/functional:251
      #41 0x000055591eb88eeb in std::_Mem_fn_base<void (tpool::thread_pool_generic::*)(tpool::worker_data*), true>::operator()<tpool::thread_pool_generic*, tpool::worker_data*>(tpool::thread_pool_generic*&&, tpool::worker_data*&&) const (this=0x5559212cd458, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x82096fb>, __args#1=<unknown type in /data/bld/10.5-debug-nightly/bin/mariadbd, CU 0x81f7f83, DIE 0x8209707>) at /usr/include/c++/6/functional:604
      #42 0x000055591eb88e9d in std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=0x5559212cd448) at /usr/include/c++/6/functional:1391
      #43 0x000055591eb88d9b in std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)>::operator()() (this=0x5559212cd448) at /usr/include/c++/6/functional:1380
      #44 0x000055591eb88d7a in std::thread::_State_impl<std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)> >::_M_run() (this=0x5559212cd440) at /usr/include/c++/6/thread:197
      #45 0x00007fdcc338fe6f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #46 0x00007fdcc49d04a4 in start_thread (arg=0x7fdcb63f7700) at pthread_create.c:456
      #47 0x00007fdcc2b04d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Attachments

        1. threads.txt
          45 kB
          Elena Stepanova

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              elenst Elena Stepanova
              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.