[php-src] PHP-8.4: Skip bz2 GH-20807 test when less than 13 GiB of memory is available
| From: | Jakub Zelenka | Date: | Tue, 22 Sep 2026 09:24:06 +0000 |
| Subject: | [php-src] PHP-8.4: Skip bz2 GH-20807 test when less than 13 GiB of memory is available | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-141383@lists.php.net to get a copy of this message | ||
Author: Jakub Zelenka (bukka)
Date: 2026-09-22T11:03:08+02:00
Commit: https://github.com/php/php-src/commit/7d4f779ee99e168db5d63c07e92e2761e47a4f0d
Raw diff: https://github.com/php/php-src/commit/7d4f779ee99e168db5d63c07e92e2761e47a4f0d.diff
Skip bz2 GH-20807 test when less than 13 GiB of memory is available
The decompressed output of this test peaks at more than 12 GiB of RSS.
On smaller machines, such as the 7 GB GitHub-hosted runners used for
private repositories, this exhausts the whole VM and the OOM killer takes
the test runner down with it, so the job dies with a runner shutdown
signal instead of a test failure.
Gate the test on MemAvailable from /proc/meminfo like the other
resource-heavy tests gate on memory, so it keeps running on the 16 GB
public runners and skips itself elsewhere.
Changed paths:
M ext/bz2/tests/gh20807.phpt
Diff:
diff --git a/ext/bz2/tests/gh20807.phpt b/ext/bz2/tests/gh20807.phpt
index ee3238b711b9..ed52c7085858 100644
--- a/ext/bz2/tests/gh20807.phpt
+++ b/ext/bz2/tests/gh20807.phpt
@@ -12,6 +12,12 @@ if (PHP_OS === 'FreeBSD') die('skip Worker does not handle OOM
gracefully');
if (PHP_OS_FAMILY === 'Darwin') die('skip Too slow');
if (PHP_INT_SIZE !== 8) die('skip Only for 64-bit systems');
if (getenv('SKIP_ASAN')) die('skip ASAN makes this test too slow');
+// The decompressed output needs more than 12 GiB of memory at its peak, which
+// takes down smaller machines (e.g. 7 GB CI runners) with the OOM killer.
+$memInfo = @file_get_contents('/proc/meminfo');
+if ($memInfo && preg_match('/MemAvailable:\s+(\d+) kB/', $memInfo, $m) &&
$m[1] < 13 * 1024 * 1024) {
+ die('skip Insufficient available memory (less than 13 GiB)');
+}
?>
--FILE--
<?php