[MXS-1008] MySQL Monitor with scripts leaks memory Created: 2016-11-18  Updated: 2016-11-21  Resolved: 2016-11-21

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 2.0.2
Fix Version/s: 2.0.2

Type: Bug Priority: Minor
Reporter: Esa Korhonen Assignee: Esa Korhonen
Resolution: Fixed Votes: 0
Labels: 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.



 Comments   
Comment by Dipti Joshi (Inactive) [ 2016-11-18 ]

johan.wikman If this is about a leak - should the priority be Major instead of Minor ?

Generated at Thu Feb 08 04:03:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.