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

my_alloc.c:343: alloc_root: Assertion `*prev == 0' failed.

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.11.11
    • 10.11.11, 11.4.5
    • Server
    • None

    Description

      Error while using SET SESSION query_prealloc_size=8192; and SET max_session_mem_used=100000:

      2025-01-27  4:17:20 0 [Note] InnoDB: Buffer pool(s) load completed at 250127  4:17:20
      mariadbd: /home/panda/mariadb-10.11/mysys/my_alloc.c:343: alloc_root: Assertion `*prev == 0' failed.
      250127  4:17:20 [ERROR] /home/panda/mariadb-10.11/build/sql/mariadbd got signal 6 ;
      Sorry, we probably made a mistake, and this is a bug.
       
      Your assistance in bug reporting will enable us to fix this for the next release.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report
      a bug on https://jira.mariadb.org/.
       
      Please include the information from the server start above, to the end of the
      information below.
       
      Server version: 10.11.11-MariaDB-debug-log source revision: 24c903394712beb5394eff36846c425065488de0
       
      The information page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/
      contains instructions to obtain a better version of the backtrace below.
      Following these instructions will help MariaDB developers provide a fix quicker.
       
      Attempting backtrace. Include this in the bug report.
      (note: Retrieving this information may fail)
       
      Thread pointer: 0x7f3a38000dc8
      stack_bottom = 0x7f3a4af68000 thread_stack 0x49000
      mysys/stacktrace.c:215(my_print_stacktrace)[0x55f2390dc290]
      sql/signal_handler.cc:230(handle_fatal_signal)[0x55f2386f2a09]
      libc_sigaction.c:0(__restore_rt)[0x7f3a68da7520]
      nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x7f3a68dfb9fc]
      posix/raise.c:27(__GI_raise)[0x7f3a68da7476]
      stdlib/abort.c:81(__GI_abort)[0x7f3a68d8d7f3]
      intl/loadmsgcat.c:1177(_nl_load_domain)[0x7f3a68d8d71b]
      /lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x7f3a68d9ee96]
      mysys/my_alloc.c:344(alloc_root)[0x55f2390c3c98]
      mysys/my_alloc.c:674(memdup_root)[0x55f2390c4721]
      sql/table.cc:1859(TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long, unsigned char const*, unsigned long))[0x55f238475405]
      sql/handler.cc:6036(ha_create_table(THD*, char const*, char const*, char const*, HA_CREATE_INFO*, st_mysql_const_unsigned_lex_string*, bool))[0x55f2387080d0]
      sql/sql_table.cc:4705(create_table_impl(THD*, st_ddl_log_state*, st_ddl_log_state*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*))[0x55f238419a24]
      sql/sql_table.cc:4807(mysql_create_table_no_lock(THD*, st_ddl_log_state*, st_ddl_log_state*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*))[0x55f238419fbe]
      sql/sql_table.cc:5033(mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*))[0x55f23841a8e3]
      sql/sql_table.cc:12889(Sql_cmd_create_table_like::execute(THD*))[0x55f238433a33]
      sql/sql_parse.cc:6166(mysql_execute_command(THD*, bool))[0x55f2382f48c7]
      sql/sql_parse.cc:8187(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55f2382fac52]
      sql/sql_parse.cc:1907(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x55f2382e5f0d]
      sql/sql_parse.cc:1418(do_command(THD*, bool))[0x55f2382e4851]
      sql/sql_connect.cc:1386(do_handle_one_connection(CONNECT*, bool))[0x55f2384e3d97]
      sql/sql_connect.cc:1300(handle_one_connection)[0x55f2384e3b11]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55f238a3ef9a]
      nptl/pthread_create.c:442(start_thread)[0x7f3a68df9ac3]
      x86_64/clone3.S:83(__clone3)[0x7f3a68e8b850]

      Attachments

        Issue Links

          Activity

            does it happen in bb-10.11-release? It can be a duplicate of MDEV-35828

            serg Sergei Golubchik added a comment - does it happen in bb-10.11-release? It can be a duplicate of MDEV-35828

            serg Yes, this is on the current head revision for 10.11, and it happens without galera. I discovered this when I was dealing with MDEV-26266, where I modified the test for galera, but during debugging I noticed that there is a bug without galera too.

            sysprg Julius Goryavsky added a comment - serg Yes, this is on the current head revision for 10.11, and it happens without galera. I discovered this when I was dealing with MDEV-26266 , where I modified the test for galera, but during debugging I noticed that there is a bug without galera too.

            It does not happen on bb-10.11-release, and yes, it got fixed there by

            commit a5174aaffb8f22b211945170588828557dbdb211
            Author: Sergei Petrunia
            Date:   Tue Jan 14 22:42:18 2025 +0200
             
                MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself
            

            (the fix is for the 10.5 line, but it applies smoothly to 10.11 back and forth, so I reverted this one patch to check).

            elenst Elena Stepanova added a comment - It does not happen on bb-10.11-release, and yes, it got fixed there by commit a5174aaffb8f22b211945170588828557dbdb211 Author: Sergei Petrunia Date: Tue Jan 14 22:42:18 2025 +0200   MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself (the fix is for the 10.5 line, but it applies smoothly to 10.11 back and forth, so I reverted this one patch to check).

            People

              psergei Sergei Petrunia
              sysprg Julius Goryavsky
              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.