Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23053

Memory leak with cert based encryption - Zabbix Agent 2 Windows Server 2019

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 6.4.4
    • Agent2 plugin (N)
    • None
    • Microsoft Windows Server 2019 Standard (Virtual machine) with Zabbix Agent 2 v6.4.4.2400
      Zabbix Passive checks
      Certificates with 2048 Bits keys

      Steps to reproduce:

      1. Set "TLSConnect=cert", "TLSAccept=cert", "TLSCAFile=...", "TLSCertFile=...", "TLSKeyFile=..." in Agent config
      2. Set "Connections to host" and "Connections from host" to "Certificate" in Zabbix Web GUI
      3. Link template "Windows by Zabbix agent" to host

      Result:
      Memory usage of "zabbix_agent2.exe" is increasing constantly. We already saw it with over 4GB. While unencrypted, it consumes about ~20MB.
      With "DebugLevel=5" I can see no error, just the following repeating for the different item requests:

      2023/07/04 08:51:17.045131 connection established using TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate issuer:"emailAddress=..."
      2023/07/04 08:51:17.045131 Calling C function "tls_connected()"
      2023/07/04 08:51:17.045131 Calling C function "tls_read()"
      2023/07/04 08:51:17.045131 Calling C function "tls_send()"
      2023/07/04 08:51:17.045131 Calling C function "tls_connected()"
      2023/07/04 08:51:17.045131 Calling C function "tls_read()"
      2023/07/04 08:51:17.045131 received passive check request: 'service.info["MSDTC",state]' from 'x.x.x.x'
      2023/07/04 08:51:17.045690 [1] processing update request (1 requests)
      2023/07/04 08:51:17.045690 [1] adding new request for key: 'service.info["MSDTC",state]'
      2023/07/04 08:51:17.045690 [1] created direct exporter task for plugin 'WindowsServices' itemid:0 key 'service.info["MSDTC",state]'
      2023/07/04 08:51:17.045690 plugin Cpu: executing collector task
      2023/07/04 08:51:17.045690 plugin WindowsPerfMon: executing collector task
      2023/07/04 08:51:17.045690 executing direct exporter task for key 'service.info["MSDTC",state]'
      2023/07/04 08:51:17.046235 executed direct exporter task for key 'service.info["MSDTC",state]'
      2023/07/04 08:51:17.046235 sending passive check response: '0' to 'x.x.x.x'
      2023/07/04 08:51:17.046235 Calling C function "tls_connected()"
      2023/07/04 08:51:17.046235 Calling C function "tls_write()"
      2023/07/04 08:51:17.046779 Calling C function "tls_recv()"
      2023/07/04 08:51:17.046779 Calling C function "tls_recv()"
      2023/07/04 08:51:17.046779 Calling C function "tls_close()"
      2023/07/04 08:51:17.046779 Calling C function "tls_free()"
      2023/07/04 08:51:18.049109 Calling C function "tls_new_server()"
      2023/07/04 08:51:18.049109 Calling C function "tls_free()"
      2023/07/04 08:51:18.049109 Calling C function "tls_ready()"
      2023/07/04 08:51:18.049639 Calling C function "tls_send()"
      2023/07/04 08:51:18.049639 Calling C function "tls_connected()"
      2023/07/04 08:51:18.049639 Calling C function "tls_accept()"
      2023/07/04 08:51:18.049639 Calling C function "tls_recv()"
      2023/07/04 08:51:18.049639 Calling C function "tls_send()"
      2023/07/04 08:51:18.049639 Calling C function "tls_accept()"
      2023/07/04 08:51:18.051514 Calling C function "tls_recv()"
      2023/07/04 08:51:18.051514 Calling C function "tls_recv()"
      2023/07/04 08:51:18.053935 Calling C function "tls_send()"
      2023/07/04 08:51:18.053935 Calling C function "tls_accept()"
      2023/07/04 08:51:18.055056 Calling C function "tls_recv()"
      2023/07/04 08:51:18.055580 Calling C function "tls_recv()"
      2023/07/04 08:51:18.055624 Calling C function "tls_description()"
      2023/07/04 08:51:18.055624 Calling C function "free()" 

      Expected:
      Constant amount of memory usage without increasing to (seemingly) infinity.

            ksalins Karlis Salins
            bwentz_lapp Bjoern Wentz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: