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

Many uninitialised memory errors in server when running diag_info

    XMLWordPrintable

Details

    • Incident report
    • Status: Confirmed
    • Trivial
    • Resolution: Unresolved
    • 6.4.0beta4
    • 6.4 (plan)
    • None
    • None

    Description

      Starting Zabbix and doing some basic tasks like autoregistration and then diaginfo runtime commands shows many Valgrind uninitialised memory errors on master.

      1) (autoregistering some hosts with Windows active agent template and Linux agent template)

      ==00:00:10:36.666 4044435== Conditional jump or move depends on uninitialised value(s)
      ==00:00:10:36.673 4044435==    at 0x486B360: strlen (vg_replace_strmem.c:494)
      ==00:00:10:36.675 4044435==    by 0x40CADF: zbx_default_string_hash_func (algodefs.c:78)
      ==00:00:10:36.676 4044435==    by 0x31E5F3: __config_strpool_hash (dbconfig.c:591)
      ==00:00:10:36.676 4044435==    by 0x40F0D7: zbx_hashset_remove (hashset.c:282)
      ==00:00:10:36.676 4044435==    by 0x31E767: dc_strpool_release (dbconfig.c:628)
      ==00:00:10:36.677 4044435==    by 0x32664F: DCsync_triggers (dbconfig.c:3566)
      ==00:00:10:36.678 4044435==    by 0x32E7DF: DCsync_configuration (dbconfig.c:6904)
      ==00:00:10:36.679 4044435==    by 0x190627: dbconfig_thread (dbconfig.c:122)
      ==00:00:10:36.680 4044435==    by 0x3E17AF: zbx_thread_start (threads.c:115)
      ==00:00:10:36.680 4044435==    by 0x18DE6F: server_startup (server.c:1483)
      ==00:00:10:36.680 4044435==    by 0x18F5BB: MAIN_ZABBIX_ENTRY (server.c:2028)
      ==00:00:10:36.681 4044435==    by 0x4D994B: zbx_daemon_start (daemon.c:454)
      ==00:00:10:36.681 4044435==  Uninitialised value was created by a stack allocation
      ==00:00:10:36.681 4044435==    at 0x31E2EC: DCfind_id (dbconfig.c:510)
      ==00:00:10:36.681 4044435==
      ==00:00:10:36.681 4044435== Use of uninitialised value of size 8
      ==00:00:10:36.682 4044435==    at 0x40F110: zbx_hashset_remove (hashset.c:285)
      ==00:00:10:36.682 4044435==    by 0x31E767: dc_strpool_release (dbconfig.c:628)
      ==00:00:10:36.682 4044435==    by 0x32664F: DCsync_triggers (dbconfig.c:3566)
      ==00:00:10:36.682 4044435==    by 0x32E7DF: DCsync_configuration (dbconfig.c:6904)
      ==00:00:10:36.682 4044435==    by 0x190627: dbconfig_thread (dbconfig.c:122)
      ==00:00:10:36.682 4044435==    by 0x3E17AF: zbx_thread_start (threads.c:115)
      ==00:00:10:36.682 4044435==    by 0x18DE6F: server_startup (server.c:1483)
      ==00:00:10:36.682 4044435==    by 0x18F5BB: MAIN_ZABBIX_ENTRY (server.c:2028)
      ==00:00:10:36.682 4044435==    by 0x4D994B: zbx_daemon_start (daemon.c:454)
      ==00:00:10:36.682 4044435==    by 0x18D4D7: main (server.c:1278)
      ==00:00:10:36.682 4044435==  Uninitialised value was created by a stack allocation
      ==00:00:10:36.682 4044435==    at 0x31E2EC: DCfind_id (dbconfig.c:510)
      

      Deleting all hosts, changing host metadata on zabbix_agent, restarting zabbix_agent,
      autoregistering new host, linking Linux template, and then running diag_info:
      ./sbin/zabbix_server -R diaginfo
      and
      ./sbin/zabbix_server -R config_cache_reload

      several times

      2)

      ==00:00:06:46.965 4187752== Conditional jump or move depends on uninitialised value(s)
      ==00:00:06:46.972 4187752==    at 0x486B388: __GI_strlen (vg_replace_strmem.c:495)
      ==00:00:06:46.975 4187752==    by 0x5BD1F67: __vfprintf_internal (vfprintf-internal.c:1517)
      ==00:00:06:46.976 4187752==    by 0x5BBBE5F: vfprintf (vfprintf.c:23)
      ==00:00:06:46.979 4187752==    by 0x31599B: __zbx_zabbix_log (log.c:427)
      ==00:00:06:46.980 4187752==    by 0x3492FB: DCdump_items (dbconfig_dump.c:604)
      ==00:00:06:46.980 4187752==    by 0x34C4F7: DCdump_configuration (dbconfig_dump.c:1459)
      ==00:00:06:46.981 4187752==    by 0x32F683: DCsync_configuration (dbconfig.c:7409)
      ==00:00:06:46.982 4187752==    by 0x1917AF: dbconfig_thread (dbconfig.c:123)
      ==00:00:06:46.983 4187752==    by 0x3E3CE7: zbx_thread_start (threads.c:115)
      ==00:00:06:46.984 4187752==    by 0x18DF97: server_startup (server.c:1495)
      ==00:00:06:46.984 4187752==    by 0x18F70F: MAIN_ZABBIX_ENTRY (server.c:2041)
      ==00:00:06:46.986 4187752==    by 0x4DAF73: zbx_daemon_start (daemon.c:454)
      ==00:00:06:46.986 4187752==  Uninitialised value was created by a stack allocation
      ==00:00:06:46.987 4187752==    at 0x31C67C: DCfind_id (dbconfig.c:510)
      

      And another:

      3)

      ==00:00:06:46.994 4187752== Syscall param write(buf) points to uninitialised byte(s)
      ==00:00:06:46.995 4187752==    at 0x5C47C50: write (write.c:26)
      ==00:00:06:46.996 4187752==    by 0x5BE507B: [email protected]@GLIBC_2.17 (fileops.c:1180)
      ==00:00:06:46.996 4187752==    by 0x5BE443B: new_do_write (fileops.c:448)
      ==00:00:06:46.997 4187752==    by 0x5BE611F: _IO_new_do_write (fileops.c:425)
      ==00:00:06:46.997 4187752==    by 0x5BE611F: [email protected]@GLIBC_2.17 (fileops.c:422)
      ==00:00:06:46.997 4187752==    by 0x5BE5A27: [email protected]@GLIBC_2.17 (fileops.c:135)
      ==00:00:06:46.998 4187752==    by 0x5BD8AE7: [email protected]@GLIBC_2.17 (iofclose.c:53)
      ==00:00:06:46.998 4187752==    by 0x3159BB: __zbx_zabbix_log (log.c:432)
      ==00:00:06:46.998 4187752==    by 0x3492FB: DCdump_items (dbconfig_dump.c:604)
      ==00:00:06:46.998 4187752==    by 0x34C4F7: DCdump_configuration (dbconfig_dump.c:1459)
      ==00:00:06:46.998 4187752==    by 0x32F683: DCsync_configuration (dbconfig.c:7409)
      ==00:00:06:46.998 4187752==    by 0x1917AF: dbconfig_thread (dbconfig.c:123)
      ==00:00:06:46.998 4187752==    by 0x3E3CE7: zbx_thread_start (threads.c:115)
      ==00:00:06:46.998 4187752==  Address 0xe5a0a1d is 93 bytes inside a block of size 4,096 alloc'd
      ==00:00:06:46.998 4187752==    at 0x48650D8: malloc (vg_replace_malloc.c:381)
      ==00:00:06:46.998 4187752==    by 0x5BD88F3: _IO_file_doallocate (filedoalloc.c:101)
      ==00:00:06:46.998 4187752==    by 0x5BE71FF: _IO_doallocbuf (genops.c:347)
      ==00:00:06:46.998 4187752==    by 0x5BE71FF: _IO_doallocbuf (genops.c:342)
      ==00:00:06:46.998 4187752==    by 0x5BE65C7: [email protected]@GLIBC_2.17 (fileops.c:744)
      ==00:00:06:46.998 4187752==    by 0x5BE5717: _IO_new_file_xsputn (fileops.c:1243)
      ==00:00:06:46.998 4187752==    by 0x5BE5717: [email protected]@GLIBC_2.17 (fileops.c:1196)
      ==00:00:06:46.998 4187752==    by 0x5BD11CF: outstring_func (vfprintf-internal.c:239)
      ==00:00:06:46.998 4187752==    by 0x5BD11CF: __vfprintf_internal (vfprintf-internal.c:1516)
      ==00:00:06:46.999 4187752==    by 0x5BC099F: fprintf (fprintf.c:32)
      ==00:00:06:46.999 4187752==    by 0x315943: __zbx_zabbix_log (log.c:414)
      ==00:00:06:46.999 4187752==    by 0x3492FB: DCdump_items (dbconfig_dump.c:604)
      ==00:00:06:46.999 4187752==    by 0x34C4F7: DCdump_configuration (dbconfig_dump.c:1459)
      ==00:00:06:46.999 4187752==    by 0x32F683: DCsync_configuration (dbconfig.c:7409)
      ==00:00:06:46.999 4187752==    by 0x1917AF: dbconfig_thread (dbconfig.c:123)
      ==00:00:06:46.999 4187752==  Uninitialised value was created by a stack allocation
      ==00:00:06:46.999 4187752==    at 0x31C67C: DCfind_id (dbconfig.c:510)
      

      and another:

      4)

      ==00:00:07:48.725 4187752== Conditional jump or move depends on uninitialised value(s)
      ==00:00:07:48.726 4187752==    at 0x486C3CC: strcmp (vg_replace_strmem.c:924)
      ==00:00:07:48.726 4187752==    by 0x34BBB7: strpool_compare (dbconfig_dump.c:1307)
      ==00:00:07:48.727 4187752==    by 0x5BABE7B: msort_with_tmp.part.0 (msort.c:82)
      ==00:00:07:48.727 4187752==    by 0x5BABE2F: msort_with_tmp (msort.c:44)
      ==00:00:07:48.727 4187752==    by 0x5BABE2F: msort_with_tmp.part.0 (msort.c:53)
      ==00:00:07:48.727 4187752==    by 0x5BABE17: msort_with_tmp (msort.c:44)
      ==00:00:07:48.727 4187752==    by 0x5BABE17: msort_with_tmp.part.0 (msort.c:52)
      ==00:00:07:48.727 4187752==    by 0x5BABE2F: msort_with_tmp (msort.c:44)
      ==00:00:07:48.727 4187752==    by 0x5BABE2F: msort_with_tmp.part.0 (msort.c:53)
      ==00:00:07:48.727 4187752==    by 0x5BAC193: msort_with_tmp (msort.c:44)
      ==00:00:07:48.727 4187752==    by 0x5BAC193: qsort_r (msort.c:296)
      ==00:00:07:48.728 4187752==    by 0x418477: zbx_vector_ptr_sort (vector.c:26)
      ==00:00:07:48.728 4187752==    by 0x34BC67: DCdump_strpool (dbconfig_dump.c:1325)
      ==00:00:07:48.728 4187752==    by 0x34C54B: DCdump_configuration (dbconfig_dump.c:1481)
      ==00:00:07:48.728 4187752==    by 0x32F683: DCsync_configuration (dbconfig.c:7409)
      ==00:00:07:48.728 4187752==    by 0x1917AF: dbconfig_thread (dbconfig.c:123)
      ==00:00:07:48.728 4187752==  Uninitialised value was created by a stack allocation
      ==00:00:07:48.728 4187752==    at 0x31C67C: DCfind_id (dbconfig.c:510)
      

      5)

      ==00:00:12:37.890 28603== Conditional jump or move depends on uninitialised value(s)
      ==00:00:12:37.893 28603==    at 0x3D1F9C: zbx_shmem_get_stats (memalloc.c:748)
      ==00:00:12:37.893 28603==    by 0x3D209F: zbx_shmem_dump_stats (memalloc.c:771)
      ==00:00:12:37.895 28603==    by 0x32BE2F: DCsync_configuration (dbconfig.c:7308)
      ==00:00:12:37.896 28603==    by 0x190677: dbconfig_thread (dbconfig.c:123)
      ==00:00:12:37.897 28603==    by 0x3DB87F: zbx_thread_start (threads.c:115)
      ==00:00:12:37.897 28603==    by 0x18DEB3: server_startup (server.c:1482)
      ==00:00:12:37.897 28603==    by 0x18F5FF: MAIN_ZABBIX_ENTRY (server.c:2027)
      ==00:00:12:37.898 28603==    by 0x4D1A1F: zbx_daemon_start (daemon.c:454)
      ==00:00:12:37.898 28603==    by 0x18D4D7: main (server.c:1278)
      ==00:00:12:37.898 28603==  Uninitialised value was created by a stack allocation
      ==00:00:12:37.899 28603==    at 0x3193B0: DCfind_id (dbconfig.c:510)
      ==00:00:12:37.899 28603==
      

      Attachments

        Activity

          People

            zabbix.dev Zabbix Development Team
            arimdjonoks Artjoms Rimdjonoks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: