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

Linux agent hangs when running powershell script

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Trivial Trivial
    • None
    • 5.0.16
    • Agent (G)
    • None
    • Debian 11 (zabbix-agent 5.0.8+dfsg-1 from packages)
      Powershell version 7.1.4.

      Steps to reproduce:

      1. Create custom check: UserParameter=vmware.snapshots[*],/usr/bin/pwsh -Command echo $1 $2
      2. Test with strace -s 16384 zabbix_agentd -t vmware.snapshots[hel,lo]
      3. If pwsh is changed to bash -c "echo $1 $2" it works correctly

      Result:
      write(1, "vmware.snapshots[hel,lo] ", 45vmware.snapshots[hel,lo] ) = 45
      clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fef1da6ac10) = 485649
      close(4) = 0
      read(3, "hel\n", 4095) = 4
      read(3, "lo\n", 4095) = 3
      read(3, 0x7fffef948450, 4095) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
      — SIGCHLD {si_signo=SIGCHLD, si_code=CLD_STOPPED, si_pid=485649, si_uid=1000, si_status=SIGTTOU, si_utime=0, si_stime=0} —
      read(3, 0x7fffef948450, 4095) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
      — SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} —
      rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
      close(3) = 0
      kill(-485649, SIGTERM) = 0
      wait4(485649, [\{WIFSTOPPED(s) && WSTOPSIG(s) == SIGTTOU}], WSTOPPED|WCONTINUED, NULL) = 485649
      wait4(485649, 

      And hangs there.
      Expected:
      vmware.snapshots[hel,lo]              [t|hel lo]

            ssimonenko Sergey Simonenko (Inactive)
            atte Atte Peltomäki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: