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

Process exits on external/alert scripts

XMLWordPrintable

    • Documentation backlog, S24-W32/33
    • 2

      Steps to reproduce:
      Create simple perl script:

      #!/usr/bin/perl -w
      
      use IPC::Run qw(run);
      run [
      'sleep', '5',
      ] or die 'Error from command';

      You need perl and the IPC::Run perl module (in alpine it’s the perl and perl-ipc-run packages). Then you can set up an external check that runs that script and you only need to run the test on the item and it should crash the server.

      It doesn’t happen when call perl’s sleep function, so that it’s happening because the script times out, while there’s still a forked process running.

      Result:

      zabbix-server          |      1:20240613:111509.401 One child process died (PID:793,exitcode/signal:0). Exiting ...
      zabbix-server          |    227:20240613:111509.401 HA manager has been paused
      zabbix-server          |    591:20240613:111509.411 cannot write to IPC socket: Broken pipe
      zabbix-server          |    591:20240613:111509.411 failed to request alert results
      zabbix-server          |    227:20240613:111509.466 HA manager has been stopped
      zabbix-server          |      1:20240613:111509.504 syncing trend data...
      zabbix-server          |      1:20240613:111515.746 syncing trend data done
      zabbix-server          |      1:20240613:111515.770 Zabbix Server stopped. Zabbix 7.0.0 (revision 49955f1).
      

      Expected:
      External scripts/Alert scripts should not cause server/proxy stop no matter the exit code or behaviour.

            dgoloscapov Dmitrijs Goloscapovs
            edgar.akhmetshin Edgar Akhmetshin
            Team A
            Votes:
            5 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 25h
                25h