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

Memory leak 10.3.37 and 10.6.11

    XMLWordPrintable

Details

    Description

      Since the server auto updated from 10.3.36 to 10.3.37, as well as after updating from 10.3.37 to 10.6.11, there is a memory leak.

      on 10.3.37, top showed 1.3g use

        PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND    
      14406 mysql     20   0 3179620   1.3g   6132 S   1.2 17.6 152:58.38 mysqld
      

      Which didn't match the 162MB shown by SHOW ENGINE INNODB STATUS;

      ----------------------
      BUFFER POOL AND MEMORY
      ----------------------
      Total large memory allocated 170590208
      Dictionary memory allocated 340032
      Buffer pool size   8192
      Free buffers       1409
      Database pages     6100
      Old database pages 2255
      Modified db pages  0
      Percent of dirty pages(LRU & free pages): 0.000
      Max dirty pages percent: 75.000
      Pending reads 0
      Pending writes: LRU 0, flush list 0, single page 0
      Pages made young 6, not young 0
      0.00 youngs/s, 0.00 non-youngs/s
      Pages read 5379, created 721, written 4228656
      0.00 reads/s, 0.00 creates/s, 0.00 writes/s
      No buffer pool page gets since the last printout
      Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
      LRU len: 6100, unzip_LRU len: 0
      I/O sum[0]:cur[0], unzip sum[0]:cur[0]
      

      Moving to 10.6.11:

      Some px-aux | grep mariadb log points

      USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
      mysql    29577  1.5  7.2 2715668 577652 ?      Ssl  Nov23  21:56 /usr/sbin/mariadbd
      mysql    29577  1.5  7.2 2699668 580328 ?      Ssl  Nov23  22:09 /usr/sbin/mariadbd
      mysql    29577  1.5  7.2 2708100 584600 ?      Ssl  Nov23  22:27 /usr/sbin/mariadbd
      mysql    29577  1.5  7.3 2708232 585152 ?      Ssl  Nov23  22:34 /usr/sbin/mariadbd
      mysql    29577  1.5  7.3 2708232 585416 ?      Ssl  Nov23  22:36 /usr/sbin/mariadbd
      mysql    29577  2.1 11.8 2720628 945832 ?      Ssl  Nov23  59:49 /usr/sbin/mariadbd
      mysql    29577  2.8 17.9 3318176 1437704 ?     Ssl  Nov23 136:12 /usr/sbin/mariadbd
      

      I have done a couple of consecutive memory dumps using and while I may not understand what to look for, it seems like the growing files show data relating to these tables and queries.

      SELECT * FROM aercon0_aerweb.webaxess_sessions
                   WHERE id = ?
      

      SELECT webfolder, webpassword
                   FROM aercon0_aerweb.webaxess
                   WHERE webusername = ?
      

      UPDATE aercon0_aerweb.webaxess
                              SET aerware = ?,
                              last_comms = UNIX_TIMESTAMP()
                          WHERE webfolder = ?
      

      Memory dump script from here https://serverfault.com/questions/173999/dump-a-linux-processs-memory-to-file

      #!/bin/bash
       
      grep rw-p /proc/$1/maps \
      | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' \
      | while read start stop; do \
          gdb --batch --pid $1 -ex \
              "dump memory $1-$start-$stop.dump 0x$start 0x$stop"; \
      done
      

      I'll try to migrate everything, but here is my original issue - https://dba.stackexchange.com/questions/320126/memory-leak-mariadb-10-3-37

      Attachments

        1. my.cnf
          0.3 kB
        2. SELECT_BY_EVENT_NAME11.27.2022-16.19.txt
          82 kB
        3. SELECT_BY_EVENT_NAME11.28.2022-8.45.txt
          82 kB
        4. SHOW_ENGINE_INNODB_STATUS.txt
          26 kB
        5. SHOW_GLOBAL_STATUS.txt
          62 kB
        6. SHOW_GLOBAL_STATUS11.28.2022-8.45.txt
          24 kB
        7. webaxess_sessions.sql
          1 kB
        8. webaxess.sql
          2 kB

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              erikfriesen Erik Friesen
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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