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

[DRAFT] Assertion `((val << shift) & mask) == (val << shift)' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Assertion found while testing MDEV-37949

      origin/MDEV-37949 3618d807034cf6b9ed4531711c2ace07bcebe03a

      # 2026-05-02T07:02:31 [353286] | mariadbd: /data/Server/MDEV-37949G/storage/innobase/include/rem0rec.inl:157: void rec_set_bit_field_1(rec_t*, ulint, ulint, ulint, ulint): Assertion `((val << shift) & mask) == (val << shift)' failed.
      

      RQG Startup options

      # GIT_SHOW: HEAD -> master, origin/master, origin/HEAD 58f86863d7aca1624c4cbc5e4fe34be8fd962ab4 2026-04-30T15:53:44+02:00
      # rqg.pl  : Version 5.0.0 (2026-03)
      #
      # $RQG_HOME/rqg.pl \
      # --gendata=conf/engines/engine_stress.zz \
      # --views \
      # --grammar=conf/engines/engine_stress.yy \
      # --redefine=conf/mariadb/redefine_innodb_log_archive.yy \
      # --mysqld=--loose-innodb_log_archive=ON \
      # --mysqld=--loose-innodb_log_file_size=128M \
      # --reporters=LogArchiveRecovery,Deadlock,Backtrace \
      # --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=--loose-innodb_data_file_path=ibdata1:1M:autoextend:autoshrink \
      # --redefine=conf/mariadb/redefine_innodb_log_size_dynamic.yy \
      # --mysqld=--lock-wait-timeout=86400 \
      # --mysqld=--innodb-lock-wait-timeout=50 \
      # --mysqld=--loose-innodb_fast_shutdown=0 \
      # --mysqld=--sql_mode=traditional \
      # --mysqld=--loose-innodb_read_only_compressed=OFF \
      # --mysqld=--innodb_stats_persistent=off \
      # --mysqld=--innodb_adaptive_hash_index=on \
      # --mysqld=--innodb_random_read_ahead=OFF \
      # --mysqld=--log-bin \
      # --mysqld=--sync-binlog=1 \
      # --mysqld=--loose-innodb_evict_tables_on_commit_debug=on \
      # --mysqld=--loose-max-statement-time=30 \
      # --threads=6 \
      # --rr=rr record --chaos --wait \
      # --mysqld=--innodb_undo_log_truncate=OFF \
      # --mysqld=--innodb_rollback_on_timeout=OFF \
      # --mysqld=--innodb_page_size=4K \
      # --mysqld=--innodb-buffer-pool-size=256M \
      # --vardir_type=slow \
      # --no_mask \
      # --batch \
      # --basedir1=/Server_bin/MDEV-37949G_debug_Og \
      # --basedir2=/Server_bin/MDEV-37949G_debug_Og \
      # --script_debug=_nix_ \
      # --major_runid=1777704634 \
      # --minor_runid=14
      

      Stacktrace

      #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  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  __GI_abort () at ./stdlib/abort.c:79
      #5  __assert_fail_base (fmt="%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry="((val << shift) & mask) == (val << shift)", file=file@entry="/data/Server/MDEV-37949G/storage/innobase/include/rem0rec.inl", line=line@entry=157, 
          function=function@entry="void rec_set_bit_field_1(rec_t*, ulint, ulint, ulint, ulint)") at ./assert/assert.c:94
      #6  __assert_fail (assertion="((val << shift) & mask) == (val << shift)", file="/data/Server/MDEV-37949G/storage/innobase/include/rem0rec.inl", line=157, function="void rec_set_bit_field_1(rec_t*, ulint, ulint, ulint, ulint)") at ./assert/assert.c:103
      #7  rec_set_bit_field_1 (rec="\262%", val=<optimized out>, offs=5, mask=mask@entry=240, shift=shift@entry=0) at /data/Server/MDEV-37949G/storage/innobase/include/rem0rec.inl:157
      #8  trx_undo_prev_version (rec=rec@entry="\262%", index=index@entry=, offsets=offsets@entry=, heap=<optimized out>, heap@entry=, old_vers=old_vers@entry=, check=..., v_status=0, v_heap=, vrow=, undo_rec="\001\034\v") at /data/Server/MDEV-37949G/storage/innobase/trx/trx0rec.cc:2335
      #9  trx_undo_prev_version_build (rec=rec@entry="\262%", index=index@entry=, offsets=offsets@entry=, heap=heap@entry=, old_vers=old_vers@entry=, mtr=mtr@entry=, v_status=0, v_heap=, vrow=) at /data/Server/MDEV-37949G/storage/innobase/trx/trx0rec.cc:2199
      #10 row_check_index (prebuilt=<optimized out>, n_rows=n_rows@entry=) at /data/Server/MDEV-37949G/storage/innobase/row/row0sel.cc:6616
      #11 ha_innobase::check (this=, thd=, check_opt=) at /data/Server/MDEV-37949G/storage/innobase/handler/ha_innodb.cc:15436
      #12 handler::ha_check (this=, thd=, check_opt=check_opt@entry=) at /data/Server/MDEV-37949G/sql/handler.cc:5376
      #13 ha_partition::handle_opt_part (this=this@entry=, thd=thd@entry=, check_opt=check_opt@entry=, part_id=part_id@entry=0, flag=flag@entry=3) at /data/Server/MDEV-37949G/sql/ha_partition.cc:1397
      #14 ha_partition::handle_opt_partitions (this=, thd=, check_opt=, flag=flag@entry=3) at /data/Server/MDEV-37949G/sql/ha_partition.cc:1580
      #15 ha_partition::check (this=<optimized out>, thd=<optimized out>, check_opt=<optimized out>) at /data/Server/MDEV-37949G/sql/ha_partition.cc:1305
      #16 handler::ha_check (this=, thd=thd@entry=, check_opt=check_opt@entry=) at /data/Server/MDEV-37949G/sql/handler.cc:5376
      #17 mysql_admin_table (thd=thd@entry=, tables=tables@entry=, check_opt=check_opt@entry=, operator_name=operator_name@entry=<msg_check>, lock_type=lock_type@entry=TL_READ_NO_INSERT, org_open_for_modify=org_open_for_modify@entry=false, repair_table_use_frm=false, 
          extra_open_options=32, prepare_func=, operator_func=<optimized out>, view_operator_func=<view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=false) at /data/Server/MDEV-37949G/sql/sql_admin.cc:918
      #18 Sql_cmd_check_table::execute (this=<optimized out>, thd=) at /data/Server/MDEV-37949G/sql/sql_admin.cc:1619
      #19 mysql_execute_command (thd=thd@entry=, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/MDEV-37949G/sql/sql_parse.cc:5916
      #20 mysql_parse (thd=thd@entry=, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=) at /data/Server/MDEV-37949G/sql/sql_parse.cc:7945
      #21 dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=, packet=packet@entry="", packet_length=packet_length@entry=123, blocking=blocking@entry=true) at /data/Server/MDEV-37949G/sql/sql_parse.cc:1925
      #22 do_command (thd=thd@entry=, blocking=blocking@entry=true) at /data/Server/MDEV-37949G/sql/sql_parse.cc:1433
      #23 do_handle_one_connection (connect=<optimized out>, connect@entry=, put_in_cache=put_in_cache@entry=true) at /data/Server/MDEV-37949G/sql/sql_connect.cc:1497
      #24 handle_one_connection (arg=) at /data/Server/MDEV-37949G/sql/sql_connect.cc:1409
      #25 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #26 clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
      (rr) frame 7
      #7  rec_set_bit_field_1 (rec="\262%", val=<optimized out>, offs=5, mask=mask@entry=240, shift=shift@entry=0) at /data/Server/MDEV-37949G/storage/innobase/include/rem0rec.inl:157
      157             ut_ad(((val << shift) & mask) == (val << shift));
      (rr) info args
      rec = "\262%"
      val = <optimized out>
      offs = 5
      mask = 240
      shift = 0
      (rr) info labels
      Undefined info command: "labels".  Try "help info".
      

      RR trace is present on SDP :-
      /data/results/1777704634/TBR-2412

      Attachments

        Issue Links

          Activity

            People

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