Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5071

mysqltest "let $var=`query`" leaks memory if server crashes on `query`

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 8.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Pretty sure this is upstream bug but I don't have a nice report for them. With --valgrind-clients, if

      At line 46: query 'let $_sss_slave_timeout= `select $_sss_slave_timeout * 6`' failed: 2013: Lost connection to MySQL server during query
      

      then

      ==4115== 78 bytes in 1 blocks are possibly lost in loss record 3 of 5
      ==4115==    at 0x4C2DABF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==4115==    by 0x48DD63: my_raw_malloc(unsigned long, int) (my_malloc.cc:199)
      ==4115==    by 0x48D9BB: my_malloc(unsigned int, unsigned long, int) (my_malloc.cc:81)
      ==4115==    by 0x48B87C: init_dynamic_string(DYNAMIC_STRING*, char const*, unsigned long, unsigned long) (my_string.cc:56)
      ==4115==    by 0x45C678: var_query_set(VAR*, char const*, char const**) (mysqltest.cc:2053)
      ==4115==    by 0x45D9C3: eval_expr(VAR*, char const*, char const**, bool, bool) (mysqltest.cc:2434)
      ==4115==    by 0x45C115: var_set(char const*, char const*, char const*, char const*) (mysqltest.cc:1938)
      ==4115==    by 0x464775: do_let(st_command*) (mysqltest.cc:4917)
      ==4115==    by 0x46EF69: main (mysqltest.cc:9091)
      ==4115== 
      ==4115== 2,080 bytes in 1 blocks are possibly lost in loss record 4 of 5
      ==4115==    at 0x4C2DABF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==4115==    by 0x48DD63: my_raw_malloc(unsigned long, int) (my_malloc.cc:199)
      ==4115==    by 0x48D9BB: my_malloc(unsigned int, unsigned long, int) (my_malloc.cc:81)
      ==4115==    by 0x48B87C: init_dynamic_string(DYNAMIC_STRING*, char const*, unsigned long, unsigned long) (my_string.cc:56)
      ==4115==    by 0x4645EE: do_let(st_command*) (mysqltest.cc:4896)
      ==4115==    by 0x46EF69: main (mysqltest.cc:9091)
      

      Minor issue, but nice to fix to clean up Valgrind CI logs a little

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                laurynas.biveinis Laurynas Biveinis (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: