I have been encountering what appears to be an unbounded memory leak on parallel replicated slaves running 10.3.8. Everything will be steady and memory usage will seem completely stable for weeks. It seems that it is caused by a specific workload/type of query but I have not been able to identify what. It does always occur during heavy load on the master, but not every time the master is loaded. When the problem does manifest, the memory usage grows very rapidly. It does not occur on the master they are replicating from. Restarting MariaDB is the only solution to free up memory I have found so far. I have attached the statuses and variables.
[BELLOW IS NO LONGER RELEVANT, LEFT FOR GOOGLE SEARCH HITS]:
In an attempt to debug what is going on I have compiled MariaDB with the BUILD/compile-amd64-valgrind-max script in docker. I have attached the Dockerfile to show the build process. I start valgrind and mariadb with the following command:
valgrind --tool=massif --massif-out-file=/var/log/mysql/massif.out.%p /usr/local/mysql/bin/mysqld
However, when I shutdown MariaDB with a signal or with the SHUTDOWN command, valgrind errors and does not output a massif file. I have attached that error log as well. It seems that MariaDB maybe built wrong? I'm not sure what I'm doing wrong and am reaching the end of my debugging abilities. I attached a log called compile_install that the output from the build. I'm not sure what to look for in it though.
Another night that might factor in is that I built the docker image on a host system running "Linux 4.18.7-arch1-1-ARCH" and am attempting to run it on a host running "Linux 4.14.67-coreos"