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

Crash when ALTER TABLE on parent runs concurrently with INSERT on child

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Found this issue in 10.11 and generated a RR trace

      GIT_SHOW: HEAD -> 10.11, origin/bb-10.11-MDEV-26115, origin/10.11 852e4510fa662c571a42f550278d4abd09e3c5cf 2025-07-23T09:34:47+07:00

      Thread 3 received signal SIGABRT, Aborted.
      [Switching to Thread 3356573.3360704]
      __pthread_kill_implementation (no_tid=0, signo=6, threadid=139698330416704) at ./nptl/pthread_kill.c:44
      44      ./nptl/pthread_kill.c: No such file or directory.
      (rr) set print addr off
      (rr) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=139698330416704) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=139698330416704) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=139698330416704, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  __GI_abort () at ./stdlib/abort.c:79
      #5  ut_dbg_assertion_failed (expr=expr@entry="list.count > 0", file=file@entry="/data/Server/10.11_new/storage/innobase/include/ut0lst.h", line=line@entry=333) at /data/Server/10.11_new/storage/innobase/ut/ut0dbg.cc:60
      #6  ut_list_remove<ut_list_base<ib_lock_t, ut_list_node<ib_lock_t> lock_table_t::*>, TableLockGetNode> (list=..., node=..., get_node=...) at /data/Server/10.11_new/storage/innobase/include/ut0lst.h:333
      #7  ut_list_remove<ut_list_base<ib_lock_t, ut_list_node<ib_lock_t> lock_table_t::*>, TableLockGetNode> (list=..., elem=elem@entry=, get_node=...) at /data/Server/10.11_new/storage/innobase/include/ut0lst.h:372
      #8  lock_table_remove_low (lock=lock@entry=) at /data/Server/10.11_new/storage/innobase/lock/lock0lock.cc:3786
      #9  lock_table_dequeue (in_lock=in_lock@entry=, owns_wait_mutex=owns_wait_mutex@entry=false) at /data/Server/10.11_new/storage/innobase/lock/lock0lock.cc:4019
      #10 lock_release_try (trx=trx@entry=) at /data/Server/10.11_new/storage/innobase/lock/lock0lock.cc:4370
      #11 lock_release (trx=trx@entry=) at /data/Server/10.11_new/storage/innobase/lock/lock0lock.cc:4402
      #12 trx_t::release_locks (this=this@entry=) at /data/Server/10.11_new/storage/innobase/trx/trx0trx.cc:483
      #13 trx_t::commit_in_memory (mtr=, this=) at /data/Server/10.11_new/storage/innobase/trx/trx0trx.cc:1437
      #14 trx_t::commit_low (this=this@entry=, mtr=) at /data/Server/10.11_new/storage/innobase/trx/trx0trx.cc:1584
      #15 trx_t::commit_persist (this=this@entry=) at /data/Server/10.11_new/storage/innobase/trx/trx0trx.cc:1598
      #16 trx_t::commit (this=this@entry=) at /data/Server/10.11_new/storage/innobase/trx/trx0trx.cc:1607
      #17 trx_commit_for_mysql (trx=trx@entry=) at /data/Server/10.11_new/storage/innobase/trx/trx0trx.cc:1722
      #18 innobase_commit_low (trx=trx@entry=) at /data/Server/10.11_new/storage/innobase/handler/ha_innodb.cc:4331
      #19 innobase_commit_ordered_2 (trx=trx@entry=, thd=thd@entry=) at /data/Server/10.11_new/storage/innobase/handler/ha_innodb.cc:4428
      #20 innobase_commit (hton=<optimized out>, thd=, commit_trx=<optimized out>) at /data/Server/10.11_new/storage/innobase/handler/ha_innodb.cc:4578
      #21 commit_one_phase_2 (thd=thd@entry=, all=all@entry=true, trans=trans@entry=, is_real_trans=true) at /data/Server/10.11_new/sql/handler.cc:2186
      #22 ha_commit_one_phase (thd=thd@entry=, all=all@entry=true) at /data/Server/10.11_new/sql/handler.cc:2135
      #23 ha_commit_trans (thd=thd@entry=, all=all@entry=true) at /data/Server/10.11_new/sql/handler.cc:1927
      #24 trans_commit (thd=thd@entry=) at /data/Server/10.11_new/sql/transaction.cc:274
      #25 mysql_execute_command (thd=thd@entry=, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.11_new/sql/sql_parse.cc:5791
      #26 mysql_parse (thd=thd@entry=, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=) at /data/Server/10.11_new/sql/sql_parse.cc:8178
      #27 dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=, packet=packet@entry=" COMMIT  /* E_R Thread14 QNO 422 CON_ID 32 */ ", packet_length=packet_length@entry=46, blocking=blocking@entry=true)
          at /data/Server/10.11_new/sql/sql_parse.cc:1906
      #28 do_command (thd=thd@entry=, blocking=blocking@entry=true) at /data/Server/10.11_new/sql/sql_parse.cc:1419
      #29 do_handle_one_connection (connect=<optimized out>, connect@entry=, put_in_cache=put_in_cache@entry=true) at /data/Server/10.11_new/sql/sql_connect.cc:1386
      #30 handle_one_connection (arg=) at /data/Server/10.11_new/sql/sql_connect.cc:1298
      #31 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #32 clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
      

      RR trace is present on pluto
      /data/results/1754035426/TBR-1041

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              saahil Saahil Alam
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.