Bug #81275 [NEW]: status page, contain bugus value in request duration sometimes

From: Date: Mon, 19 Jul 2021 18:23:33 +0000
Subject: Bug #81275 [NEW]: status page, contain bugus value in request duration sometimes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235191@lists.php.net to get a copy of this message
From:             tsmtgdi at gmail dot com
Operating system: Suse
PHP version:      8.1Git-2021-07-19 (Git)
Package:          FPM related
Bug Type:         Bug
Bug description:status page, contain bugus value in request duration sometimes

Description:
------------
When accessing the php-fpm status page (pm.status_path), when the
process is in status "Reading headers", "Finishing" and "Starting", we
have several cases in which the value request duration is bogus, we
suspect is just reading an uninitialized memory location, we can even
have value of 18446744073709551592 (almost all bit set)...

Test script:
---------------
Is quite easy, you have to poll with very high frequency the status page
while doing many small request to increase the chance to find this bug.

you can use siege or ab2 so simulate traffic on a dummy page (even empty
is fine)
and something like 

It should take 4/5 second at most on a free running loop...

<?php

while(true){
    $json = file_get_contents("http://127.0.0.1/status.php?json&full");
    $result = json_decode($json);
    $processes = $result->processes;
    foreach ($processes as $proc){
        //a dummy page should take low time to be gen no ?
        if($proc->{"request duration"} > 1000000){
            echo "impossible value found!";
            print_r($proc);
            echo "\n";
            die();
        }
    }
}


-- 
Edit bug report at https://bugs.php.net/bug.php?id=81275&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81275&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81275&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81275&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81275&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81275&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81275&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81275&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81275&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81275&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81275&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81275&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81275&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81275&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81275&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81275&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81275&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81275&r=mysqlcfg


Thread (10 messages)

« previous php.bugs (#235191) next »