-
Problem report
-
Resolution: Fixed
-
Trivial
-
6.0.19
-
Sprint 103 (Aug 2023)
-
1
Steps to reproduce:
How to use zabbix.
- Enable encryption by certificate in Host settings.
- Memory usage will increase over time.
How to use the script.
- Clone zabbix repository. (git clone --depth 1 https://github.com/zabbix/zabbix.git && cd zabbix)
- Place the attached script.rb in the root directory of the repository. (cp <path to script.rb> .)
- Run script.rb. (ruby script.rb)
Result:
See screenshot for how to use zabbix.
- The server restarts zabbix-agent2 every day around 6 am.
See the log below for how to use the script.
You can see that the memory usage increases with the number of calls made by zabbix_get.
************* Check for no pached ************* ============ Check if TLS is not used. (1000 times) ============= VmRSS: 17664 kB ============ Check if TLS is used. (1000 times) ============= VmRSS: 32520 kB ============ Check if TLS is not used. (5000 times) ============= VmRSS: 17608 kB ============ Check if TLS is used. (5000 times) ============= VmRSS: 64480 kB patching file src/go/pkg/tls/tls.go ************* Check for pached ************* ============ Check if TLS is not used. (1000 times) ============= VmRSS: 17604 kB ============ Check if TLS is used. (1000 times) ============= VmRSS: 24720 kB ============ Check if TLS is not used. (5000 times) ============= VmRSS: 18204 kB ============ Check if TLS is used. (5000 times) ============= VmRSS: 28520 kB
Since tls_description is called from Client#String, the following commit seems to be the cause.
This is why it has been occurring since version 6.0.19.
https://github.com/zabbix/zabbix/commit/987c1827a6d5b9f5e3c3e2dfcaafe766b3a860b2
https://github.com/zabbix/zabbix/commit/883caac8bd563c3d8706a725a687618e089ab25e
Possibly related.
https://support.zabbix.com/browse/ZBX-23076
https://support.zabbix.com/browse/ZBX-23053
https://support.zabbix.com/browse/ZBX-23047
Expected:
See patch.diff in the attached file.