You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04中Phoronix Test Suite运行基准测试触发PHP内存耗尽错误的求助

Ubuntu 22.04中Phoronix Test Suite运行基准测试触发PHP内存耗尽错误的求助

大家好,我最近碰到个棘手的问题,想请各位帮忙分析下:

我在Ubuntu 22.04系统上通过官网的deb包安装了Phoronix Test Suite 10.8.4,之前用了好几个星期都没出过问题,结果大概两周前开始,一运行基准测试就会弹出内存耗尽的错误,具体报错信息如下:

Started Run 1 @ 11:29:41PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 534773792 bytes) in /usr/share/phoronix-test-suite/pts-core/objects/client/pts_test_execution.php on line 298

PTS依赖PHP环境,我查看/var/log/apt/history.log后发现,这段时间有几次PHP版本更新,最终升级到了8.1.2-1ubuntu2.9。我特意去检查了/etc/php/8.1/cli/php.ini文件,里面的memory_limit已经设置成了-1(也就是无内存限制),但问题还是存在。

有没有大佬知道是不是这次PHP更新里的某个改动导致了这个问题?或者我应该从哪些方向入手排查修复呢?


编辑补充:
我定位到了PTS中出错的代码块(已经确认是正确的行),错误就发生在$test_result_std_output = stream_get_contents($pipes[1]);这一行:

if(is_resource($test_process))
{
    //echo proc_get_status($test_process)['pid'];
    pts_module_manager::module_process('__test_running', $test_process);

    $test_result_std_output = stream_get_contents($pipes[1]);

    fclose($pipes[1]);
    fclose($pipes[2]);
    $return_value = proc_close($test_process);
}

备注:内容来源于stack exchange,提问作者Brad

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 16:02:53