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

double free or corruption in dict_mem_table_free

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      This crash was found on release build

      # 2025-06-18T12:35:51 [1853762] INFO: basedir[1] : ->/Server_bin/10.11.12_RelWithDebInfo<- GIT_SHOW: HEAD, tag: mariadb-10.11.12, origin/bb-10.11-MDEV-36592 cafd22db7970ce081bafd887359aa0a77cfb769d 2025-04-28T15:58:16+03:00
      

      Stacktrace

      Core was generated by `/Server_bin/10.11.12_RelWithDebInfo/bin/mariadbd --no-defaults --basedir=/Serve'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140465512896064) at ./nptl/pthread_kill.c:44
      44      ./nptl/pthread_kill.c: No such file or directory.
      [Current thread is 1 (Thread 0x7fc0acffd640 (LWP 1856103))]
      (gdb) set print addr off
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140465512896064) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=140465512896064) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=140465512896064, signo=6) at ./nptl/pthread_kill.c:89
      #3  handle_fatal_signal (sig=6) at /data/Server/10.11.12/sql/signal_handler.cc:298
      #4  <signal handler called>
      #5  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140465512896064) at ./nptl/pthread_kill.c:44
      #6  __pthread_kill_internal (signo=6, threadid=140465512896064) at ./nptl/pthread_kill.c:78
      #7  __GI___pthread_kill (threadid=140465512896064, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #8  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #9  __GI_abort () at ./stdlib/abort.c:79
      #10 __libc_message (action=action@entry=do_abort, fmt=fmt@entry="%s\n") at ../sysdeps/posix/libc_fatal.c:155
      #11 malloc_printerr (str=str@entry="double free or corruption (fasttop)") at ./malloc/malloc.c:5664
      #12 _int_free (av=, p=, have_lock=0) at ./malloc/malloc.c:4539
      #13 __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3391
      #14 dict_mem_table_free (table=table@entry=) at /data/Server/10.11.12/storage/innobase/dict/dict0mem.cc:221
      #15 dict_sys_t::remove (this=<dict_sys>, table=table@entry=, lru=lru@entry=false, keep=keep@entry=false) at /data/Server/10.11.12/storage/innobase/dict/dict0dict.cc:1939
      #16 innobase_reload_table (thd=<optimized out>, table_name=..., ctx=..., table=) at /data/Server/10.11.12/storage/innobase/handler/handler0alter.cc:10662
      #17 ha_innobase::commit_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>, ha_alter_info=<optimized out>, commit=<optimized out>) at /data/Server/10.11.12/storage/innobase/handler/handler0alter.cc:11854
      #18 mysql_inplace_alter_table (target_mdl_request=, if_exists=false, start_alter_id=0, partial_alter=false, alter_ctx=, trigger_param=, ddl_log_state=, ha_alter_info=, altered_table=, table=, table_list=, thd=)
          at /data/Server/10.11.12/sql/sql_table.cc:8133
      #19 mysql_alter_table (thd=thd@entry=, new_db=new_db@entry=, new_name=new_name@entry=, create_info=create_info@entry=, table_list=<optimized out>, table_list@entry=, recreate_info=recreate_info@entry=, alter_info=, order_num=0, 
          order=, ignore=false, if_exists=false) at /data/Server/10.11.12/sql/sql_table.cc:11348
      #20 Sql_cmd_alter_table::execute (this=<optimized out>, thd=) at /data/Server/10.11.12/sql/sql_alter.cc:688
      #21 mysql_execute_command (thd=, is_called_from_prepared_stmt=<optimized out>) at /data/Server/10.11.12/sql/sql_parse.cc:6167
      #22 mysql_parse (thd=, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /data/Server/10.11.12/sql/sql_parse.cc:8179
      #23 dispatch_command (command=COM_QUERY, thd=, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /data/Server/10.11.12/sql/sql_parse.cc:2004
      #24 do_command (thd=thd@entry=, blocking=blocking@entry=true) at /data/Server/10.11.12/sql/sql_parse.cc:1418
      #25 do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /data/Server/10.11.12/sql/sql_connect.cc:1386
      #26 handle_one_connection (arg=) at /data/Server/10.11.12/sql/sql_connect.cc:1298
      #27 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #28 clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Core dump is present at pluto: /data/results/1750249790/TBR-2294

      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: