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

Memory leak on parsing failure during SNMP preprocessing cache initialization

    XMLWordPrintable

Details

    • Team A
    • Sprint 99 (Apr 2023), Sprint 100 (May 2023)
    • 0.125

    Description

      1. add trapper item
      2. add dependent item with SNMP walk value preprocessing step
      3. start server with valgrind
      4. send invalid SNMP data (for example 'abc')
      5. stop server, observe reported memory leak
        ==1055051== HEAP SUMMARY:
        ==1055051==     in use at exit: 35,518 bytes in 217 blocks
        ==1055051==   total heap usage: 5,774 allocs, 5,557 frees, 2,306,885 bytes allocated
        ==1055051== 
        ==1055051== 808 bytes in 1 blocks are definitely lost in loss record 71 of 79
        ==1055051==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
        ==1055051==    by 0x516631: zbx_malloc2 (misc.c:151)
        ==1055051==    by 0x40CECB: zbx_default_mem_malloc_func (algodefs.c:173)
        ==1055051==    by 0x40E898: zbx_hashset_init_slots (hashset.c:51)
        ==1055051==    by 0x40E9D0: zbx_hashset_create_ext (hashset.c:95)
        ==1055051==    by 0x40E94A: zbx_hashset_create (hashset.c:74)
        ==1055051==    by 0x3C2433: zbx_snmp_value_cache_init (preproc_snmp.c:748)
        ==1055051==    by 0x3C27D9: item_preproc_snmp_walk_to_value (preproc_snmp.c:825)
        ==1055051==    by 0x3BAAA3: pp_execute_snmp_to_value (pp_execute.c:957)
        ==1055051==    by 0x3BAF1D: pp_execute_step (pp_execute.c:1090)
        ==1055051==    by 0x3BB27E: pp_execute (pp_execute.c:1174)
        ==1055051==    by 0x3B4C75: pp_task_process_dependent (pp_worker.c:68)
        ==1055051== 
        

      Attachments

        Activity

          People

            wiper Andris Zeila
            wiper Andris Zeila
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: