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

SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression

    XMLWordPrintable

    Details

      Description

      SET GLOBAL query_cache_size=18446744073709547520;
      

      Leads to:

      10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

      Core was generated by `/test/MD110221-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1469308f1700 (LWP 2394488))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005635523f455c in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x0000563551b8c4de in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001469334af859 in __GI_abort () at abort.c:79
      #6  0x0000563552410a79 in DbugExit (why=why@entry=0x1469308ef920 "missing DBUG_RETURN or DBUG_VOID_RETURN macro in function \"my_malloc\"\n") at /test/10.6_dbg/dbug/dbug.c:2043
      #7  0x0000563552412a2a in _db_return_ (_stack_frame_=_stack_frame_@entry=0x1469308efb80) at /test/10.6_dbg/dbug/dbug.c:1210
      #8  0x00005635523ef759 in my_malloc (key=key@entry=0, size=size@entry=18446744073709530472, my_flags=my_flags@entry=0) at /test/10.6_dbg/mysys/my_malloc.c:116
      #9  0x000056355183f259 in Query_cache::init_cache (this=this@entry=0x563552e8e520 <query_cache>) at /test/10.6_dbg/sql/sql_cache.cc:2655
      #10 0x0000563551848670 in Query_cache::resize (this=0x563552e8e520 <query_cache>, query_cache_size_arg=18446744073709547520) at /test/10.6_dbg/sql/sql_cache.cc:1333
      #11 0x0000563551a39805 in fix_query_cache_size (self=<optimized out>, thd=0x1468ec000db8, type=<optimized out>) at /test/10.6_dbg/sql/sys_vars.cc:3061
      #12 0x00005635517c5ade in sys_var::update (this=0x563552eb65c0 <Sys_query_cache_size>, thd=0x1468ec000db8, var=0x1468ec0129b8) at /test/10.6_dbg/sql/set_var.cc:207
      #13 0x00005635517c5ff5 in set_var::update (this=<optimized out>, thd=<optimized out>) at /test/10.6_dbg/sql/set_var.cc:859
      #14 0x00005635517c7372 in sql_set_variables (thd=thd@entry=0x1468ec000db8, var_list=var_list@entry=0x1468ec005e90, free=free@entry=true) at /test/10.6_dbg/sql/set_var.cc:746
      #15 0x00005635518cadbb in mysql_execute_command (thd=thd@entry=0x1468ec000db8) at /test/10.6_dbg/sql/sql_parse.cc:4924
      #16 0x00005635518b421a in mysql_parse (thd=thd@entry=0x1468ec000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1469308f03d0) at /test/10.6_dbg/sql/sql_parse.cc:7906
      #17 0x00005635518c230b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1468ec000db8, packet=packet@entry=0x1468ec01aac9 "SET GLOBAL query_cache_size=18446744073709547520", packet_length=packet_length@entry=48) at /test/10.6_dbg/sql/sql_class.h:1295
      #18 0x00005635518c563d in do_command (thd=0x1468ec000db8) at /test/10.6_dbg/sql/sql_parse.cc:1365
      #19 0x0000563551a211ab in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5635554a0848, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #20 0x0000563551a218af in handle_one_connection (arg=arg@entry=0x5635554a0848) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #21 0x0000563551ed527d in pfs_spawn_thread (arg=0x5635553d4ef8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #22 0x00001469339bd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x00001469335ac293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (dbg), 10.5.9 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

      10.5.9 Debug Gives:

      10.5.9 927a882341eb1087e71d64de4e8cd89ab520de89 (Debug)

      10.5.9>SET GLOBAL query_cache_size=18446744073709547520;
      Query OK, 0 rows affected, 1 warning (0.001 sec)
       
      10.5.9>SHOW WARNINGS;
      +---------+------+--------------------------------------------------------------------------------+
      | Level   | Code | Message                                                                        |
      +---------+------+--------------------------------------------------------------------------------+
      | Warning | 1282 | Query cache failed to set size 18446744073709547520; new query cache size is 0 |
      +---------+------+--------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: