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

Crash with frequent network discovery rule

XMLWordPrintable

    • Sprint 102 (Jul 2023)
    • 0.5

      Create discovery rule with range 127.0.0.1/24 and check TCP (10054) on Zabbix proxy and notice:

      164906:20230707:180049.454 dmanager.job_refs:2
      164906:20230707:180049.454 jobid2 p:0x915f480
      164906:20230707:180049.455 jobid2 p:0xe51bea0
      164906:20230707:180049.455 dmanager.job_refs p:0xe51bea0
      164906:20230707:180049.455 job 0x915f480
      ==164906== Thread 3:
      ==164906== Invalid read of size 8
      ==164906==    at 0x44161C: zbx_default_uint64_compare_func (algodefs.c:108)
      ==164906==    by 0x44168F: zbx_default_uint64_ptr_compare_func (algodefs.c:118)
      ==164906==    by 0x5D8B8EF: bsearch (stdlib-bsearch.h:33)
      ==164906==    by 0x18C49B: zbx_vector_discoverer_jobs_ptr_bsearch (discoverer.c:95)
      ==164906==    by 0x18F497: discoverer_job_remove (discoverer.c:1147)
      ==164906==    by 0x191017: discoverer_worker_entry (discoverer.c:1499)
      ==164906==    by 0x5DCE813: start_thread (pthread_create.c:444)
      ==164906==    by 0x5E37D5B: thread_start (clone.S:79)
      ==164906==  Address 0x915f480 is 0 bytes inside a block of size 72 free'd
      ==164906==    at 0x4887B60: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
      ==164906==    by 0x1928FF: discoverer_job_free (discoverer_job.c:90)
      ==164906==    by 0x18F4FB: discoverer_job_remove (discoverer.c:1155)
      ==164906==    by 0x191017: discoverer_worker_entry (discoverer.c:1499)
      ==164906==    by 0x5DCE813: start_thread (pthread_create.c:444)
      ==164906==    by 0x5E37D5B: thread_start (clone.S:79)
      ==164906==  Block was alloc'd at
      ==164906==    at 0x48850E8: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
      ==164906==    by 0x43DCE3: zbx_malloc2 (misc.c:149)
      ==164906==    by 0x192937: discoverer_job_create (discoverer_job.c:97)
      ==164906==    by 0x18F1C3: process_discovery (discoverer.c:1095)
      ==164906==    by 0x191D63: discoverer_thread (discoverer.c:1865)
      ==164906==    by 0x3627EB: zbx_thread_start (threads.c:124)
      ==164906==    by 0x1899F7: MAIN_ZABBIX_ENTRY (proxy.c:1568)
      ==164906==    by 0x41112B: zbx_daemon_start (daemon.c:374)
      ==164906==    by 0x18871B: main (proxy.c:1163)
      ==164906== 
      ==164906== Invalid read of size 8
      ==164906==    at 0x44163C: zbx_default_uint64_compare_func (algodefs.c:108)
      ==164906==    by 0x44168F: zbx_default_uint64_ptr_compare_func (algodefs.c:118)
      ==164906==    by 0x5D8B8EF: bsearch (stdlib-bsearch.h:33)
      ==164906==    by 0x18C49B: zbx_vector_discoverer_jobs_ptr_bsearch (discoverer.c:95)
      ==164906==    by 0x18F497: discoverer_job_remove (discoverer.c:1147)
      ==164906==    by 0x191017: discoverer_worker_entry (discoverer.c:1499)
      ==164906==    by 0x5DCE813: start_thread (pthread_create.c:444)
      ==164906==    by 0x5E37D5B: thread_start (clone.S:79)
      ==164906==  Address 0x915f480 is 0 bytes inside a block of size 72 free'd
      ==164906==    at 0x4887B60: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
      ==164906==    by 0x1928FF: discoverer_job_free (discoverer_job.c:90)
      ==164906==    by 0x18F4FB: discoverer_job_remove (discoverer.c:1155)
      ==164906==    by 0x191017: discoverer_worker_entry (discoverer.c:1499)
      ==164906==    by 0x5DCE813: start_thread (pthread_create.c:444)
      ==164906==    by 0x5E37D5B: thread_start (clone.S:79)
      ==164906==  Block was alloc'd at
      ==164906==    at 0x48850E8: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
      ==164906==    by 0x43DCE3: zbx_malloc2 (misc.c:149)
      ==164906==    by 0x192937: discoverer_job_create (discoverer_job.c:97)
      ==164906==    by 0x18F1C3: process_discovery (discoverer.c:1095)
      ==164906==    by 0x191D63: discoverer_thread (discoverer.c:1865)
      ==164906==    by 0x3627EB: zbx_thread_start (threads.c:124)
      ==164906==    by 0x1899F7: MAIN_ZABBIX_ENTRY (proxy.c:1568)
      ==164906==    by 0x41112B: zbx_daemon_start (daemon.c:374)
      ==164906==    by 0x18871B: main (proxy.c:1163)
      ==164906== 
      
      

      Debug patch attached:
      ZBX-23075.diff

            asestakovs Aleksejs Sestakovs
            vso Vladislavs Sokurenko
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: