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

Zabbix agent 2 crashes on Windows - possibly pdh relatated crash

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 5.0.19rc1, 5.4.9rc1, 6.0.0alpha7
    • Agent (G)
    • None

      After ZBX-20164 was fixed another issue can be observed using the same test scenario (though it takes 3+ hours now)

      Steps to reproduce:

      1. Create a host that represents a working Windows machine (tested at Windows10 20H2)
      2. Add template "Template OS Windows by Zabbix agent" to this host
      3. Unlink the template
      4. Navigate to the list of items of this host and set update interval to 1 second for all items via mass update
      5. Start monitoring this host using a windows version of Zabbix agent2
      6. wait for some time (can take approximately 3 hours) 

      Result: Agent crashes with the following output (but nothing is written to log):

      D:\Zabbix\agent\go_agent>zabbix_agent2.exe -f -c zabbix_agent2.conf
      Starting Zabbix Agent 2 [Windows host]. (5.0.18rc1)
      Press Ctrl+C to exit.
      Exception 0xc0000005 0x0 0x7ffcae21f320 0x7ffcc9d922ef
      PC=0x7ffcc9d922ef
      signal arrived during external code executionsyscall.Syscall(0x7ffca3752fb0, 0x1, 0x2ef64e0, 0x0, 0x0, 0x0, 0x0, 0x0)
              c:/go/src/runtime/syscall_windows.go:188 +0xe9
      zabbix.com/pkg/win32.PdhCollectQueryData(0x2ef64e0, 0x5a3a01, 0xc00076be38)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/pkg/win32/pdh.go:130 +0x4f
      zabbix.com/plugins/windows/perfmon.(*Plugin).Collect(0x149e8c0, 0x0, 0x0)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/plugins/windows/perfmon/perfmon.go:104 +0xb9
      zabbix.com/internal/agent/scheduler.(*collectorTask).perform.func1(0xc0000d00c0, 0xf1c9a0, 0xc000248320)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/scheduler/task.go:104 +0x76
      created by zabbix.com/internal/agent/scheduler.(*collectorTask).perform
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/scheduler/task.go:102 +0xb8goroutine 1 [select, 228 minutes]:
      main.run(0xc0002493b0, 0x0)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/cmd/zabbix_agent2/zabbix_agent2.go:147 +0x215
      main.main()
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/cmd/zabbix_agent2/zabbix_agent2.go:501 +0x1904goroutine 8 [select]:
      zabbix.com/internal/agent/scheduler.(*Manager).run(0xc000248320)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/scheduler/manager.go:317 +0x1c4
      created by zabbix.com/internal/agent/scheduler.(*Manager).Start
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/scheduler/manager.go:457 +0x5fgoroutine 9 [chan receive]:
      zabbix.com/internal/agent/resultcache.(*MemoryCache).run(0xc0000de240)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/resultcache/memorycache.go:202 +0xb2
      created by zabbix.com/internal/agent/resultcache.(*MemoryCache).Start
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/resultcache/memorycache.go:232 +0x5fgoroutine 10 [select]:
      zabbix.com/internal/agent/serverconnector.(*Connector).run(0xc00019e000)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/serverconnector/serverconnector.go:300 +0x207
      created by zabbix.com/internal/agent/serverconnector.(*Connector).Start
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/serverconnector/serverconnector.go:358 +0x77goroutine 11 [IO wait]:
      internal/poll.runtime_pollWait(0x2c730f08, 0x72, 0xf05160)
              c:/go/src/runtime/netpoll.go:203 +0x5c
      internal/poll.(*pollDesc).wait(0xc0000cce48, 0x72, 0xc1b400, 0x0, 0x0)
              c:/go/src/internal/poll/fd_poll_runtime.go:87 +0x4c
      internal/poll.(*ioSrv).ExecIO(0x149a130, 0xc0000ccc98, 0xc000005400, 0x1, 0x0, 0x838)
              c:/go/src/internal/poll/fd_windows.go:228 +0x121
      internal/poll.(*FD).acceptOne(0xc0000ccc80, 0x838, 0xc0004af1d0, 0x2, 0x2, 0xc0000ccc98, 0x28000, 0x82, 0x0, 0x0)
              c:/go/src/internal/poll/fd_windows.go:896 +0xa9
      internal/poll.(*FD).Accept(0xc0000ccc80, 0xc0003cde08, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
              c:/go/src/internal/poll/fd_windows.go:930 +0x15f
      net.(*netFD).accept(0xc0000ccc80, 0xadd65a, 0xc0003cdef0, 0xadd688)
              c:/go/src/net/fd_windows.go:193 +0x7b
      net.(*TCPListener).accept(0xc000096700, 0x7f3, 0xc00061d9c0, 0x2e)
              c:/go/src/net/tcpsock_posix.go:139 +0x39
      net.(*TCPListener).Accept(0xc000096700, 0xc0000053a0, 0xcf40e0, 0xc000266760, 0xcf40e0)
              c:/go/src/net/tcpsock.go:261 +0x6b
      zabbix.com/pkg/zbxcomms.(*Listener).Accept(0xc000096740, 0xb2d05e00, 0x1, 0x0, 0x1, 0x0)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/pkg/zbxcomms/comms.go:307 +0x3e
      zabbix.com/internal/agent/serverlistener.(*ServerListener).run(0xc0002493b0)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/serverlistener/serverlistener.go:71 +0x169
      created by zabbix.com/internal/agent/serverlistener.(*ServerListener).Start
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/serverlistener/serverlistener.go:111 +0x256goroutine 12 [syscall, 228 minutes]:
      os/signal.signal_recv(0x0)
              c:/go/src/runtime/sigqueue.go:147 +0xa3
      os/signal.loop()
              c:/go/src/os/signal/signal_unix.go:23 +0x29
      created by os/signal.Notify.func1
              c:/go/src/os/signal/signal.go:127 +0x4bgoroutine 13 [syscall, 228 minutes, locked to thread]:
      syscall.Syscall(0x7ffcd4b04a70, 0x2, 0x594, 0xffffffff, 0x0, 0x0, 0x0, 0x0)
              c:/go/src/runtime/syscall_windows.go:188 +0xe9
      syscall.WaitForSingleObject(0x594, 0xc0ffffffff, 0x0, 0x0, 0x435d2d)
              c:/go/src/syscall/zsyscall_windows.go:738 +0x6b
      github.com/natefinch/npipe.waitForCompletion(0x588, 0xc0003bcdc0, 0xf05160, 0xc0000c3150, 0x0)
              C:/Users/User/go/pkg/mod/github.com/natefinch/[email protected]/npipe_windows.go:182 +0x42
      github.com/natefinch/npipe.(*PipeListener).AcceptPipe(0xc0000d0040, 0x0, 0x0, 0x0)
              C:/Users/User/go/pkg/mod/github.com/natefinch/[email protected]/npipe_windows.go:327 +0x2fa
      github.com/natefinch/npipe.(*PipeListener).Accept(0xc0000d0040, 0x0, 0x0, 0x0, 0x0)
              C:/Users/User/go/pkg/mod/github.com/natefinch/[email protected]/npipe_windows.go:263 +0x36
      zabbix.com/internal/agent/remotecontrol.(*Conn).run(0xc000096760)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/remotecontrol/remote.go:64 +0x4f
      created by zabbix.com/internal/agent/remotecontrol.(*Conn).Start
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/remotecontrol/remote.go:80 +0x56goroutine 456733 [syscall, locked to thread]:
      syscall.Syscall(0x7ffca3752fb0, 0x1, 0x2ad017c0, 0x0, 0x0, 0x0, 0x0, 0x0)
              c:/go/src/runtime/syscall_windows.go:188 +0xe9
      zabbix.com/pkg/win32.PdhCollectQueryData(0x2ad017c0, 0x40a922, 0xc0001e6000)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/pkg/win32/pdh.go:130 +0x4f
      zabbix.com/plugins/system/cpu.(*pdhCollector).collect(0xc0001b0f40, 0xd, 0x40196a674e0bc801, 0xc066e5b0473028dc)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/plugins/system/cpu/pdhcollector_windows.go:130 +0x3f
      zabbix.com/plugins/system/cpu.(*Plugin).Collect(0x149e7a0, 0xf1cda0, 0x149e7a0)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/plugins/system/cpu/cpu_windows.go:100 +0x3a
      zabbix.com/internal/agent/scheduler.(*collectorTask).perform.func1(0xc0004a0080, 0xf1c9a0, 0xc000248320)
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/scheduler/task.go:104 +0x76
      created by zabbix.com/internal/agent/scheduler.(*collectorTask).perform
              D:/Zabbix/agent/dist/zabbix-5.0.18rc1/src/go/internal/agent/scheduler/task.go:102 +0xb8
      rax     0x7ffcae21f310
      rbx     0x2ab85a00
      rcx     0x2ab85928
      rdi     0x2ab7d810
      rsi     0x0
      rbp     0x2a2ef2e9
      rsp     0x2a2ef130
      r8      0x141d40
      r9      0x1
      r10     0x8000
      r11     0x2a2ef0c0
      r12     0x2
      r13     0xffffffffffffffff
      r14     0x0
      r15     0x2acd39c0
      rip     0x7ffcc9d922ef
      rflags  0x10206
      cs      0x33
      fs      0x53
      gs      0x2b

      Expected: no agent crashes should be observed

            asestakovs Aleksejs Sestakovs
            asestakovs Aleksejs Sestakovs
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: