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

Undefined behavior when syncing history of deleted items

    XMLWordPrintable

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 22
    • Story Points:
      0.25

      Description

      DCconfig_get_items_by_itemids() will allocate items only if they exist in configuration cache

      DCmass_update_history() will search in all items, event in not allocated

      ==5180== Conditional jump or move depends on uninitialised value(s)
      ==5180==    at 0x468BC8: dc_item_compare (dbcache.c:2106)
      ==5180==    by 0x468BC8: bsearch (stdlib-bsearch.h:33)
      ==5180==    by 0x468BC8: DCmass_prepare_history (dbcache.c:2143)
      ==5180==    by 0x468BC8: DCsync_history (dbcache.c:2534)
      ==5180==    by 0x426C37: dbsyncer_thread (dbsyncer.c:77)
      ==5180==    by 0x494749: zbx_thread_start (threads.c:128)
      ==5180==    by 0x422105: MAIN_ZABBIX_ENTRY (server.c:1071)
      ==5180==    by 0x48B005: daemon_start (daemon.c:392)
      ==5180==    by 0x419738: main (server.c:820)
      ==5180==  Uninitialised value was created by a heap allocation
      ==5180==    at 0x4C2FB6B: malloc (vg_replace_malloc.c:299)
      ==5180==    by 0x498C97: zbx_malloc2 (misc.c:491)
      ==5180==    by 0x468A83: DCsync_history (dbcache.c:2519)
      ==5180==    by 0x426C37: dbsyncer_thread (dbsyncer.c:77)
      ==5180==    by 0x494749: zbx_thread_start (threads.c:128)
      ==5180==    by 0x422105: MAIN_ZABBIX_ENTRY (server.c:1071)
      ==5180==    by 0x48B005: daemon_start (daemon.c:392)
      ==5180==    by 0x419738: main (server.c:820)
      ==5180== 
      ==5180== Conditional jump or move depends on uninitialised value(s)
      ==5180==    at 0x469656: dc_item_compare (dbcache.c:2106)
      ==5180==    by 0x469656: bsearch (stdlib-bsearch.h:33)
      ==5180==    by 0x469656: DCmass_prepare_history (dbcache.c:2143)
      ==5180==    by 0x469656: DCsync_history (dbcache.c:2534)
      ==5180==    by 0x426C37: dbsyncer_thread (dbsyncer.c:77)
      ==5180==    by 0x494749: zbx_thread_start (threads.c:128)
      ==5180==    by 0x422105: MAIN_ZABBIX_ENTRY (server.c:1071)
      ==5180==    by 0x48B005: daemon_start (daemon.c:392)
      ==5180==    by 0x419738: main (server.c:820)
      ==5180==  Uninitialised value was created by a heap allocation
      ==5180==    at 0x4C2FB6B: malloc (vg_replace_malloc.c:299)
      ==5180==    by 0x498C97: zbx_malloc2 (misc.c:491)
      ==5180==    by 0x468A83: DCsync_history (dbcache.c:2519)
      ==5180==    by 0x426C37: dbsyncer_thread (dbsyncer.c:77)
      ==5180==    by 0x494749: zbx_thread_start (threads.c:128)
      ==5180==    by 0x422105: MAIN_ZABBIX_ENTRY (server.c:1071)
      ==5180==    by 0x48B005: daemon_start (daemon.c:392)
      ==5180==    by 0x419738: main (server.c:820)
      ==5180== 
      
      

        Attachments

          Activity

            People

            Assignee:
            wiper Andris Zeila
            Reporter:
            vso Vladislavs Sokurenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: