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

Assertion `!look_for_rollover || start_scan_slot != slot' failed in trx_assign_rseg_low

Details

    Description

      I am seeing two different stacks for this assertion:

      !look_for_rollover || start_scan_slot != slot|SIGABRT|trx_assign_rseg_low|trx_start_low|trx_start_if_not_started_xa_low|create_table_info_t::create_foreign_keys
      !look_for_rollover || start_scan_slot != slot|SIGABRT|trx_assign_rseg_low|trx_start_low|trx_start_internal_low|dict_stats_fetch_from_ps
      

      One in trx_start_if_not_started_xa_low and one in trx_start_internal_low. Full stacks for both:

      12 249b7e2a0440ae1eb3ba14c607bdb61393bd464e (Debug)

      mariadbd: /test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc:831: void trx_assign_rseg_low(trx_t*): Assertion `!look_for_rollover || start_scan_slot != slot' failed.
      

      12 249b7e2a0440ae1eb3ba14c607bdb61393bd464e (Debug)

      Core was generated by `/test/BASE_TODO-4632_EMD260324-mariadb-10.6.17-12-linux-x86_64-dbg/bin/mariadbd'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      [Current thread is 1 (LWP 3970599)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x0000151a62e3c406 in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x0000151a62e2287c in __GI_abort () at ./stdlib/abort.c:79
      #5  0x0000151a62e2279b in __assert_fail_base (fmt=0x151a62fb9f68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x557ca6eaaf08 "!look_for_rollover || start_scan_slot != slot", file=file@entry=0x557ca6eaad98 "/test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc", line=line@entry=831, function=function@entry=0x557ca6eaaea8 "void trx_assign_rseg_low(trx_t*)")at ./assert/assert.c:92
      #6  0x0000151a62e33b86 in __assert_fail (assertion=0x557ca6eaaf08 "!look_for_rollover || start_scan_slot != slot", file=0x557ca6eaad98 "/test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc", line=831, function=0x557ca6eaaea8 "void trx_assign_rseg_low(trx_t*)")at ./assert/assert.c:101
      #7  0x0000557ca68675f0 in trx_assign_rseg_low (trx=trx@entry=0x151a600cac80)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc:831
      #8  0x0000557ca6867c66 in trx_start_low (trx=0x151a600cac80, read_write=read_write@entry=true)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc:953
      #9  0x0000557ca686929f in trx_start_if_not_started_xa_low (trx=<optimized out>, read_write=read_write@entry=true)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc:2206
      #10 0x0000557ca6671430 in create_table_info_t::create_foreign_keys (this=this@entry=0x151a4cab9a20)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/handler/ha_innodb.cc:12746
      #11 0x0000557ca667195a in create_table_info_t::create_table (this=this@entry=0x151a4cab9a20, create_fk=create_fk@entry=true)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/handler/ha_innodb.cc:12887
      #12 0x0000557ca6672437 in ha_innobase::create (this=<optimized out>, name=<optimized out>, form=0x151a4cab9fd0, create_info=<optimized out>, file_per_table=<optimized out>, trx=0x151a600cac80, trx@entry=0x0)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/handler/ha_innodb.cc:13292
      #13 0x0000557ca6672469 in ha_innobase::create (this=<optimized out>, name=<optimized out>, form=<optimized out>, create_info=<optimized out>)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/handler/ha_innodb.cc:13336
      #14 0x0000557ca62dd9d1 in handler::ha_create (this=0x151a0c80e970, name=0x151a4cabb510 "/dev/shm/455104/1934/tmp/#sql-temptable-3c875a-b-170", form=form@entry=0x151a4cab9fd0, info_arg=info_arg@entry=0x151a4cabba70)at /test/10.6.17-12-TODO-4632_dbg/sql/handler.cc:5539
      #15 0x0000557ca62de6b3 in ha_create_table (thd=thd@entry=0x151a0c000d58, path=<optimized out>, db=<optimized out>, table_name=<optimized out>, create_info=create_info@entry=0x151a4cabba70, frm=frm@entry=0x151a4cabb500, skip_frm_file=<optimized out>)at /test/10.6.17-12-TODO-4632_dbg/sql/handler.cc:6007
      #16 0x0000557ca60d77a1 in create_table_impl (thd=thd@entry=0x151a0c000d58, ddl_log_state_create=0x0, ddl_log_state_create@entry=0x151a4cabb7a0, ddl_log_state_rm=<optimized out>, ddl_log_state_rm@entry=0x151a4cabb7c0, orig_db=@0x151a0c8db358: {str = 0x151a0c1c88d8 "test", length = 4}, orig_table_name=@0x151a0c8db368: {str = 0x151a0c1c88a0 "t2", length = 2}, db=@0x151a0c8db358: {str = 0x151a0c1c88d8 "test", length = 4}, table_name=@0x151a0c8db368: {str = 0x151a0c1c88a0 "t2", length = 2}, path=@0x151a4cabb4f0: {str = 0x151a4cabb510 "/dev/shm/455104/1934/tmp/#sql-temptable-3c875a-b-170", length = 52}, options=<optimized out>, create_info=0x151a4cabba70, alter_info=0x151a4cabb900, create_table_mode=0, is_trans=0x151a4cabb79f, key_info=0x151a4cabb4e8, key_count=0x151a4cabb4e4, frm=0x151a4cabb500)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_table.cc:4568
      #17 0x0000557ca60d7b95 in mysql_create_table_no_lock (thd=thd@entry=0x151a0c000d58, ddl_log_state_create=ddl_log_state_create@entry=0x151a4cabb7a0, ddl_log_state_rm=ddl_log_state_rm@entry=0x151a4cabb7c0, create_info=create_info@entry=0x151a4cabba70, alter_info=alter_info@entry=0x151a4cabb900, is_trans=is_trans@entry=0x151a4cabb79f, create_table_mode=0, table_list=0x151a0c8db340)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_table.cc:4667
      #18 0x0000557ca60d7f83 in mysql_create_table (thd=thd@entry=0x151a0c000d58, create_table=create_table@entry=0x151a0c8db340, create_info=create_info@entry=0x151a4cabba70, alter_info=alter_info@entry=0x151a4cabb900)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_table.cc:4844
      #19 0x0000557ca60d9d50 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x151a0c000d58)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_table.cc:12294
      #20 0x0000557ca5ff9efe in mysql_execute_command (thd=thd@entry=0x151a0c000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_parse.cc:6097
      #21 0x0000557ca5ffbb3a in mysql_parse (thd=thd@entry=0x151a0c000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x151a4cabc270)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_parse.cc:8144
      #22 0x0000557ca5ffe11f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151a0c000d58, packet=packet@entry=0x151a0c692c49 "CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb;", packet_length=packet_length@entry=72, blocking=blocking@entry=true)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_class.h:250
      #23 0x0000557ca600045c in do_command (thd=0x151a0c000d58, blocking=blocking@entry=true)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_parse.cc:1416
      #24 0x0000557ca6157dff in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557caa62b868, put_in_cache=put_in_cache@entry=true)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_connect.cc:1415
      #25 0x0000557ca61580fe in handle_one_connection (arg=arg@entry=0x557caa62b868)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_connect.cc:1317
      #26 0x0000557ca65a36e4 in pfs_spawn_thread (arg=0x557caa61fcd8)at /test/10.6.17-12-TODO-4632_dbg/storage/perfschema/pfs.cc:2201
      #27 0x0000151a62e8f18a in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444
      #28 0x0000151a62f1dbd0 in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      12 249b7e2a0440ae1eb3ba14c607bdb61393bd464e (Debug)

      Core was generated by `/test/BASE_TODO-4632_EMD260324-mariadb-10.6.17-12-linux-x86_64-dbg/bin/mariadbd'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      [Current thread is 1 (LWP 916972)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00001535ae83c406 in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00001535ae82287c in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00001535ae82279b in __assert_fail_base (fmt=0x1535ae9b9f68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55e21057ef08 "!look_for_rollover || start_scan_slot != slot", file=file@entry=0x55e21057ed98 "/test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc", line=line@entry=831, function=function@entry=0x55e21057eea8 "void trx_assign_rseg_low(trx_t*)")at ./assert/assert.c:92
      #6  0x00001535ae833b86 in __assert_fail (assertion=0x55e21057ef08 "!look_for_rollover || start_scan_slot != slot", file=0x55e21057ed98 "/test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc", line=831, function=0x55e21057eea8 "void trx_assign_rseg_low(trx_t*)")at ./assert/assert.c:101
      #7  0x000055e20ff3b5f0 in trx_assign_rseg_low (trx=trx@entry=0x1535a519d180)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc:831
      #8  0x000055e20ff3bc66 in trx_start_low (trx=trx@entry=0x1535a519d180, read_write=read_write@entry=false)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc:953
      #9  0x000055e20ff3d048 in trx_start_internal_low (trx=trx@entry=0x1535a519d180, read_write=read_write@entry=false)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/trx/trx0trx.cc:2264
      #10 0x000055e21002c0d7 in dict_stats_fetch_from_ps (table=0x153558d8f6e8)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/dict/dict0stats.cc:3870
      #11 dict_stats_update (table=table@entry=0x1535585afc98, stats_upd_option=<optimized out>)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/dict/dict0stats.cc:4175
      #12 0x000055e20fd342c8 in dict_stats_init (table=0x1535585afc98)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/include/dict0stats.inl:165
      #13 ha_innobase::info_low (this=this@entry=0x153558f8b2a0, flag=flag@entry=282, is_analyze=is_analyze@entry=false)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/handler/ha_innodb.cc:14811
      #14 0x000055e20fd35432 in ha_innobase::info (this=this@entry=0x153558f8b2a0, flag=flag@entry=282)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/handler/ha_innodb.cc:15075
      #15 0x000055e20fd3a70e in ha_innobase::open (this=<optimized out>, name=<optimized out>)at /test/10.6.17-12-TODO-4632_dbg/storage/innobase/handler/ha_innodb.cc:6197
      #16 0x000055e20f9ab193 in handler::ha_open (this=0x153558f8b2a0, table_arg=table_arg@entry=0x153558dd97b8, name=0x153558832fd0 "./test/foo", mode=mode@entry=2, test_if_locked=test_if_locked@entry=18, mem_root=mem_root@entry=0x0, partitions_to_open=0x0)at /test/10.6.17-12-TODO-4632_dbg/sql/handler.cc:3401
      #17 0x000055e20f7eb8ed in open_table_from_share (thd=thd@entry=0x153558000d58, share=share@entry=0x1535588329b0, alias=alias@entry=0x1535595b8528, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=0x153558dd97b8, is_create_table=false, partitions_to_open=0x0)at /test/10.6.17-12-TODO-4632_dbg/sql/table.cc:4441
      #18 0x000055e20f64bd0e in open_table (thd=thd@entry=0x153558000d58, table_list=table_list@entry=0x1535595b84e0, ot_ctx=ot_ctx@entry=0x1535a4e6b7a0)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_base.cc:2053
      #19 0x000055e20f64f0b5 in open_and_process_table (ot_ctx=0x1535a4e6b7a0, has_prelocking_list=false, prelocking_strategy=0x1535a4e6b890, flags=0, counter=0x1535a4e6b83c, tables=0x1535595b84e0, thd=0x153558000d58)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_base.cc:3867
      #20 open_tables (thd=thd@entry=0x153558000d58, options=@0x1535580066c0: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x1535a4e6b828, counter=counter@entry=0x1535a4e6b83c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x1535a4e6b890)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_base.cc:4354
      #21 0x000055e20f64ffad in open_and_lock_tables (thd=thd@entry=0x153558000d58, options=<optimized out>, tables=<optimized out>, tables@entry=0x1535595b84e0, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x1535a4e6b890)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_base.cc:5327
      #22 0x000055e20f6bc785 in open_and_lock_tables (flags=0, derived=true, tables=0x1535595b84e0, thd=0x153558000d58)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_base.h:515
      #23 execute_sqlcom_select (thd=thd@entry=0x153558000d58, all_tables=0x1535595b84e0)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_parse.cc:6297
      #24 0x000055e20f6c83fe in mysql_execute_command (thd=thd@entry=0x153558000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_parse.cc:3994
      #25 0x000055e20f6cfb3a in mysql_parse (thd=thd@entry=0x153558000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1535a4e6c270)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_parse.cc:8144
      #26 0x000055e20f6d211f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153558000d58, packet=packet@entry=0x1535595c87b9 "select * from foo;", packet_length=packet_length@entry=18, blocking=blocking@entry=true)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_class.h:250
      #27 0x000055e20f6d445c in do_command (thd=0x153558000d58, blocking=blocking@entry=true)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_parse.cc:1416
      #28 0x000055e20f82bdff in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e213901a68, put_in_cache=put_in_cache@entry=true)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_connect.cc:1415
      #29 0x000055e20f82c0fe in handle_one_connection (arg=arg@entry=0x55e213901a68)at /test/10.6.17-12-TODO-4632_dbg/sql/sql_connect.cc:1317
      #30 0x000055e20fc776e4 in pfs_spawn_thread (arg=0x55e2138f5ed8)at /test/10.6.17-12-TODO-4632_dbg/storage/perfschema/pfs.cc:2201
      #31 0x00001535ae88f18a in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444
      #32 0x00001535ae91dbd0 in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The trx_start_if_not_started_xa_low stack was also reproduced in CS 10.6.18 dbg @ 33af5575a976c86163752cce77dddb640ffeef00.
      The trx_start_internal_low stack was also reproduced in CS 10.6.18 dbg @ 0ccdf54b644352f42e1768bc660be7ab50c1e9d2 (trunk as of 24 April).
      All reduced testcases (still 100+ lines) have SET GLOBAL innodb_trx_rseg_n_slots_debug=1024; or =1025.
      Not immediately reproducible in 10.5 nor 11.5. Issue can be reproduced on single server without replication.

      Attachments

        Activity

          Roel Roel Van de Paar added a comment - - edited

          Created several rr traces for the trx_start_internal_low bug on 10.6 trunk as of today.
          The testcase reduction for this one was down to 79 lines and would not reduce any further.
          For reference, the testcase is also attached as MDEV-33917_trx_start_internal_low.sql.

          UniqueID:  !look_for_rollover || start_scan_slot != slot|SIGABRT|trx_assign_rseg_low|trx_start_low|trx_start_internal_low|dict_stats_fetch_from_p
          Revision:  10.6.18 0ccdf54b644352f42e1768bc660be7ab50c1e9d2 (Debug) build 25 April 24
          Binary:    /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd
          Options:   --no-defaults --sql_mode= --log_bin=binlog
          Traces:    On the usual rr server:
          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714007172679618019/subreducer/204/rr/mariadbd-5
          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/51/rr/mariadbd-5
          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/52/rr/mariadbd-5
          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/82/rr/mariadbd-5
          Matching cores:
          gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714007172679618019/subreducer/204/data/core
          gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/51/data/core
          gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/52/data/core
          gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/82/data/core
          If needed, there *may* also be viable additional traces and cores in:
          1714007172679618019/256
          1714007172679618019/237
          1714007172679618019/284
          1714010716451017294/205
          1714010716451017294/282
          

          marko ptal thanks.

          Roel Roel Van de Paar added a comment - - edited Created several rr traces for the trx_start_internal_low bug on 10.6 trunk as of today. The testcase reduction for this one was down to 79 lines and would not reduce any further. For reference, the testcase is also attached as MDEV-33917_trx_start_internal_low.sql . UniqueID: !look_for_rollover || start_scan_slot != slot|SIGABRT|trx_assign_rseg_low|trx_start_low|trx_start_internal_low|dict_stats_fetch_from_p Revision: 10.6.18 0ccdf54b644352f42e1768bc660be7ab50c1e9d2 (Debug) build 25 April 24 Binary: /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd Options: --no-defaults --sql_mode= --log_bin=binlog Traces: On the usual rr server: rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714007172679618019/subreducer/204/rr/mariadbd-5 rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/51/rr/mariadbd-5 rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/52/rr/mariadbd-5 rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/82/rr/mariadbd-5 Matching cores: gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714007172679618019/subreducer/204/data/core gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/51/data/core gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/52/data/core gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg/1714010716451017294/subreducer/82/data/core If needed, there *may* also be viable additional traces and cores in: 1714007172679618019/256 1714007172679618019/237 1714007172679618019/284 1714010716451017294/205 1714010716451017294/282 marko ptal thanks.
          Roel Roel Van de Paar added a comment - - edited

          Created several rr traces for the trx_start_if_not_started_xa_low bug on 10.6 trunk as well.
          The testcase reduction for this one was down to 47 lines and would not reduce any further.
          For reference, the testcase is also attached as MDEV-33917_trx_start_if_not_started_xa_low.sql.

          UniqueID:  !look_for_rollover || start_scan_slot != slot|SIGABRT|trx_assign_rseg_low|trx_start_low|trx_start_if_not_started_xa_low|create_table_info_t::create_foreign_keys
          Revision:  10.6.18 0ccdf54b644352f42e1768bc660be7ab50c1e9d2 (Debug) build 25 April 24
          Binary:    /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd   # Note the _2 suffix
          Options:   --no-defaults --core-file --sql_mode= --innodb-buffer-pool-size=200M --gtid_strict_mode=1 --relay-log=relaylog --log_bin=binlog --binlog_format=MIXED  # Likely not all necessary
          Traces:    On the usual rr server:
          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/192/rr/mariadbd-5
          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/218/rr/mariadbd-5
          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/297/rr/mariadbd-5
          Matching cores:
          gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/192/data/core
          gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/218/data/core
          gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/297/data/core
          

          marko ptal at this one as well thanks.

          Roel Roel Van de Paar added a comment - - edited Created several rr traces for the trx_start_if_not_started_xa_low bug on 10.6 trunk as well. The testcase reduction for this one was down to 47 lines and would not reduce any further. For reference, the testcase is also attached as MDEV-33917_trx_start_if_not_started_xa_low.sql . UniqueID: !look_for_rollover || start_scan_slot != slot|SIGABRT|trx_assign_rseg_low|trx_start_low|trx_start_if_not_started_xa_low|create_table_info_t::create_foreign_keys Revision: 10.6.18 0ccdf54b644352f42e1768bc660be7ab50c1e9d2 (Debug) build 25 April 24 Binary: /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd # Note the _2 suffix Options: --no-defaults --core-file --sql_mode= --innodb-buffer-pool-size=200M --gtid_strict_mode=1 --relay-log=relaylog --log_bin=binlog --binlog_format=MIXED # Likely not all necessary Traces: On the usual rr server: rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/192/rr/mariadbd-5 rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/218/rr/mariadbd-5 rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/297/rr/mariadbd-5 Matching cores: gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/192/data/core gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/218/data/core gdb /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/bin/mariadbd /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/297/data/core marko ptal at this one as well thanks.
          Roel Roel Van de Paar added a comment - - edited

          Btw, there is little/no point in trying to run the testcases outright; it requires a specific setup.

          NTS: reducer_nts and _2 in /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg and _2 on rr

          Roel Roel Van de Paar added a comment - - edited Btw, there is little/no point in trying to run the testcases outright; it requires a specific setup. NTS: reducer_nts and _2 in /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg and _2 on rr

          In the first trace that I checked:

          rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/192/rr/mariadbd-5
          

          the error is triggered at the very last statement, which matches the MDEV-33917_trx_start_if_not_started_xa_low.sql. The file ends in the following:

          set global innodb_trx_rseg_n_slots_debug=1024;
          CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb;; ;
          

          There is one CREATE TEMPORARY TABLE statement earlier in the test. There is no other statement referring to either temporary table.

          Any operations on temporary tables should not cause any changes to persistent InnoDB pages. Here it is complete nonsense to allocate a transaction for creating FOREIGN KEY constraints if needed. Such constraints cannot exist on temporary tables.

          #6  0x000055c06b489f99 in trx_start_if_not_started_xa_low (
              trx=<optimized out>, read_write=read_write@entry=true)
              at /test/10.6_dbg/storage/innobase/trx/trx0trx.cc:2197
          #7  0x000055c06b260db4 in create_table_info_t::create_foreign_keys (
              this=this@entry=0x6c4868a1fa20)
              at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:12722
          #8  0x000055c06b26131a in create_table_info_t::create_table (
              this=this@entry=0x6c4868a1fa20, create_fk=create_fk@entry=true)
              at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:12863
          #9  0x000055c06b261e5c in ha_innobase::create (this=<optimized out>, 
              name=0x6c4868a21500 "/dev/shm/1714014629599974842/subreducer/192/tmp/#sql-temptable-331118-8-1", form=0x6c4868a1ffd0, create_info=0x6c4868a21a60, 
              file_per_table=<optimized out>, trx=0x69c460dfcc80, trx@entry=0x0)
              at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:13268
          

          marko Marko Mäkelä added a comment - In the first trace that I checked: rr replay /test/MD250424-mariadb-10.6.18-linux-x86_64-dbg_2/1714014629599974842/subreducer/192/rr/mariadbd-5 the error is triggered at the very last statement, which matches the MDEV-33917_trx_start_if_not_started_xa_low.sql . The file ends in the following: set global innodb_trx_rseg_n_slots_debug=1024; CREATE TEMPORARY TABLE t2 (a int , b int , primary key (a)) engine=innodb;; ; There is one CREATE TEMPORARY TABLE statement earlier in the test. There is no other statement referring to either temporary table. Any operations on temporary tables should not cause any changes to persistent InnoDB pages. Here it is complete nonsense to allocate a transaction for creating FOREIGN KEY constraints if needed. Such constraints cannot exist on temporary tables. #6 0x000055c06b489f99 in trx_start_if_not_started_xa_low ( trx=<optimized out>, read_write=read_write@entry=true) at /test/10.6_dbg/storage/innobase/trx/trx0trx.cc:2197 #7 0x000055c06b260db4 in create_table_info_t::create_foreign_keys ( this=this@entry=0x6c4868a1fa20) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:12722 #8 0x000055c06b26131a in create_table_info_t::create_table ( this=this@entry=0x6c4868a1fa20, create_fk=create_fk@entry=true) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:12863 #9 0x000055c06b261e5c in ha_innobase::create (this=<optimized out>, name=0x6c4868a21500 "/dev/shm/1714014629599974842/subreducer/192/tmp/#sql-temptable-331118-8-1", form=0x6c4868a1ffd0, create_info=0x6c4868a21a60, file_per_table=<optimized out>, trx=0x69c460dfcc80, trx@entry=0x0) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:13268

          The rr replay trace no longer works.

          marko Marko Mäkelä added a comment - The rr replay trace no longer works.

          People

            marko Marko Mäkelä
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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