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

Assertion `n_reserved > 0' failed

    XMLWordPrintable

Details

    • Can result in hang or crash
    • Q3/2026 Server Maintenance

    Description

      Assertion found on debug build in 12.3

      origin/12.3 66b3c6784689fbb65110a5b21efcb815a8bcde24

      # 2026-05-28T14:56:22 [510712] | 2026-05-28 14:56:15 1011 [ERROR] InnoDB: Failed to read page 2 from file './test/t6.ibd': Table is compressed or encrypted but uncompress or decrypt failed.
      # 2026-05-28T14:56:22 [510712] | mariadbd: /data/Server/12.3A/storage/innobase/fsp/fsp0fsp.cc:1722: buf_block_t* fseg_create(fil_space_t*, ulint, mtr_t*, dberr_t*, bool, buf_block_t*): Assertion `n_reserved > 0' failed.
      

      StackTrace

      # 2026-05-28T14:57:42 [510712] #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      # 2026-05-28T14:57:42 [510712] #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      # 2026-05-28T14:57:42 [510712] #2  __GI___pthread_kill (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
      # 2026-05-28T14:57:42 [510712] #3  0x00005d193bbc41aa in my_write_core (sig=6) at /data/Server/12.3A/mysys/stacktrace.c:424
      # 2026-05-28T14:57:42 [510712] #4  0x00005d193b5eec4b in handle_fatal_signal (sig=6) at /data/Server/12.3A/sql/signal_handler.cc:298
      # 2026-05-28T14:57:42 [510712] #5  <signal handler called>
      # 2026-05-28T14:57:42 [510712] #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      # 2026-05-28T14:57:42 [510712] #7  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      # 2026-05-28T14:57:42 [510712] #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      # 2026-05-28T14:57:42 [510712] #9  0x00007cc47104526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      # 2026-05-28T14:57:42 [510712] #10 0x00007cc4710288ff in __GI_abort () at ./stdlib/abort.c:79
      # 2026-05-28T14:57:42 [510712] #11 0x00007cc47102881b in __assert_fail_base (fmt=0x7cc4711d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5d193bee0637 "n_reserved > 0", file=file@entry=0x5d193be587a0 "/data/Server/12.3A/storage/innobase/fsp/fsp0fsp.cc", line=line@entry=1722, function=function@entry=0x5d193be59e90 "buf_block_t* fseg_create(fil_space_t*, ulint, mtr_t*, dberr_t*, bool, buf_block_t*)") at ./assert/assert.c:94
      # 2026-05-28T14:57:42 [510712] #12 0x00007cc47103b507 in __assert_fail (assertion=0x5d193bee0637 "n_reserved > 0", file=0x5d193be587a0 "/data/Server/12.3A/storage/innobase/fsp/fsp0fsp.cc", line=1722, function=0x5d193be59e90 "buf_block_t* fseg_create(fil_space_t*, ulint, mtr_t*, dberr_t*, bool, buf_block_t*)") at ./assert/assert.c:103
      # 2026-05-28T14:57:42 [510712] #13 0x00005d193bb0ad40 in fseg_create (space=space@entry=0x74c3f80a6c70, byte_offset=byte_offset@entry=84, mtr=mtr@entry=0x74c461918580, err=err@entry=0x74c4619184e4, has_done_reservation=has_done_reservation@entry=false, block=block@entry=0x0) at /data/Server/12.3A/storage/innobase/fsp/fsp0fsp.cc:1722
      # 2026-05-28T14:57:42 [510712] #14 0x00005d193ba5d29c in btr_create (type=<optimized out>, space=0x74c3f80a6c70, index_id=1586, index=index@entry=0x74c35c095538, mtr=mtr@entry=0x74c461918580, err=err@entry=0x74c4619184e4) at /data/Server/12.3A/storage/innobase/btr/btr0btr.cc:977
      # 2026-05-28T14:57:42 [510712] #15 0x00005d193babf401 in dict_create_index_tree_step (node=node@entry=0x74c3dc066278, trx=trx@entry=0x7cc47020fd80) at /data/Server/12.3A/storage/innobase/dict/dict0crea.cc:789
      # 2026-05-28T14:57:42 [510712] #16 0x00005d193babf8b4 in dict_create_index_step (thr=thr@entry=0x74c35c0c3460) at /data/Server/12.3A/storage/innobase/dict/dict0crea.cc:1250
      # 2026-05-28T14:57:42 [510712] #17 0x00005d193b98879f in que_thr_step (thr=thr@entry=0x74c35c0c3460) at /data/Server/12.3A/storage/innobase/que/que0que.cc:563
      # 2026-05-28T14:57:42 [510712] #18 0x00005d193b988930 in que_run_threads_low (thr=thr@entry=0x74c35c0c3460) at /data/Server/12.3A/storage/innobase/que/que0que.cc:609
      # 2026-05-28T14:57:42 [510712] #19 0x00005d193b9889f1 in que_run_threads (thr=thr@entry=0x74c35c0c3460) at /data/Server/12.3A/storage/innobase/que/que0que.cc:629
      # 2026-05-28T14:57:42 [510712] #20 0x00005d193b8ae7fe in create_index_dict (trx=0x7cc47020fd80, index=index@entry=0x74c3400a5728, mode=mode@entry=FIL_ENCRYPTION_DEFAULT, key_id=key_id@entry=1, add_v=add_v@entry=0x0) at /data/Server/12.3A/storage/innobase/handler/handler0alter.cc:6455
      # 2026-05-28T14:57:42 [510712] #21 0x00005d193b8b7ee0 in prepare_inplace_alter_table_dict (ha_alter_info=<optimized out>, altered_table=altered_table@entry=0x74c46191a040, old_table=<optimized out>, old_opt=<optimized out>, table_name=<optimized out>, flags=<optimized out>, flags2=<optimized out>, fts_doc_id_col=<optimized out>, add_fts_doc_id=<optimized out>, add_fts_doc_id_idx=<optimized out>) at /data/Server/12.3A/storage/innobase/handler/handler0alter.cc:7331
      # 2026-05-28T14:57:42 [510712] #22 0x00005d193b8bcd65 in ha_innobase::prepare_inplace_alter_table (this=0x74c35c0cd000, altered_table=<optimized out>, ha_alter_info=<optimized out>) at /data/Server/12.3A/storage/innobase/handler/handler0alter.cc:8753
      # 2026-05-28T14:57:42 [510712] #23 0x00005d193b5fac7f in handler::ha_prepare_inplace_alter_table (this=0x74c35c0cd000, altered_table=altered_table@entry=0x74c46191a040, ha_alter_info=ha_alter_info@entry=0x74c461919f90) at /data/Server/12.3A/sql/handler.cc:5994
      # 2026-05-28T14:57:42 [510712] #24 0x00005d193b3c4e2e in mysql_inplace_alter_table (thd=thd@entry=0x74c35c000d60, table_list=0x74c35c016030, table=table@entry=0x74c35c0b0ca0, altered_table=altered_table@entry=0x74c46191a040, ha_alter_info=ha_alter_info@entry=0x74c461919f90, target_mdl_request=target_mdl_request@entry=0x74c46191a890, ddl_log_state=0x74c461919f30, trigger_param=0x74c46191a440, alter_ctx=0x74c46191b4e0, partial_alter=@0x74c461919eae: false, start_alter_id=@0x74c461919eb8: 0, if_exists=false) at /data/Server/12.3A/sql/sql_table.cc:8255
      # 2026-05-28T14:57:42 [510712] #25 0x00005d193b3ca3d5 in mysql_alter_table (thd=thd@entry=0x74c35c000d60, new_db=new_db@entry=0x74c35c005ba8, new_name=<optimized out>, create_info=create_info@entry=0x74c46191c3a0, table_list=<optimized out>, table_list@entry=0x74c35c016030, recreate_info=recreate_info@entry=0x74c46191c610, 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-28T14:57:42 [510712] #26 0x00005d193b456578 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x74c35c000d60) at /data/Server/12.3A/sql/sql_alter.cc:695
      # 2026-05-28T14:57:42 [510712] #27 0x00005d193b2f0b34 in mysql_execute_command (thd=thd@entry=0x74c35c000d60, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/12.3A/sql/sql_parse.cc:5910
      # 2026-05-28T14:57:42 [510712] #28 0x00005d193b2f1719 in mysql_parse (thd=thd@entry=0x74c35c000d60, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x74c46191d3c0) at /data/Server/12.3A/sql/sql_parse.cc:7949
      # 2026-05-28T14:57:42 [510712] #29 0x00005d193b2f2d6d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x74c35c000d60, packet=packet@entry=0x74c35c00b6c1 " ALTER TABLE t6 ADD INDEX IF NOT EXISTS `idx1` ( col_text(9) /*!100800 ASC */ ), ALGORITHM = NOCOPY, LOCK = SHARED  /* E_R Thread17 QNO 5281 CON_ID 1011 */ ", packet_length=packet_length@entry=156, blocking=blocking@entry=true) at /data/Server/12.3A/sql/sql_parse.cc:1903
      # 2026-05-28T14:57:42 [510712] #30 0x00005d193b2f4372 in do_command (thd=thd@entry=0x74c35c000d60, blocking=blocking@entry=true) at /data/Server/12.3A/sql/sql_parse.cc:1437
      # 2026-05-28T14:57:42 [510712] #31 0x00005d193b44c05d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5d193f6546e0, put_in_cache=put_in_cache@entry=true) at /data/Server/12.3A/sql/sql_connect.cc:1503
      # 2026-05-28T14:57:42 [510712] #32 0x00005d193b44c27a in handle_one_connection (arg=0x5d193f6546e0) at /data/Server/12.3A/sql/sql_connect.cc:1415
      # 2026-05-28T14:57:42 [510712] #33 0x00007cc47109ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      # 2026-05-28T14:57:42 [510712] #34 0x00007cc471129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      RQG startup options

      #
      # $RQG_HOME/rqg.pl \
      # --gendata=conf/mariadb/table_stress.zz \
      # --gendata_sql=conf/mariadb/table_stress.sql \
      # --grammar=conf/mariadb/table_stress_innodb_nocopy1.yy \
      # --reporters=Mariabackup_linux \
      # --mysqld=--loose-innodb-log-file-size=200M \
      # --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 \
      # --redefine=conf/mariadb/redefine_innodb_log_write_ahead_size.yy \
      # --mysqld=--lock-wait-timeout=86400 \
      # --mysqld=--innodb-lock-wait-timeout=50 \
      # --mysqld=--sql_mode=traditional \
      # --mysqld=--innodb_file_per_table=1 \
      # --mysqld=--loose-innodb_read_only_compressed=OFF \
      # --mysqld=--loose-innodb-sync-debug \
      # --mysqld=--innodb_stats_persistent=off \
      # --mysqld=--innodb_adaptive_hash_index=off \
      # --mysqld=--innodb_sort_buffer_size=65536 \
      # --mysqld=--innodb_random_read_ahead=ON \
      # --mysqld=--loose-innodb_evict_tables_on_commit_debug=off \
      # --threads=33 \
      # --rr= \
      # --mysqld=--innodb_use_native_aio=1 \
      # --mysqld=--innodb_undo_log_truncate=OFF \
      # --mysqld=--innodb_rollback_on_timeout=OFF \
      # --mysqld=--innodb_page_size=32K \
      # --mysqld=--innodb-buffer-pool-size=256M \
      # --vardir_type=fast \
      # --redefine=conf/mariadb/redefine_innodb_all_vars.yy \
      # --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=15
      #--------
      

      Core dump is present on SDP :-
      /data/results/1779993499/TBR-2418

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            saahil Saahil Alam
            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.