-
Problem report
-
Resolution: Fixed
-
Trivial
-
6.0.25, 7.0.0beta1
-
None
-
2
Steps to reproduce:
- Install Zabbix agent 2.
- Monitor MongoDB using the official "MongoDB node by Zabbix agent 2" template.
- Watch memory usage by Agent 2 plugin.
Result:
See screenshot...
See log files:
syslog:
Feb 3 08:32:05 training kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=rsyslog.service,mems_allowed=0,global_oom,task_memcg=/machine.slice/libpod-10f16718a3a2ee3ef19cbf8e3366bb5b7f1fea3960a12c18b2e05aa5f4c051b5.scope/container,task=zabbix-agent2-p,pid=1916759,uid=1997 Feb 3 08:32:05 training kernel: Out of memory: Killed process 1916759 (zabbix-agent2-p) total-vm:4691796kB, anon-rss:919544kB, file-rss:128kB, shmem-rss:0kB, UID:1997 pgtables:6932kB oom_score_adj:0 Feb 3 08:32:05 training zabbix-agent2[1916279]: 2024/02/03 08:32:05.392626 detected 183 time difference between queue checks, rescheduling tasks Feb 3 08:32:05 training zabbix-agent2[1916279]: 2024/02/03 08:32:05.756539 failed to process an incoming connection from 10.89.0.1: Cannot read message: 'read tcp 10.89.0.84:10050->10.89.0.1:54106: i/o timeout' Feb 3 08:32:06 training zabbix-server[1313561]: 269:20240203:083206.271 resuming JMX agent checks on host "Tomcat": connection restored Feb 3 08:32:06 training zabbix-agent2[1916279]: 2024/02/03 08:32:06.683047 [101] cannot connect to [zabbix-server:10051]: dial tcp :0->10.89.0.74:10051: i/o timeout Feb 3 08:32:06 training zabbix-agent2[1916279]: 2024/02/03 08:32:06.687183 [101] active check configuration update from host [Web server] started to fail Feb 3 08:32:06 training kernel: oom_reaper: reaped process 1916759 (zabbix-agent2-p), now anon-rss:76kB, file-rss:0kB, shmem-rss:0kB Feb 3 08:32:06 training zabbix-agent2[1916279]: panic: failed to write request for plugin MongoDB, write unix /tmp/agent.plugin.sock->@: write: broken pipe
Agent 2 crash log
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa827f0] goroutine 1 [running]: zabbix.com/plugins/external.(*Plugin).CheckPid(...) /tmp/zabbix-7.0/src/go/plugins/external/plugin.go:144 main.checkExternalExit(0x4532a6?, 0xc0001079ac?, {0xc000014d20?, 0x7fd49f20ab08?}) /tmp/zabbix-7.0/src/go/cmd/zabbix_agent2/external_nix.go:78 +0x30 main.checkExternalExits() /tmp/zabbix-7.0/src/go/cmd/zabbix_agent2/external_nix.go:69 +0x135 main.handleSig({0xe8df48?, 0x1392908}) /tmp/zabbix-7.0/src/go/cmd/zabbix_agent2/zabbix_agent2_nix.go:52 +0x99 main.run() /tmp/zabbix-7.0/src/go/cmd/zabbix_agent2/zabbix_agent2.go:787 +0x2a7 main.main() /tmp/zabbix-7.0/src/go/cmd/zabbix_agent2/zabbix_agent2.go:424 +0x126a
Expected:
Agent 2 mongodb plugin runs without consuming all available memory.