Infinite loop in chart.php when Working time ends at 24:00 and graph period is 1 day or longer

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.27
    • Component/s: Frontend (F)
    • Environment:
      zabbix-web 7.0.27
      php 8.4.22 / 8.5.7
      nginx 1.30.2
      rocky linux 8.10
      percona mysql 8.4.8

      Steps to reproduce:

      1. Navigate to Administration -> General -> GUI.
      2. Change the Working time parameter to 1-5,00:00-24:00 (using 24:00 as the end of the working day).
      3. Navigate to Monitoring -> Latest data.
      4. Select any item and click on Graph to open a simple graph (chart.php).
      5. Change the time period filter to Last 1 day (or any period that crosses a day/weekend boundary, e.g., Last 2 days, Last 7 days).

       

      Result:

      • The HTTP request to chart.php hangs indefinitely in a pending state.
      • The corresponding PHP-FPM worker process instantly spikes to 100% CPU utilization and stays there until killed or timed out.
      • Web interface becomes unresponsive for the user due to PHP session locking or pool exhaustion.
      • zabbix_slow.log shows that the execution is stuck in an infinite loop inside graphs.inc.php and CLineGraphDraw.php

       

      Expected:

      • The simple graph should render successfully and immediately.
      • The time parsing logic should handle 24:00 safely.

       

      Workaround:
      Changing Working time to 1-5,00:00-23:59 completely resolves the issue, preventing the infinite loop and allowing graphs to render instantly.

            Assignee:
            Michal Laga
            Reporter:
            Alex
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: