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

memory errors when server links updated template hostprototype with new interface

XMLWordPrintable

    • Sprint 79 (Aug 2021)
    • 0.3

      Following scenario breaks:
      1) create a template X with host_prototype that has 2 custom interfaces (agent, give them names, ports)
      2) create autoregistration action that adds a host and links template X
      3) launch server and agent and trigger autoregistration and template X linking
      4) stop server and agent
      5) unlink (not unlink and clear) template from newly created host
      6) update template X - add new interface to prototype
      7) update host metadata on agent to force new autoregistration
      8) launch server and agent

      Result:

      ==00:00:00:08.356 22534== Invalid free() / delete / delete[] / realloc()                                                                                                                                                           
      ==00:00:00:08.356 22534==    at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)                                                                                                                           
      ==00:00:00:08.356 22534==    by 0x3EA010: DBhost_prototypes_interfaces_make (host.c:2991)                                                                                                                                          
      ==00:00:00:08.356 22534==    by 0x3EC326: DBcopy_template_host_prototypes (host.c:3640)                                                                                                                                            
      ==00:00:00:08.356 22534==    by 0x3EF736: DBcopy_template_elements (host.c:4606)                                                                                                                                                   
      ==00:00:00:08.356 22534==    by 0x29E813: op_template_add (operations.c:968)                                                                                                                                                       
      ==00:00:00:08.356 22534==    by 0x2936BC: execute_operations (actions.c:2884)                                                                                                                                                      
      ==00:00:00:08.356 22534==    by 0x294259: process_actions (actions.c:3274)                                                                                                                                                         
      ==00:00:00:08.356 22534==    by 0x29A4DA: flush_events (events.c:2130)                                                                                                                                                             
      ==00:00:00:08.356 22534==    by 0x29BEFA: zbx_process_events (events.c:2847)                                                                                                                                                       
      ==00:00:00:08.356 22534==    by 0x3DB270: DBregister_host_flush (db.c:1874)                                                                                                                                                        
      ==00:00:00:08.356 22534==    by 0x3DA399: DBregister_host (db.c:1560)                                                                                                                                                              
      ==00:00:00:08.356 22534==    by 0x19C989: db_register_host (active.c:87)                                                                                                                                                           
      ==00:00:00:08.356 22534==  Address 0xe000000 is in a --- mapped file /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0 segment                                                                                                            
      ==00:00:00:08.356 22534==                                                                                                                                                                                                          
      ==00:00:00:08.359 22534== Conditional jump or move depends on uninitialised value(s)                                                                                                                                               
      ==00:00:00:08.359 22534==    at 0x3EA808: DBhost_prototypes_save (host.c:3172)                                                                                                                                                     
      ==00:00:00:08.359 22534==    by 0x3EC362: DBcopy_template_host_prototypes (host.c:3641)                                                                                                                                            
      ==00:00:00:08.359 22534==    by 0x3EF736: DBcopy_template_elements (host.c:4606)                                                                                                                                                   
      ==00:00:00:08.359 22534==    by 0x29E813: op_template_add (operations.c:968)                                                                                                                                                       
      ==00:00:00:08.359 22534==    by 0x2936BC: execute_operations (actions.c:2884)                                                                                                                                                      
      ==00:00:00:08.359 22534==    by 0x294259: process_actions (actions.c:3274)                                                                                                                                                         
      ==00:00:00:08.359 22534==    by 0x29A4DA: flush_events (events.c:2130)                                                                                                                                                             
      ==00:00:00:08.359 22534==    by 0x29BEFA: zbx_process_events (events.c:2847)                                                                                                                                                       
      ==00:00:00:08.359 22534==    by 0x3DB270: DBregister_host_flush (db.c:1874)                                                                                                                                                        
      ==00:00:00:08.359 22534==    by 0x3DA399: DBregister_host (db.c:1560)                                                                                                                                                              
      ==00:00:00:08.359 22534==    by 0x19C989: db_register_host (active.c:87)                                                                                                                                                           
      ==00:00:00:08.359 22534==    by 0x19CE6B: get_hostid_by_host (active.c:290)                                                                                                                                                        
      ==00:00:00:08.359 22534==  Uninitialised value was created by a heap allocation                                                                                                                                                    
      ==00:00:00:08.359 22534==    at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)                                                                                                                         
      ==00:00:00:08.359 22534==    by 0x35E3AC: zbx_malloc2 (misc.c:624)                                                                                                                                                                 
      ==00:00:00:08.359 22534==    by 0x3E9764: DBhost_prototypes_interfaces_make (host.c:2853)                                                                                                                                          
      ==00:00:00:08.359 22534==    by 0x3EC326: DBcopy_template_host_prototypes (host.c:3640)                                                                                                                                            
      ==00:00:00:08.359 22534==    by 0x3EF736: DBcopy_template_elements (host.c:4606)                                                                                                                                                   
      ==00:00:00:08.359 22534==    by 0x29E813: op_template_add (operations.c:968)                                                                                                                                                       
      ==00:00:00:08.359 22534==    by 0x2936BC: execute_operations (actions.c:2884)                                                                                                                                                      
      ==00:00:00:08.359 22534==    by 0x294259: process_actions (actions.c:3274)                                                                                                                                                         
      ==00:00:00:08.359 22534==    by 0x29A4DA: flush_events (events.c:2130)                                                                                                                                                             
      ==00:00:00:08.359 22534==    by 0x29BEFA: zbx_process_events (events.c:2847)                                                                                                                                                       
      ==00:00:00:08.359 22534==    by 0x3DB270: DBregister_host_flush (db.c:1874)                                                                                                                                                        
      ==00:00:00:08.359 22534==    by 0x3DA399: DBregister_host (db.c:1560)     
      

      Issue likely is caused by ZBXNEXT-6063

            asestakovs Aleksejs Sestakovs
            arimdjonoks Artjoms Rimdjonoks
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: