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

[DRAFT]InnoDB: ALTER TABLE FORCE triggers assertion "s" in buf_page_get_gen()

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.3
    • 12.3
    • None
    • Can result in hang or crash

    Description

      Assertion found on debug build on 12.3

      origin/12.3 66b3c6784689fbb65110a5b21efcb815a8bcde24

      # 2026-05-28T12:40:49 [14479] | mariadbd: /data/Server/12.3A/storage/innobase/buf/buf0buf.cc:2760: buf_block_t* buf_page_get_gen(page_id_t, ulint, rw_lock_type_t, buf_block_t*, ulint, mtr_t*, dberr_t*): Assertion `s' failed.
      

      Stacktrace

      # 2026-05-28T13:00:21 [14479] | #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      # 2026-05-28T13:00:21 [14479] | #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      # 2026-05-28T13:00:21 [14479] | #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      # 2026-05-28T13:00:21 [14479] | #3  0x00007e84b624526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      # 2026-05-28T13:00:21 [14479] | #4  0x00007e84b62288ff in __GI_abort () at ./stdlib/abort.c:79
      # 2026-05-28T13:00:21 [14479] | #5  0x00007e84b622881b in __assert_fail_base (fmt=0x7e84b63d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x56d70c08a8d1 "s", file=file@entry=0x56d70bff6200 "/data/Server/12.3A/storage/innobase/buf/buf0buf.cc", line=line@entry=2760, function=function@entry=0x56d70bff7de0 "buf_block_t* buf_page_get_gen(page_id_t, ulint, rw_lock_type_t, buf_block_t*, ulint, mtr_t*, dberr_t*)") at ./assert/assert.c:94
      # 2026-05-28T13:00:21 [14479] | #6  0x00007e84b623b507 in __assert_fail (assertion=0x56d70c08a8d1 "s", file=0x56d70bff6200 "/data/Server/12.3A/storage/innobase/buf/buf0buf.cc", line=2760, function=0x56d70bff7de0 "buf_block_t* buf_page_get_gen(page_id_t, ulint, rw_lock_type_t, buf_block_t*, ulint, mtr_t*, dberr_t*)") at ./assert/assert.c:103
      # 2026-05-28T13:00:21 [14479] | #7  0x000056d70bc51b60 in buf_page_get_gen (page_id=page_id@entry=..., zip_size=zip_size@entry=0, rw_latch=rw_latch@entry=RW_S_LATCH, guess=guess@entry=0x0, mode=mode@entry=10, mtr=mtr@entry=0x7e84ac9ae190, err=0x0) at /data/Server/12.3A/storage/innobase/buf/buf0buf.cc:2760
      # 2026-05-28T13:00:21 [14479] | #8  0x000056d70bc29ffd in btr_copy_blob_prefix (buf=0x76843a400371 "", len=538976288, id=..., offset=offset@entry=538976288) at /data/Server/12.3A/storage/innobase/btr/btr0cur.cc:6471
      # 2026-05-28T13:00:21 [14479] | #9  0x000056d70bc36198 in btr_copy_externally_stored_field_prefix_low (buf=buf@entry=0x76843a400371 "", len=len@entry=538976288, zip_size=zip_size@entry=0, id=..., id@entry=..., offset=offset@entry=538976288) at /data/Server/12.3A/storage/innobase/btr/btr0cur.cc:6668
      # 2026-05-28T13:00:21 [14479] | #10 0x000056d70bc36304 in btr_copy_externally_stored_field (len=len@entry=0x7e84ac9ae608, data=data@entry=0x7e84a809d9d8 "or", ' ' <repeats 763 times>, "\217\217\217", zip_size=zip_size@entry=0, local_len=745, local_len@entry=765, heap=heap@entry=0x7e84a80ed230) at /data/Server/12.3A/storage/innobase/btr/btr0cur.cc:6768
      # 2026-05-28T13:00:21 [14479] | #11 0x000056d70bb75d6e in row_merge_copy_blobs (mrec=0x0, offsets=offsets@entry=0x7e84a84146e8, zip_size=0, tuple=tuple@entry=0x7e84a8414730, heap=heap@entry=0x7e84a80ed230) at /data/Server/12.3A/storage/innobase/row/row0merge.cc:3646
      # 2026-05-28T13:00:21 [14479] | #12 0x000056d70bb7822c in row_merge_insert_index_tuples (trx=trx@entry=0x7e84ace00c00, index=0x7e84a80c6de8, old_table=old_table@entry=0x768470078f48, fd=..., block=block@entry=0x0, row_buf=row_buf@entry=0x7684943533b8, btr_bulk=0x76848801c630, table_total_rows=23, pct_progress=pct_progress@entry=0, pct_cost=pct_cost@entry=8.3333333333333339, crypt_block=0x0, space=4, stage=0x0, blob_file=0x0) at /data/Server/12.3A/storage/innobase/row/row0merge.cc:3831
      # 2026-05-28T13:00:21 [14479] | #13 0x000056d70bb7fd7e in row_merge_read_clustered_index (trx=trx@entry=0x7e84ace00c00, table=table@entry=0x7e84ac9b0040, old_table=old_table@entry=0x768470078f48, new_table=<optimized out>, new_table@entry=0x7e84a80eede8, online=online@entry=true, index=index@entry=0x7e84a83bda28, fts_sort_idx=<optimized out>, psort_info=<optimized out>, files=<optimized out>, key_numbers=<optimized out>, n_index=<optimized out>, defaults=<optimized out>, add_v=<optimized out>, col_map=<optimized out>, add_autoinc=<optimized out>, sequence=..., block=<optimized out>, skip_pk_sort=<optimized out>, tmpfd=<optimized out>, stage=<optimized out>, pct_cost=pct_cost@entry=8.3333333333333339, crypt_block=<optimized out>, eval_table=<optimized out>, allow_not_null=<optimized out>, col_collate=<optimized out>) at /data/Server/12.3A/storage/innobase/row/row0merge.cc:2702
      # 2026-05-28T13:00:21 [14479] | #14 0x000056d70bb8125d in row_merge_build_indexes (trx=0x7e84ace00c00, old_table=0x768470078f48, new_table=new_table@entry=0x7e84a80eede8, online=true, indexes=0x7e84a83bda28, key_numbers=0x7e84a83bda80, n_indexes=11, table=0x7e84ac9b0040, defaults=0x0, col_map=0x7e84a83822b8, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7e84a8552cf0, add_v=0x0, eval_table=0x7e84ac9b0040, allow_not_null=false, col_collate=0x0) at /data/Server/12.3A/storage/innobase/row/row0merge.cc:4775
      # 2026-05-28T13:00:21 [14479] | #15 0x000056d70ba7444b in ha_innobase::inplace_alter_table (this=0x7684a0097a00, altered_table=0x7e84ac9b0040, ha_alter_info=0x7e84ac9aff90) at /data/Server/12.3A/storage/innobase/handler/handler0alter.cc:8928
      # 2026-05-28T13:00:21 [14479] | #16 0x000056d70b57c257 in handler::ha_inplace_alter_table (ha_alter_info=0x7e84ac9aff90, altered_table=0x7e84ac9b0040, this=<optimized out>) at /data/Server/12.3A/sql/handler.h:5165
      # 2026-05-28T13:00:21 [14479] | #17 mysql_inplace_alter_table (thd=thd@entry=0x7e84a80028a0, table_list=0x7e84a8017ba0, table=table@entry=0x7684a0083590, altered_table=altered_table@entry=0x7e84ac9b0040, ha_alter_info=ha_alter_info@entry=0x7e84ac9aff90, target_mdl_request=target_mdl_request@entry=0x7e84ac9b0890, ddl_log_state=0x7e84ac9aff30, trigger_param=0x7e84ac9b0440, alter_ctx=0x7e84ac9b14e0, partial_alter=@0x7e84ac9afeae: false, start_alter_id=@0x7e84ac9afeb8: 0, if_exists=false) at /data/Server/12.3A/sql/sql_table.cc:8310
      # 2026-05-28T13:00:21 [14479] | #18 0x000056d70b5813d5 in mysql_alter_table (thd=thd@entry=0x7e84a80028a0, new_db=new_db@entry=0x7e84a80076e8, new_name=<optimized out>, create_info=create_info@entry=0x7e84ac9b23a0, table_list=<optimized out>, table_list@entry=0x7e84a8017ba0, recreate_info=recreate_info@entry=0x7e84ac9b2610, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /data/Server/12.3A/sql/sql_table.cc:11812
      # 2026-05-28T13:00:21 [14479] | #19 0x000056d70b60d578 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x7e84a80028a0) at /data/Server/12.3A/sql/sql_alter.cc:695
      # 2026-05-28T13:00:21 [14479] | #20 0x000056d70b4a7b34 in mysql_execute_command (thd=thd@entry=0x7e84a80028a0, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/12.3A/sql/sql_parse.cc:5910
      # 2026-05-28T13:00:21 [14479] | #21 0x000056d70b4a8719 in mysql_parse (thd=thd@entry=0x7e84a80028a0, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7e84ac9b33c0) at /data/Server/12.3A/sql/sql_parse.cc:7949
      # 2026-05-28T13:00:21 [14479] | #22 0x000056d70b4a9d6d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7e84a80028a0, packet=packet@entry=0x7e84a804d251 "ALTER TABLE `test` . `table100_innodb_int_autoinc` FORCE /* E_R checkDatabaseIntegrity QNO 481 CON_ID 70 */ ", packet_length=packet_length@entry=108, blocking=blocking@entry=true) at /data/Server/12.3A/sql/sql_parse.cc:1903
      # 2026-05-28T13:00:21 [14479] | #23 0x000056d70b4ab372 in do_command (thd=thd@entry=0x7e84a80028a0, blocking=blocking@entry=true) at /data/Server/12.3A/sql/sql_parse.cc:1437
      # 2026-05-28T13:00:21 [14479] | #24 0x000056d70b60305d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56d70feb9f60, put_in_cache=put_in_cache@entry=true) at /data/Server/12.3A/sql/sql_connect.cc:1503
      # 2026-05-28T13:00:21 [14479] | #25 0x000056d70b60327a in handle_one_connection (arg=0x56d70feb9f60) at /data/Server/12.3A/sql/sql_connect.cc:1415
      # 2026-05-28T13:00:21 [14479] | #26 0x00007e84b629ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      # 2026-05-28T13:00:21 [14479] | #27 0x00007e84b6329a34 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
      

      RQG startup options

       GIT_SHOW: HEAD -> master, origin/master, origin/HEAD cf1bd23ebcd7796a1a345d223012c81163e02e4e 2026-05-27T11:21:00+02:00
      # rqg.pl  : Version 5.0.0 (2026-03)
      #
      # $RQG_HOME/rqg.pl \
      # --gendata=conf/engines/many_indexes.zz \
      # --max_gd_duration=900 \
      # --grammar=conf/engines/many_indexes.yy \
      # --mysqld=--transaction-isolation=REPEATABLE-READ \
      # --validator=SelectStability \
      # --mysqld=--loose-innodb_lock_schedule_algorithm=fcfs \
      # --mysqld=--loose-idle_write_transaction_timeout=0 \
      # --mysqld=--loose-idle_transaction_timeout=0 \
      # --mysqld=--loose-idle_readonly_transaction_timeout=0 \
      # --mysqld=--connect_timeout=60 \
      # --mysqld=--interactive_timeout=28800 \
      # --mysqld=--slave_net_timeout=60 \
      # --mysqld=--net_read_timeout=30 \
      # --mysqld=--net_write_timeout=60 \
      # --mysqld=--loose-table_lock_wait_timeout=50 \
      # --mysqld=--wait_timeout=28800 \
      # --no_mask \
      # --queries=10000000 \
      # --seed=random \
      # --reporters=None \
      # --reporters=ErrorLog \
      # --reporters=Deadlock \
      # --validators=None \
      # --mysqld=--log_output=none \
      # --mysqld=--log_bin_trust_function_creators=1 \
      # --mysqld=--loose-debug_assert_on_not_freed_memory=0 \
      # --engine=InnoDB \
      # --restart_timeout=240 \
      # --mysqld=--plugin-load-add=file_key_management.so \
      # --mysqld=--loose-file-key-management-filename=$RQG_HOME/conf/mariadb/encryption_keys.txt \
      # --mysqld=--plugin-load-add=provider_lzo.so \
      # --mysqld=--plugin-load-add=provider_bzip2.so \
      # --mysqld=--plugin-load-add=provider_lzma.so \
      # --mysqld=--plugin-load-add=provider_snappy.so \
      # --mysqld=--plugin-load-add=provider_lz4.so \
      # --mysqld=--loose-innodb_compression_level=1 \
      # --duration=300 \
      # --mysqld=--loose-innodb_fatal_semaphore_wait_threshold=300 \
      # --mysqld=--lock-wait-timeout=86400 \
      # --mysqld=--innodb-lock-wait-timeout=50 \
      # --mysqld=--sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION \
      # --mysqld=--innodb_file_per_table=0 \
      # --mysqld=--loose-innodb_read_only_compressed=OFF \
      # --mysqld=--innodb_stats_persistent=on \
      # --mysqld=--innodb_adaptive_hash_index=on \
      # --mysqld=--innodb_random_read_ahead=OFF \
      # --mysqld=--loose-innodb_evict_tables_on_commit_debug=off \
      # --threads=33 \
      # --rr=rr record --wait \
      # --mysqld=--innodb_undo_log_truncate=OFF \
      # --mysqld=--innodb_undo_tablespaces=3 \
      # --mysqld=--innodb_rollback_on_timeout=OFF \
      # --mysqld=--innodb_page_size=4K \
      # --mysqld=--innodb-buffer-pool-size=256M \
      # --vardir_type=fast \
      # --redefine=conf/mariadb/redefine_innodb_all_vars.yy \
      # --redefine=conf/mariadb/redefine_innodb_cte_window.yy \
      # --mysqld=--innodb_autoinc_lock_mode=1 \
      # --no_mask \
      # --batch \
      # --basedir1=/Server_bin/12.3A_debug_Og \
      # --basedir2=/Server_bin/12.3A_debug_Og \
      # --script_debug=_nix_ \
      # --major_runid=1779993499 \
      # --minor_runid=222
      

      RR trace is present on SDP :-
      /data/results/1779993499/TBR-2416

      Attachments

        Activity

          People

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