Skip to content

Memory leak in FPM test gh13563-conf-bool-env.phpt #14590

@jorgsowa

Description

@jorgsowa

Description

The test sapi/fpm/tests/gh13563-conf-bool-env.phpt fails and exposes a memory leak when we change the value 'FPM_TEST_LOG_BUF' => 'on', to 'FPM_TEST_LOG_BUF' => '<any other string>'.

I configured PHP with minimal setup:
./configure --with-iconv=/opt/homebrew/opt/libiconv --enable-debug --enable-address-sanitizer --enable-fpm

Half of the test result:

001+ ERROR: The NOTICE does not match expected message
002+ 
003+ LOGS:
004+ --------------------------------------------------------------------
005+ [17-Jun-2024 00:42:34] ERROR: [/Users/jorgsowa/php-src/sapi/fpm/tests/gh13563-conf-bool-env.ini:4] unable to parse value for entry 'log_buffering': invalid boolean value
006+ [17-Jun-2024 00:42:34] ERROR: failed to load configuration file '/Users/jorgsowa/php-src/sapi/fpm/tests/gh13563-conf-bool-env.ini'
007+ [17-Jun-2024 00:42:34] ERROR: FPM initialization failed
008+ [Mon Jun 17 00:42:34 2024]  Script:  '-'
009+ /Users/jorgsowa/php-src/ext/filter/filter.c(357) :  Freeing 0x0000000108003000 (16 bytes), script=-
010+ === Total 1 memory leaks detected ===
011+ --------------------------------------------------------------------
012+ 
013+ Most likely invalid match for entry:
014+ - PATTERN: /^(?:\[\d\d-\w\w\w-\d{4} \d\d:\d\d:\d\d(?:\.\d+)?\] )?NOTICE: (?:pid \d+, (?:\w+|\(null\))\(\), line \d+: )?(fpm is running, pid \d+)$/
015+ - LINE: [17-Jun-2024 00:42:34] ERROR: [/Users/jorgsowa/php-src/sapi/fpm/tests/gh13563-conf-bool-env.ini:4] unable to parse value for entry 'log_buffering': invalid boolean value
016+ - EXPECTED: NOTICE - fpm is running, pid \d+
017+ - ACTUAL: ERROR - [/Users/jorgsowa/php-src/sapi/fpm/tests/gh13563-conf-bool-env.ini:4] unable to parse value for entry 'log_buffering': invalid boolean value
018+ 
019+ Warning: fsockopen(): Unable to connect to 127.0.0.1:9008 (Connection refused) in /Users/jorgsowa/php-src/sapi/fpm/tests/fcgi.inc on line 120
020+ ERROR: Request failed; EXCEPTION: Unable to connect to FastCGI application: Connection refused
021+ 
022+ LOGS:
023+ --------------------------------------------------------------------
024+ [17-Jun-2024 00:42:34] ERROR: [/Users/jorgsowa/php-src/sapi/fpm/tests/gh13563-conf-bool-env.ini:4] unable to parse value for entry 'log_buffering': invalid boolean value
025+ [17-Jun-2024 00:42:34] ERROR: failed to load configuration file '/Users/jorgsowa/php-src/sapi/fpm/tests/gh13563-conf-bool-env.ini'
026+ [17-Jun-2024 00:42:34] ERROR: FPM initialization failed
027+ [Mon Jun 17 00:42:34 2024]  Script:  '-'
028+ /Users/jorgsowa/php-src/ext/filter/filter.c(357) :  Freeing 0x0000000108003000 (16 bytes), script=-
029+ === Total 1 memory leaks detected ===
030+ --------------------------------------------------------------------

PHP Version

PHP 8.4

Operating System

Apple M1 MacOS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions