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

Assertion "heap_no == ULINT_UNDEFINED" in trx0i_s.cc

Details

    Description

      Upd: For instructions on reproducing, see comments


      10.5 ff66d38cf26a096854836f

      2020-04-09 12:50:57 0x7f44f217d300  InnoDB: Assertion failure in file /10.5/storage/innobase/trx/trx0i_s.cc line 852
      InnoDB: Failing assertion: heap_no == ULINT_UNDEFINED
      InnoDB: We intentionally generate a memory trap.
      InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
      InnoDB: If you get repeated assertion failures or crashes, even
      InnoDB: immediately after the mysqld startup, there may be
      InnoDB: corruption in the InnoDB tablespace. Please refer to
      InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
      InnoDB: about forcing recovery.
      200409 12:50:57 [ERROR] mysqld got signal 6 ;
      Server version: 10.5.3-MariaDB-debug-log
       
      linux/raise.c:51(__GI_raise)[0x7f451d046535]
      ut/ut0dbg.cc:60(_GLOBAL__sub_D_00099_0_ut0dbg.cc)[0x55c9261fec6a]
      trx/trx0i_s.cc:854(fold_lock(ib_lock_t const*, unsigned long))[0x55c9261fee99]
      trx/trx0i_s.cc:924(search_innodb_locks(trx_i_s_cache_t*, ib_lock_t const*, unsigned short))[0x55c9261ff6c9]
      trx/trx0i_s.cc:1086(add_trx_relevant_locks_to_cache(trx_i_s_cache_t*, trx_t const*, i_s_locks_row_t**))[0x55c926200205]
      trx/trx0i_s.cc:1198(fetch_data_into_cache_low(trx_i_s_cache_t*, trx_t const*))[0x55c926200592]
      trx/trx0i_s.cc:1233(fetch_data_into_cache(trx_i_s_cache_t*))[0x55c92620072f]
      trx/trx0i_s.cc:1260(trx_i_s_possibly_fetch_data_into_cache(trx_i_s_cache_t*))[0x55c925e3de28]
      handler/i_s.cc:990(trx_i_s_common_fill_table(THD*, TABLE_LIST*, Item*))[0x55c924c90b46]
      sql/sql_show.cc:8647(get_schema_tables_result(JOIN*, enum_schema_table_state))[0x55c924b69d45]
      sql/sql_select.cc:4419(JOIN::exec_inner())[0x55c924b67c30]
      sql/sql_select.cc:4245(JOIN::exec())[0x55c924b6bb45]
      sql/sql_select.cc:4670(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55c924b3de88]
      sql/sql_select.cc:417(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55c924ab01d5]
      sql/sql_parse.cc:6168(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55c924a9e5f7]
      sql/sql_parse.cc:3901(mysql_execute_command(THD*))[0x55c924abb223]
      sql/sql_parse.cc:7953(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55c924a91011]
      sql/sql_parse.cc:1842(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55c924a8da46]
      sql/sql_parse.cc:1358(do_command(THD*))[0x55c924eaccc7]
      sql/sql_connect.cc:1422(do_handle_one_connection(CONNECT*, bool))[0x55c924eac562]
      sql/sql_connect.cc:1321(handle_one_connection)[0x55c925b4b378]
      nptl/pthread_create.c:487(start_thread)[0x7f451daecfa3]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f451d11d4cf]
      
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova added a comment - - edited

            To reproduce:

            git clone https://github.com/MariaDB/randgen --branch mdev22206 rqg-mdev22206
            cd rqg-mdev22206
            perl ./runall-new.pl --basedir=<basedir> --duration=300 --threads=2 --seed=1 --mysqld=--lock-wait-timeout=10 --mysqld=--innodb-lock-wait-timeout=5 --redefine=conf/mariadb/bulk_insert.yy --redefine=conf/mariadb/xa.yy --grammar=conf/runtime/information_schema.yy  --vardir=/dev/shm/var_mdev22206
            

            • In the command line above remember to set your basedir instead of <basedir>. You can also modify vardir as needed.
            • The test usually fails for me within ~1 min, but it can vary on different machines and builds. The configured duration is 5 min, increase it if it doesn't fail for you soon enough.
            • If you need to create an rr profile, add --rr option to the command line. The profile is created in the default location.
            • Reproducible on 10.5, debug- and non-debug alike. Couldn't reproduce on 10.4.
            • All threads' stack trace is attached: mdev22206_threads_full

            10.5 12277e30

            2020-05-20 15:50:25 0x7f1d9487e700  InnoDB: Assertion failure in file /data/src/10.5/storage/innobase/trx/trx0i_s.cc line 850
            InnoDB: Failing assertion: heap_no == ULINT_UNDEFINED
             
            #5  0x00007f1d97dba42a in __GI_abort () at abort.c:89
            #6  0x0000563bfdcd8bb6 in ut_dbg_assertion_failed (expr=0x563bfe400cdd "heap_no == ULINT_UNDEFINED", file=0x563bfe4009a8 "/data/src/10.5/storage/innobase/trx/trx0i_s.cc", line=850) at /data/src/10.5/storage/innobase/ut/ut0dbg.cc:60
            #7  0x0000563bfdc9436a in fold_lock (lock=0x7f1d951aee88, heap_no=0) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:850
            #8  0x0000563bfdc9468a in search_innodb_locks (cache=0x563bfec383c0 <trx_i_s_cache_static>, lock=0x7f1d951aee88, heap_no=0) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:922
            #9  0x0000563bfdc947c4 in add_lock_to_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>, lock=0x7f1d951aee88, heap_no=0) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:971
            #10 0x0000563bfdc94c55 in add_trx_relevant_locks_to_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>, trx=0x7f1d951ae290, requested_lock_row=0x7f1d9487c190) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1084
            #11 0x0000563bfdc9515f in fetch_data_into_cache_low (cache=0x563bfec383c0 <trx_i_s_cache_static>, trx=0x7f1d951ae290) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1196
            #12 0x0000563bfdc95307 in fetch_data_into_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1230
            #13 0x0000563bfdc953af in trx_i_s_possibly_fetch_data_into_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1257
            #14 0x0000563bfdab26e7 in trx_i_s_common_fill_table (thd=0x7f1d38000b18, tables=0x7f1d38012d20) at /data/src/10.5/storage/innobase/handler/i_s.cc:989
            #15 0x0000563bfd35141b in get_schema_tables_result (join=0x7f1d38015b40, executed_place=PROCESSED_BY_JOIN_EXEC) at /data/src/10.5/sql/sql_show.cc:8653
            #16 0x0000563bfd2e18e6 in JOIN::exec_inner (this=0x7f1d38015b40) at /data/src/10.5/sql/sql_select.cc:4421
            #17 0x0000563bfd2e0cf1 in JOIN::exec (this=0x7f1d38015b40) at /data/src/10.5/sql/sql_select.cc:4245
            #18 0x0000563bfd2e2422 in mysql_select (thd=0x7f1d38000b18, tables=0x7f1d38012d20, fields=..., conds=0x7f1d38014608, og_num=3, order=0x7f1d380150c8, group=0x0, having=0x0, proc_param=0x0, select_options=2685668096, result=0x7f1d38015b18, unit=0x7f1d38004b28, select_lex=0x7f1d380126d0) at /data/src/10.5/sql/sql_select.cc:4669
            #19 0x0000563bfd2d1f38 in handle_select (thd=0x7f1d38000b18, lex=0x7f1d38004a60, result=0x7f1d38015b18, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:429
            #20 0x0000563bfd29756e in execute_sqlcom_select (thd=0x7f1d38000b18, all_tables=0x7f1d38012d20) at /data/src/10.5/sql/sql_parse.cc:6172
            #21 0x0000563bfd28e8b4 in mysql_execute_command (thd=0x7f1d38000b18) at /data/src/10.5/sql/sql_parse.cc:3901
            #22 0x0000563bfd29c41c in mysql_parse (thd=0x7f1d38000b18, rawbuf=0x7f1d38012480 "SELECT /* QNO 2572 CON_ID 9 */ * FROM INFORMATION_SCHEMA.`INNODB_LOCKS` AS table1 WHERE NOT (NOT table1.`lock_id` >= table1.`lock_id` OR table1.`lock_id` >= table1.`lock_rec`) ORDER BY table1.`lock_in"..., length=244, parser_state=0x7f1d9487d520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7957
            #23 0x0000563bfd288724 in dispatch_command (command=COM_QUERY, thd=0x7f1d38000b18, packet=0x7f1d38008829 "SELECT /* QNO 2572 CON_ID 9 */ * FROM INFORMATION_SCHEMA.`INNODB_LOCKS` AS table1 WHERE NOT (NOT table1.`lock_id` >= table1.`lock_id` OR table1.`lock_id` >= table1.`lock_rec`) ORDER BY table1.`lock_in"..., packet_length=244, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1840
            #24 0x0000563bfd286eb6 in do_command (thd=0x7f1d38000b18) at /data/src/10.5/sql/sql_parse.cc:1359
            #25 0x0000563bfd42a4d3 in do_handle_one_connection (connect=0x563c016607a8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411
            #26 0x0000563bfd42a23b in handle_one_connection (arg=0x563c016607a8) at /data/src/10.5/sql/sql_connect.cc:1313
            #27 0x0000563bfd960306 in pfs_spawn_thread (arg=0x563c01781248) at /data/src/10.5/storage/perfschema/pfs.cc:2201
            #28 0x00007f1d99d3a4a4 in start_thread (arg=0x7f1d9487e700) at pthread_create.c:456
            #29 0x00007f1d97e6ed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
            

            elenst Elena Stepanova added a comment - - edited To reproduce: git clone https://github.com/MariaDB/randgen --branch mdev22206 rqg-mdev22206 cd rqg-mdev22206 perl ./runall-new.pl --basedir=<basedir> --duration=300 --threads=2 --seed=1 --mysqld=--lock-wait-timeout=10 --mysqld=--innodb-lock-wait-timeout=5 --redefine=conf/mariadb/bulk_insert.yy --redefine=conf/mariadb/xa.yy --grammar=conf/runtime/information_schema.yy --vardir=/dev/shm/var_mdev22206 In the command line above remember to set your basedir instead of <basedir> . You can also modify vardir as needed. The test usually fails for me within ~1 min, but it can vary on different machines and builds. The configured duration is 5 min, increase it if it doesn't fail for you soon enough. If you need to create an rr profile, add --rr option to the command line. The profile is created in the default location. Reproducible on 10.5, debug- and non-debug alike. Couldn't reproduce on 10.4. All threads' stack trace is attached: mdev22206_threads_full 10.5 12277e30 2020-05-20 15:50:25 0x7f1d9487e700 InnoDB: Assertion failure in file /data/src/10.5/storage/innobase/trx/trx0i_s.cc line 850 InnoDB: Failing assertion: heap_no == ULINT_UNDEFINED   #5 0x00007f1d97dba42a in __GI_abort () at abort.c:89 #6 0x0000563bfdcd8bb6 in ut_dbg_assertion_failed (expr=0x563bfe400cdd "heap_no == ULINT_UNDEFINED", file=0x563bfe4009a8 "/data/src/10.5/storage/innobase/trx/trx0i_s.cc", line=850) at /data/src/10.5/storage/innobase/ut/ut0dbg.cc:60 #7 0x0000563bfdc9436a in fold_lock (lock=0x7f1d951aee88, heap_no=0) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:850 #8 0x0000563bfdc9468a in search_innodb_locks (cache=0x563bfec383c0 <trx_i_s_cache_static>, lock=0x7f1d951aee88, heap_no=0) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:922 #9 0x0000563bfdc947c4 in add_lock_to_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>, lock=0x7f1d951aee88, heap_no=0) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:971 #10 0x0000563bfdc94c55 in add_trx_relevant_locks_to_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>, trx=0x7f1d951ae290, requested_lock_row=0x7f1d9487c190) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1084 #11 0x0000563bfdc9515f in fetch_data_into_cache_low (cache=0x563bfec383c0 <trx_i_s_cache_static>, trx=0x7f1d951ae290) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1196 #12 0x0000563bfdc95307 in fetch_data_into_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1230 #13 0x0000563bfdc953af in trx_i_s_possibly_fetch_data_into_cache (cache=0x563bfec383c0 <trx_i_s_cache_static>) at /data/src/10.5/storage/innobase/trx/trx0i_s.cc:1257 #14 0x0000563bfdab26e7 in trx_i_s_common_fill_table (thd=0x7f1d38000b18, tables=0x7f1d38012d20) at /data/src/10.5/storage/innobase/handler/i_s.cc:989 #15 0x0000563bfd35141b in get_schema_tables_result (join=0x7f1d38015b40, executed_place=PROCESSED_BY_JOIN_EXEC) at /data/src/10.5/sql/sql_show.cc:8653 #16 0x0000563bfd2e18e6 in JOIN::exec_inner (this=0x7f1d38015b40) at /data/src/10.5/sql/sql_select.cc:4421 #17 0x0000563bfd2e0cf1 in JOIN::exec (this=0x7f1d38015b40) at /data/src/10.5/sql/sql_select.cc:4245 #18 0x0000563bfd2e2422 in mysql_select (thd=0x7f1d38000b18, tables=0x7f1d38012d20, fields=..., conds=0x7f1d38014608, og_num=3, order=0x7f1d380150c8, group=0x0, having=0x0, proc_param=0x0, select_options=2685668096, result=0x7f1d38015b18, unit=0x7f1d38004b28, select_lex=0x7f1d380126d0) at /data/src/10.5/sql/sql_select.cc:4669 #19 0x0000563bfd2d1f38 in handle_select (thd=0x7f1d38000b18, lex=0x7f1d38004a60, result=0x7f1d38015b18, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:429 #20 0x0000563bfd29756e in execute_sqlcom_select (thd=0x7f1d38000b18, all_tables=0x7f1d38012d20) at /data/src/10.5/sql/sql_parse.cc:6172 #21 0x0000563bfd28e8b4 in mysql_execute_command (thd=0x7f1d38000b18) at /data/src/10.5/sql/sql_parse.cc:3901 #22 0x0000563bfd29c41c in mysql_parse (thd=0x7f1d38000b18, rawbuf=0x7f1d38012480 "SELECT /* QNO 2572 CON_ID 9 */ * FROM INFORMATION_SCHEMA.`INNODB_LOCKS` AS table1 WHERE NOT (NOT table1.`lock_id` >= table1.`lock_id` OR table1.`lock_id` >= table1.`lock_rec`) ORDER BY table1.`lock_in"..., length=244, parser_state=0x7f1d9487d520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7957 #23 0x0000563bfd288724 in dispatch_command (command=COM_QUERY, thd=0x7f1d38000b18, packet=0x7f1d38008829 "SELECT /* QNO 2572 CON_ID 9 */ * FROM INFORMATION_SCHEMA.`INNODB_LOCKS` AS table1 WHERE NOT (NOT table1.`lock_id` >= table1.`lock_id` OR table1.`lock_id` >= table1.`lock_rec`) ORDER BY table1.`lock_in"..., packet_length=244, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1840 #24 0x0000563bfd286eb6 in do_command (thd=0x7f1d38000b18) at /data/src/10.5/sql/sql_parse.cc:1359 #25 0x0000563bfd42a4d3 in do_handle_one_connection (connect=0x563c016607a8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411 #26 0x0000563bfd42a23b in handle_one_connection (arg=0x563c016607a8) at /data/src/10.5/sql/sql_connect.cc:1313 #27 0x0000563bfd960306 in pfs_spawn_thread (arg=0x563c01781248) at /data/src/10.5/storage/perfschema/pfs.cc:2201 #28 0x00007f1d99d3a4a4 in start_thread (arg=0x7f1d9487e700) at pthread_create.c:456 #29 0x00007f1d97e6ed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

            MDEV-19940 changed the type to uint16_t and replaced some but not all occurrences of ULINT_UNDEFINED with 0. A better special value (which is impossible for a record heap number) would be 0xffff.

            marko Marko Mäkelä added a comment - MDEV-19940 changed the type to uint16_t and replaced some but not all occurrences of ULINT_UNDEFINED with 0 . A better special value (which is impossible for a record heap number) would be 0xffff .

            People

              marko Marko Mäkelä
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.