I found a memory leak problem when setup replication from 10.1 to 10.4.17.
This manifests itself in uncontrolled memory consumption regardless of the buffer pool settings on the slave instance. The replica was deployed with mariabackup-10.1 and then upgraded with mysql_upgrade.
After analyzing the memory profiling data, the temporary solution was to disable performance_schema replication without turning off the schema itself, the leak remained, but memory consumption was significantly reduced.
Server configuration: master 10.1 replica 10.4 (sql_mode=")
Files in attachments: profiling enabled using performance_schema(massif_ps_on), disabled (massif_ps_off) and using replicate-ignore-db(massif_ps_on_rep_ign)
A temporary workaround is turning off the slave instance’s performance_schema.