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

Memory leak in IPC service when queueing multiple messages to client

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 53 (Jun 2019), Sprint 54 (Jul 2019)
    • Story Points:
      0.5

      Description

      When mutiple messages are queued to be sent to clients either by service or by asynchronous socket, the message container is not freed after next message is popped from the send queue:

      diff --git a/src/libs/zbxipcservice/ipcservice.c b/src/libs/zbxipcservice/ipcservice.c
      index 5b7cd179fc..bce29b4fd9 100644
      --- a/src/libs/zbxipcservice/ipcservice.c
      +++ b/src/libs/zbxipcservice/ipcservice.c
      @@ -613,6 +613,7 @@ static void ipc_client_pop_tx_message(zbx_ipc_client_t *client)
              client->tx_header[ZBX_IPC_MESSAGE_CODE] = message->code;
              client->tx_header[ZBX_IPC_MESSAGE_SIZE] = message->size;
              client->tx_data = message->data;
      +       zbx_free(message);
       }
       
       /******************************************************************************
      

      However currently this leak is theoretical, as service uses strictly request/response pattern when communicating with clients and the same pattern is used when async socket is used by external clients to communicate with a service.

        Attachments

          Activity

            People

            • Assignee:
              ak Andrejs Kozlovs
              Reporter:
              wiper Andris Zeila
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: