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

Embedded server crashes on CREATE TABLE in PS protocol



      # Run with --embedded --ps
      CREATE TABLE t1 ( i INT );

      Assertion failure on debug server:

      Stack trace from 10.1 commit 1512078a7a56779d6fdd307a93187b61494de897

      ysqltest_embedded: /src/10.1/libmysqld/../sql/mysqld.cc:4007: void my_malloc_size_cb_func(long long int, my_bool): Assertion `mysqld_server_initialized && thd' failed.
      mysqltest got signal 6
      #7  0x00007f38e11ae1d2 in __assert_fail () from /lib64/libc.so.6
      #8  0x0000559daddb7719 in my_malloc_size_cb_func (size=2008, is_thread_specific=1 '\001') at /src/10.1/libmysqld/../sql/mysqld.cc:4007
      #9  0x0000559dadd671f9 in update_malloc_size (size=2008, is_thread_specific=1 '\001') at /src/10.1/mysys/my_malloc.c:67
      #10 0x0000559dadd67352 in my_malloc (size=2008, my_flags=69648) at /src/10.1/mysys/my_malloc.c:117
      #11 0x0000559dadd6cd1e in alloc_root (mem_root=0x559db0bd8ee0, length=0) at /src/10.1/mysys/my_alloc.c:237
      #12 0x0000559dadd842f4 in mysql_stmt_prepare (stmt=0x559db0bd8ee0, query=0x559db0bd8cc0 "CREATE TABLE t1 ( i INT )", length=25) at /src/10.1/libmysql/libmysql.c:1664
      #13 0x0000559dadd34441 in connection_thread (arg=0x559db0a7a9d0) at /src/10.1/client/mysqltest.cc:886
      #14 0x00007f38e2ea10a4 in start_thread () from /lib64/libpthread.so.0
      #15 0x00007f38e126504d in clone () from /lib64/libc.so.6

      Crash on non-debug server:

      Stack trace from 10.1 commit 732adec0a4c75d99389230feeb0deca0ad668de7

      #2  <signal handler called>
      #3  my_malloc_size_cb_func (size=2016, is_thread_specific=<optimized out>) at /src/10.1-bug/libmysqld/../sql/mysqld.cc:4012
      #4  0x000055ddbff9552d in update_malloc_size (is_thread_specific=1 '\001', size=2016) at /src/10.1-bug/mysys/my_malloc.c:67
      #5  my_malloc (size=size@entry=2008, my_flags=69648) at /src/10.1-bug/mysys/my_malloc.c:117
      #6  0x000055ddbff99212 in alloc_root (mem_root=mem_root@entry=0x55ddc1c31858, length=0) at /src/10.1-bug/mysys/my_alloc.c:237
      #7  0x000055ddbffa0ac9 in mysql_stmt_prepare (stmt=0x55ddc1c31858, query=0x55ddc1c40308 "CREATE TABLE t1 ( i INT )", length=25) at /src/10.1-bug/libmysql/libmysql.c:1664
      #8  0x000055ddbff67431 in connection_thread (arg=0x55ddc1b0e778) at /src/10.1-bug/client/mysqltest.cc:886
      #9  0x00007f422b4cb0a4 in start_thread () from /lib64/libpthread.so.0
      #10 0x00007f422988f04d in clone () from /lib64/libc.so.6

      The problem was introduced by this commit:

      commit b4ff64568c88ab3ce559e7bd39853d9cbf86704a
      Author: Monty <monty@mariadb.org>
      Date:   Thu Apr 28 11:10:55 2016 +0300
          Fixed wrong counting of global Memory_used


          Issue Links



              • Assignee:
                serg Sergei Golubchik
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: