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

Debug assert failure in Wsrep patch of row_upd_sec_index_entry

Details

    Description

      Local abort of an DML operation because of MDL conflict causes debug assert in InnoDB to fire:

      2023-12-07 14:33:12 19 [Note] WSREP: MDL conflict·
      schema:  test
      request: (19    seqno 712   wsrep (toi, exec, committed) cmd 3 3    ALTER TABLE tt_1_fk ADD COLUMN vN252 VARCHAR(11), LOCK=NONE, ALGORITHM=DEFAULT)
      granted: (23    seqno -1    wsrep (local, exec, executing) cmd 3 7  DELETE FROM tt_1_fk)
      2023-12-07 14:33:12 19 [Note] WSREP: MDL ticket: type: MDL_SHARED_WRITE space: TABLE db: test name: tt_1_fk (Waiting for table metadata lock)
      2023-12-07 14:33:12 24 [Note] WSREP: before_rollback_enter
          server: 49c6efec-94f4-11ee-b183-3f81ba368dc3, client: 24, state: exec, mode: local
          trx_id: 4183, seqno: -1, flags: 1
          state: must_abort, bfa_state: executing, error: success, status: 0
          is_sr: 0, frags: 0, frags size: 0, unit: 0, size: 0, counter: 0, log_pos: 0, sr_rb: 0
          own: 1 thread_id: 7fb0bc1f8700
      2023-12-07 14:33:12 19 [Note] WSREP: MDL conflict-> BF abort
      schema:  test
      request: (19    seqno 712   wsrep (toi, exec, committed) cmd 3 3    ALTER TABLE tt_1_fk ADD COLUMN vN252 VARCHAR(11), LOCK=NONE, ALGORITHM=DEFAULT)
      granted: (23    seqno -1    wsrep (local, exec, executing) cmd 3 7  DELETE FROM tt_1_fk)
      2023-12-07 14:33:12 24 [Note] WSREP: client: 24 txc: 4183 state: must_abort -> aborting
      2023-12-07 14:33:12 19 [Note] WSREP: MDL ticket: type: MDL_SHARED_WRITE space: TABLE db: test name: tt_1_fk (Waiting for table metadata lock)
      2023-12-07 14:33:12 24 [Note] WSREP: before_rollback_leave
          server: 49c6efec-94f4-11ee-b183-3f81ba368dc3, client: 24, state: exec, mode: local
          trx_id: 4183, seqno: -1, flags: 1
          state: aborting, bfa_state: executing, error: success, status: 0
          is_sr: 0, frags: 0, frags size: 0, unit: 0, size: 0, counter: 0, log_pos: 0, sr_rb: 0
          own: 1 thread_id: 7fb0bc1f8700
      2023-12-07 14:33:12 19 [Note] WSREP: Seqno -1 successfully BF aborted 4195 victim_seqno -1
      2023-12-07 14:33:12 19 [Note] WSREP: client: 23 txc: 4195 state: executing -> must_abort
      2023-12-07 14:33:12 19 [Note] WSREP: wsrep_abort_thd, by: 140397090907904, victim: 140397089679104
      2023-12-07 14:33:12 23 [ERROR] WSREP: Foreign key check fail: Operation interrupted on table tt_1_fki0 index test/tt_1_fk query DELETE FROM tt_1_fk
      mysqld: /home/denis/dev/mariadb-server-features/storage/innobase/row/row0upd.cc:2509: dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*): Assertion `err == DB_SUCCESS || err == DB_LOCK_W
      T@32   : 14:33:12.355455 row_upd: error: handling fatal signal
      231207 14:33:12 [ERROR] mysqld got signal 6 ;
      

      Stacktrace:

      mysys/stacktrace.c:174(my_print_stacktrace)[0x55b1fa5dea0d]
      sql/signal_handler.cc:235(handle_fatal_signal)[0x55b1f9e0d74a]
      sigaction.c:0(__restore_rt)[0x7fb0d2650420]
      addr2line: DWARF error: section .debug_info is larger than its filesize! (0x93ef57 vs 0x530f28)
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fb0d215600b]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7fb0d2135859]
      /lib/x86_64-linux-gnu/libc.so.6(+0x22729)[0x7fb0d2135729]
      /lib/x86_64-linux-gnu/libc.so.6(+0x33fd6)[0x7fb0d2146fd6]
      row/row0upd.cc:2577(row_upd_sec_index_entry(upd_node_t*, que_thr_t*))[0x55b1fa33b659]
      row/row0upd.cc:2598(row_upd_step(que_thr_t*))[0x55b1fa33bbec]
      row/row0mysql.cc:1804(row_update_for_mysql(row_prebuilt_t*))[0x55b1fa2e8234]
      handler/ha_innodb.cc:9081(ha_innobase::delete_row(unsigned char const*))[0x55b1fa177904]
      sql/handler.cc:6992(handler::ha_delete_row(unsigned char const*))[0x55b1f9e21836]
      sql/sql_delete.cc:292(TABLE::delete_row())[0x55b1f9fa8fc8]
      sql/sql_delete.cc:826(mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*))[0x55b1f9fa82cd]
      sql/sql_parse.cc:4819(mysql_execute_command(THD*))[0x55b1f9b80c27]
      sql/sql_parse.cc:8062(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b1f9b880d4]
      sql/sql_class.h:4050(THD::get_stmt_da())[0x55b1f9b88bcf]
      sql/sql_parse.cc:1843(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b1f9b8b302]
      sql/sql_parse.cc:1379(do_command(THD*))[0x55b1f9b8ebca]
      sql/sql_connect.cc:1419(do_handle_one_connection(CONNECT*))[0x55b1f9cc00ca]
      sql/sql_connect.cc:1325(handle_one_connection)[0x55b1f9cc0191]
      perfschema/pfs.cc:1872(pfs_spawn_thread)[0x55b1fa103c90]
      nptl/pthread_create.c:478(start_thread)[0x7fb0d2644609]
      addr2line: DWARF error: section .debug_info is larger than its filesize! (0x93ef57 vs 0x530f28)
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7fb0d2232133]
      

      Attachments

        Activity

          denis.protivensky Denis Protivensky created issue -
          denis.protivensky Denis Protivensky added a comment - - edited

          The issue is that DB_INTERRUPTED is unexpected as the return code from wsrep_row_upd_check_foreign_constraints call.

          denis.protivensky Denis Protivensky added a comment - - edited The issue is that DB_INTERRUPTED is unexpected as the return code from wsrep_row_upd_check_foreign_constraints call.
          denis.protivensky Denis Protivensky made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          denis.protivensky Denis Protivensky added a comment - - edited The fix: https://github.com/MariaDB/server/pull/2908
          denis.protivensky Denis Protivensky made changes -
          Assignee Denis Protivensky [ JIRAUSER52676 ] Julius Goryavsky [ sysprg ]
          denis.protivensky Denis Protivensky made changes -
          Status In Progress [ 3 ] In Testing [ 10301 ]
          sysprg Julius Goryavsky added a comment - - edited Thanks, fix merged with head revision: https://github.com/MariaDB/server/commit/ddd8a90812e8ab7675b989696023e0a9966b6409
          sysprg Julius Goryavsky made changes -
          Status In Testing [ 10301 ] Stalled [ 10000 ]
          sysprg Julius Goryavsky made changes -
          issue.field.resolutiondate 2023-12-20 12:40:42.0 2023-12-20 12:40:42.412
          sysprg Julius Goryavsky made changes -
          Fix Version/s 10.4.33 [ 29516 ]
          Fix Version/s 10.4 [ 22408 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          JIraAutomate JiraAutomate made changes -
          Fix Version/s 10.5.24 [ 29517 ]
          Fix Version/s 10.6.17 [ 29518 ]
          Fix Version/s 10.11.7 [ 29519 ]
          Fix Version/s 11.0.5 [ 29520 ]
          Fix Version/s 11.1.4 [ 29024 ]
          Fix Version/s 11.2.3 [ 29521 ]
          sysprg Julius Goryavsky added a comment - - edited

          Reopend by request from the Codership - additional correction is required

          sysprg Julius Goryavsky added a comment - - edited Reopend by request from the Codership - additional correction is required
          sysprg Julius Goryavsky made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Stalled [ 10000 ]
          sysprg Julius Goryavsky made changes -
          Assignee Julius Goryavsky [ sysprg ] Denis Protivensky [ JIRAUSER52676 ]
          sysprg Julius Goryavsky made changes -
          Priority Trivial [ 5 ] Critical [ 2 ]

          what kind of correction?

          serg Sergei Golubchik added a comment - what kind of correction?
          denis.protivensky Denis Protivensky added a comment - - edited

          serg I was asked to provide an MTR test for the fix, although the change is trivial and affects debug-only builds. Working on an MTR test will require some time.

          denis.protivensky Denis Protivensky added a comment - - edited serg I was asked to provide an MTR test for the fix, although the change is trivial and affects debug-only builds. Working on an MTR test will require some time.

          feel free to work on the test case still, but the fix is pushed and the release is ready, your test case will be in the next release, but I'm closing with the FixVersion of where the actual fix is.

          serg Sergei Golubchik added a comment - feel free to work on the test case still, but the fix is pushed and the release is ready, your test case will be in the next release, but I'm closing with the FixVersion of where the actual fix is.
          serg Sergei Golubchik made changes -
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 11.3.2 [ 29522 ]
          julien.fritsch Julien Fritsch made changes -
          Component/s Tests [ 10800 ]
          sysprg Julius Goryavsky made changes -
          Assignee Denis Protivensky [ JIRAUSER52676 ] Julius Goryavsky [ sysprg ]
          sysprg Julius Goryavsky made changes -
          Assignee Julius Goryavsky [ sysprg ] Denis Protivensky [ JIRAUSER52676 ]

          People

            denis.protivensky Denis Protivensky
            denis.protivensky Denis Protivensky
            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.