Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1008

MySQL Monitor with scripts leaks memory

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.0.2
    • 2.0.2
    • mariadbmon
    • None

    Description

      In V2.0 (and likely others), using a script with MySQLMonitor seems to leak small amounts of memory. If a script is defined for a monitor e.g. with:
      [MySQL Monitor]
      type=monitor
      module=mysqlmon
      servers=LocalMaster1,LocalSlave1,LocalSlave2
      user=<...>
      passwd=<...>
      monitor_interval=5000
      script=/home/..../scripts/sql_monitor_script.sh $INITIATOR $EVENT $MASTERLIST

      and then MaxScale ran with:
      valgrind ./maxscale -d
      The output after stopping is:
      Shutting down MaxScale

      Closed /var/log/maxscale/maxscale1.log
      ==24105==
      ==24105== HEAP SUMMARY:
      ==24105== in use at exit: 187,978 bytes in 3,451 blocks
      ==24105== total heap usage: 6,583 allocs, 3,132 frees, 2,362,604 bytes allocated
      ==24105==
      ==24105== LEAK SUMMARY:
      ==24105== definitely lost: 1,377 bytes in 9 blocks
      ==24105== indirectly lost: 0 bytes in 0 blocks
      ==24105== possibly lost: 336 bytes in 1 blocks
      ==24105== still reachable: 186,265 bytes in 3,441 blocks
      ==24105== suppressed: 0 bytes in 0 blocks
      ==24105== Rerun with --leak-check=full to see details of leaked memory
      ==24105==
      ==24105== For counts of detected and suppressed errors, rerun with: -v
      ==24105== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

      With leak-check=full valgrind points towards pcre2_compile_8.

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            esa.korhonen Esa Korhonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.