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

memcpy(NULL, NULL, 0) in process CPU statistics collector

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 4.0.30rc1
    • Agent (G)
    • None
    • GNU/Linux

      Steps to reproduce:

      1. Create item proc.cpu.util[,,,No such process]
      2. Compile agent with GCC hardened flags (see attachment gcc9_c_options.txt).
      3. Run agent with DebugLevel=4
      4. Observe in agent log
         90146:20210226:232200.270 Requested [proc.cpu.util[,,,No such process]]
         90146:20210226:232200.270 In procstat_add()
         90146:20210226:232200.270 In zbx_dshm_realloc() shmid:-1 size:21704
         90146:20210226:232200.270 In procstat_copy_data()
         90146:20210226:232200.270 End of procstat_copy_data()
         90146:20210226:232200.270 End of zbx_dshm_realloc():SUCCEED shmid:360472
         90146:20210226:232200.270 End of procstat_add()
         90144:20210226:232200.612 __zbx_zbx_setproctitle() title:'collector [processing data]'
         90144:20210226:232200.612 In update_cpustats()
         90144:20210226:232200.612 End of update_cpustats()
         90148:20210226:232200.616 In send_buffer() host:'127.0.0.1' port:10091 entries:0/100
         90148:20210226:232200.616 End of send_buffer():SUCCEED
         90148:20210226:232200.616 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
        procstat.c:756:3: runtime error: null pointer passed as argument 1, which is declared to never be null
        procstat.c:756:3: runtime error: null pointer passed as argument 2, which is declared to never be null
        

            zabbix.dev Zabbix Development Team
            andris Andris Mednis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: