Bug #80968 [NEW]: jit segfault on php-fpm
From: ryan dot brothers at gmail dot com
Operating system: Linux
PHP version: 8.0.3
Package: JIT
Bug Type: Bug
Bug description:jit segfault on php-fpm
Description:
------------
I am seeing a few segfaults when running PHP 8.0.3 with JIT enabled
under nginx/php-fpm on CentOS 8. I'm not sure if all the segfaults I'm
getting are related, but I've been able to reproduce one of them so
far.
To reproduce, set-up scripts 1.php and 2.php as listed, and then go to
1.php via nginx/php-fpm. You may have to hit the URL a few times to get
the segfault.
My php.ini has:
opcache.jit = tracing
opcache.jit_buffer_size = 100M
Please let me know if I can give any more info to help reproduce it.
Thank you for your help.
Test script:
---------------
1.php:
<?php
class c1
{
public static function __callStatic($method_name, $arguments)
{
return require('2.php');
}
}
$data = array(1, 2);
for ($i = 0; $i < 100; $i++)
{
c1::test($data);
}
=======
2.php:
<?php
if (is_array($arguments[0]) == true)
{
foreach ($arguments[0] as $item)
{
c1::test($item);
}
}
return $arguments[0];
Expected result:
----------------
No output.
Actual result:
--------------
nginx returns "An error occurred."
php-fpm.log has:
[18-Apr-2021 21:53:25] WARNING: [pool www] child 193586 exited on signal
11 (SIGSEGV) after 11.391747 seconds from start
/var/log/messages has:
Apr 18 21:53:25 server1 kernel: traps: php-fpm[193586] general
protection fault ip:55fa3e1d2dbf sp:7ffe87e6d8c0 error:0 in
php-fpm[55fa3e0e4000+11c000]
--
Edit bug report at https://bugs.php.net/bug.php?id=80968&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80968&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80968&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80968&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80968&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80968&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80968&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80968&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80968&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80968&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80968&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80968&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80968&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80968&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80968&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80968&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80968&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80968&r=mysqlcfg
Thread (8 messages)
- ryan dot brothers at gmail dot com