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

"InnoDB: Failing assertion" when using ROW_FORMAT=COMPRESSED

Details

    Description

      We encountered ut_a(i + PAGE_HEAP_NO_USER_LOW == n_heap); while doing bulk alter
      operation. There are many ut_a() assert in page0zip.cc. Please evaluate all the asserts and
      return the error message where it is needed.

      Attachments

        Issue Links

          Activity

            Also have the same issue. I can consistently replicate my error using the attached script.sql script.sql .

            Issue is related to ROW_FORMAT=COMPRESSED, if I set it to DYNAMIC I can add the column without issue.

            2023-01-24 16:40:12 0x7fbb881b7700  InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.6.11/storage/innobase/page/page0zip.cc line 761
            InnoDB: Failing assertion: i + PAGE_HEAP_NO_USER_LOW == n_heap
            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 mariadbd 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.
            230124 16:40:12 [ERROR] mysqld got signal 6 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.
             
            To report this bug, see https://mariadb.com/kb/en/reporting-bugs
             
            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.
             
            Server version: 10.6.11-MariaDB
            key_buffer_size=25165824
            read_buffer_size=131072
            max_used_connections=2
            max_threads=2002
            thread_count=2
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 4433141 K  bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.
             
            Thread pointer: 0x7fb3b80009b8
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7fbb881b6c80 thread_stack 0x49000
            ??:0(my_print_stacktrace)[0x562068d5898e]
            ??:0(handle_fatal_signal)[0x5620687a7df7]
            sigaction.c:0(__restore_rt)[0x7fbba2bea630]
            :0(__GI_raise)[0x7fbba2035387]
            :0(__GI_abort)[0x7fbba2036a78]
            /usr/sbin/mariadbd(+0x68891d)[0x56206846091d]
            ??:0(std::unique_lock<std::mutex>::unlock())[0x562068b26720]
            ??:0(std::pair<std::_Rb_tree_iterator<std::pair<unsigned long const, bool> >, bool> std::_Rb_tree<unsigned long, std::pair<unsigned long const, bool>, std::_Select1st<std::pair<unsigned long const, bool> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, bool> > >::_M_emplace_unique<unsigned long&, bool>(unsigned long&, bool&&))[0x562068bee12f]
            ??:0(std::pair<std::_Rb_tree_iterator<std::pair<unsigned long const, bool> >, bool> std::_Rb_tree<unsigned long, std::pair<unsigned long const, bool>, std::_Select1st<std::pair<unsigned long const, bool> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, bool> > >::_M_emplace_unique<unsigned long&, bool>(unsigned long&, bool&&))[0x562068bef56c]
            ??:0(std::pair<std::_Rb_tree_iterator<std::pair<unsigned long const, bool> >, bool> std::_Rb_tree<unsigned long, std::pair<unsigned long const, bool>, std::_Select1st<std::pair<unsigned long const, bool> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, bool> > >::_M_emplace_unique<unsigned long&, bool>(unsigned long&, bool&&))[0x562068befa83]
            ??:0(void std::__introsort_loop<unsigned char**, long>(unsigned char**, unsigned char**, long))[0x562068b5ab6c]
            ??:0(void std::__introsort_loop<unsigned char**, long>(unsigned char**, unsigned char**, long))[0x562068b5babc]
            ??:0(wsrep_notify_status(wsrep::server_state::state, wsrep::view const*))[0x562068ab08ab]
            ??:0(mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool, bool))[0x5620686237f4]
            ??:0(Sql_cmd_alter_table::execute(THD*))[0x56206868844e]
            ??:0(mysql_execute_command(THD*, bool))[0x56206858562a]
            ??:0(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5620685893db]
            ??:0(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56206858b59a]
            ??:0(do_command(THD*, bool))[0x56206858cc83]
            ??:0(do_handle_one_connection(CONNECT*, bool))[0x562068683547]
            ??:0(handle_one_connection)[0x5620686837e4]
            ??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x5620689eb35c]
            pthread_create.c:0(start_thread)[0x7fbba2be2ea5]
            ??:0(__clone)[0x7fbba20fdb0d]
             
            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7fb3b8012c30): ALTER TABLE test ADD exception TINYINT(1) NOT NULL DEFAULT 0 AFTER htmlcode
             
            Connection ID (thread ID): 3
            Status: NOT_KILLED
             
            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
             
            The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
            information that should help you find out what is causing the crash.
            Writing a core file...
            Working directory at /var/lib/mysql
            Resource Limits:
            Limit                     Soft Limit           Hard Limit           Units
            Max cpu time              unlimited            unlimited            seconds
            Max file size             unlimited            unlimited            bytes
            Max data size             unlimited            unlimited            bytes
            Max stack size            8388608              unlimited            bytes
            Max core file size        0                    unlimited            bytes
            Max resident set          unlimited            unlimited            bytes
            Max processes             256904               256904               processes
            Max open files            32768                32768                files
            Max locked memory         65536                65536                bytes
            Max address space         unlimited            unlimited            bytes
            Max file locks            unlimited            unlimited            locks
            Max pending signals       256904               256904               signals
            Max msgqueue size         819200               819200               bytes
            Max nice priority         0                    0
            Max realtime priority     0                    0
            Max realtime timeout      unlimited            unlimited            us
            Core pattern: core
             
            Kernel version: Linux version 3.10.0-1160.80.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Nov 8 15:48:59 UTC 2022
            

            chvo Christophe Van Olmen added a comment - Also have the same issue. I can consistently replicate my error using the attached script.sql script.sql . Issue is related to ROW_FORMAT=COMPRESSED, if I set it to DYNAMIC I can add the column without issue. 2023-01-24 16:40:12 0x7fbb881b7700 InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.6.11/storage/innobase/page/page0zip.cc line 761 InnoDB: Failing assertion: i + PAGE_HEAP_NO_USER_LOW == n_heap 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 mariadbd 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. 230124 16:40:12 [ERROR] mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.   To report this bug, see https://mariadb.com/kb/en/reporting-bugs   We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.   Server version: 10.6.11-MariaDB key_buffer_size=25165824 read_buffer_size=131072 max_used_connections=2 max_threads=2002 thread_count=2 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 4433141 K bytes of memory Hope that's ok; if not, decrease some variables in the equation.   Thread pointer: 0x7fb3b80009b8 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x7fbb881b6c80 thread_stack 0x49000 ??:0(my_print_stacktrace)[0x562068d5898e] ??:0(handle_fatal_signal)[0x5620687a7df7] sigaction.c:0(__restore_rt)[0x7fbba2bea630] :0(__GI_raise)[0x7fbba2035387] :0(__GI_abort)[0x7fbba2036a78] /usr/sbin/mariadbd(+0x68891d)[0x56206846091d] ??:0(std::unique_lock<std::mutex>::unlock())[0x562068b26720] ??:0(std::pair<std::_Rb_tree_iterator<std::pair<unsigned long const, bool> >, bool> std::_Rb_tree<unsigned long, std::pair<unsigned long const, bool>, std::_Select1st<std::pair<unsigned long const, bool> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, bool> > >::_M_emplace_unique<unsigned long&, bool>(unsigned long&, bool&&))[0x562068bee12f] ??:0(std::pair<std::_Rb_tree_iterator<std::pair<unsigned long const, bool> >, bool> std::_Rb_tree<unsigned long, std::pair<unsigned long const, bool>, std::_Select1st<std::pair<unsigned long const, bool> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, bool> > >::_M_emplace_unique<unsigned long&, bool>(unsigned long&, bool&&))[0x562068bef56c] ??:0(std::pair<std::_Rb_tree_iterator<std::pair<unsigned long const, bool> >, bool> std::_Rb_tree<unsigned long, std::pair<unsigned long const, bool>, std::_Select1st<std::pair<unsigned long const, bool> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, bool> > >::_M_emplace_unique<unsigned long&, bool>(unsigned long&, bool&&))[0x562068befa83] ??:0(void std::__introsort_loop<unsigned char**, long>(unsigned char**, unsigned char**, long))[0x562068b5ab6c] ??:0(void std::__introsort_loop<unsigned char**, long>(unsigned char**, unsigned char**, long))[0x562068b5babc] ??:0(wsrep_notify_status(wsrep::server_state::state, wsrep::view const*))[0x562068ab08ab] ??:0(mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool, bool))[0x5620686237f4] ??:0(Sql_cmd_alter_table::execute(THD*))[0x56206868844e] ??:0(mysql_execute_command(THD*, bool))[0x56206858562a] ??:0(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5620685893db] ??:0(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56206858b59a] ??:0(do_command(THD*, bool))[0x56206858cc83] ??:0(do_handle_one_connection(CONNECT*, bool))[0x562068683547] ??:0(handle_one_connection)[0x5620686837e4] ??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x5620689eb35c] pthread_create.c:0(start_thread)[0x7fbba2be2ea5] ??:0(__clone)[0x7fbba20fdb0d]   Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7fb3b8012c30): ALTER TABLE test ADD exception TINYINT(1) NOT NULL DEFAULT 0 AFTER htmlcode   Connection ID (thread ID): 3 Status: NOT_KILLED   Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off   The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains information that should help you find out what is causing the crash. Writing a core file... Working directory at /var/lib/mysql Resource Limits: Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 256904 256904 processes Max open files 32768 32768 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 256904 256904 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us Core pattern: core   Kernel version: Linux version 3.10.0-1160.80.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Nov 8 15:48:59 UTC 2022

            chvo Given script failure should've been fixed by MDEV-28797 (Fixed version is 10.6.12)

            thiru Thirunarayanan Balathandayuthapani added a comment - chvo Given script failure should've been fixed by MDEV-28797 (Fixed version is 10.6.12)

            Great! I'll test it when 10.6.12 is released.

            chvo Christophe Van Olmen added a comment - Great! I'll test it when 10.6.12 is released.

            chvo, 10.6.12 was released a while back. Does it work for you?

            thiru, is this bug actually a duplicate of MDEV-28797, or is there anything else to do?

            marko Marko Mäkelä added a comment - chvo , 10.6.12 was released a while back. Does it work for you? thiru , is this bug actually a duplicate of MDEV-28797 , or is there anything else to do?

            marko Executed the test case script in 10.6.12 and verified it also. Would close this issue as duplicate of MDEV-28797

            thiru Thirunarayanan Balathandayuthapani added a comment - marko Executed the test case script in 10.6.12 and verified it also. Would close this issue as duplicate of MDEV-28797

            Test case works indeed fine for me on 10.6.12.

            chvo Christophe Van Olmen added a comment - Test case works indeed fine for me on 10.6.12.

            People

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