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

Handlersocket Memory Leak in 10.11

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11.5
    • 10.11
    • OTHER
    • None
    • Rocky Linux 8.8

    Description

      After enable the HandlerSocket plugin, stopping the service causes a memory leak.
      I have pasted the log when I tried enabling ASAN in the attached file.
      mariadb_log.txt

      2023-09-28 16:48:33 0 [Note] InnoDB: Buffer pool(s) dump completed at 230928 16:48:33
      2023-09-28 16:48:33 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
      2023-09-28 16:48:33 0 [Note] InnoDB: Shutdown completed; log sequence number 96909540; transaction id 61897
      handlersocket: terminated
      2023-09-28 16:48:33 0 [Note] /usr/sbin/mariadbd: Shutdown complete
       
      Warning: Memory not freed: 48
      


      How to repeat:

      1) Enable HandlerSocket Setting in my.cnf

      [mysqld]
      plugin_maturity=beta
      loose_handlersocket_port = 9998
      loose_handlersocket_port_wr = 9999
      loose_handlersocket_threads = 16
      loose_handlersocket_threads_wr = 1
      open_files_limit = 65535
      

      2) Install HandlerSocket Plugin

      > install plugin handlersocket soname 'handlersocket.so';
      

      3) Create DB data for testing

      CREATE DATABASE testdb;
      CREATE TABLE testdb.table1 (k int key, v char(20));
      INSERT INTO testdb.table1 values (234,'foo'),(678,'bar');
      

      4) Check operation with telnet
      All are specified using TAB delimiters.
      $ telnet localhost 9999

      P	0	testdb	table1	PRIMARY	k,v
      0	1
      0	=	1	234
      0	2	234	foo
      0	+	2	789	hoge
      0	1
      0	=	1	789
      0	2	789	hoge
      ^]
      telnet> quit
      Connection closed.
      

      5) Stop MariaDB Service

      Attachments

        1. mariadb_log.txt
          20 kB
          Yutaro Iwasaki
        2. mariadb_mleak_log.txt
          79 kB
          Yutaro Iwasaki
        3. Test_CMD.txt
          4 kB
          Yutaro Iwasaki

        Activity

          People

            serg Sergei Golubchik
            iytarou Yutaro Iwasaki
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.