php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81664 php8.1 core dump
Submitted: 2021-11-27 07:37 UTC Modified: 2022-07-11 13:36 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: yyb8 at vip dot qq dot com Assigned:
Status: Closed Package: JIT
PHP Version: 8.1.0 OS: ubuntu 18.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: yyb8 at vip dot qq dot com
New email:
PHP Version: OS:

 

 [2021-11-27 07:37 UTC] yyb8 at vip dot qq dot com
Description:
------------
when I use php8.1 and laravel9 &nginx  ,  run ab benchmark,,,,  php8.1 crashed .

Test script:
---------------
laravel9  echo  hello world

Expected result:
----------------
crash

Actual result:
--------------
run compplete.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-27 07:40 UTC] yyb8 at vip dot qq dot com
Expected result:
----------------
run complete.

Actual result:
--------------
crash.
 [2021-11-27 08:16 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2021-11-27 08:16 UTC] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


 [2021-12-01 11:26 UTC] yyb8 at vip dot qq dot com
-Status: Feedback +Status: Open
 [2021-12-01 11:26 UTC] yyb8 at vip dot qq dot com
if set 
opcache.jit_buffer_size=512M
opcache.jit=tracing

then crash.

if 
opcache.jit_buffer_size=512M
opcache.jit=function 

will not crash.

but I can't give more info.
who can help?
 [2021-12-02 05:01 UTC] yyb8 at vip dot qq dot com
ubuntu sys log report:

ool www: DIGEST-MD5 common mech free
 [2021-12-14 12:45 UTC] cmb@php.net
-Status: Open +Status: Feedback -Package: *General Issues +Package: JIT -Assigned To: +Assigned To: cmb
 [2021-12-14 12:45 UTC] cmb@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
 [2021-12-14 14:25 UTC] yyb8 at vip dot qq dot com
-Status: Feedback +Status: Assigned
 [2021-12-14 14:25 UTC] yyb8 at vip dot qq dot com
(gdb) bt
#0  0x000055fabc84a595 in ?? ()
#1  0x2020200020202020 in ?? ()
#2  0x0000000000000023 in ?? ()
#3  0x0000000000000000 in ?? ()



why ??
 [2021-12-14 14:25 UTC] yyb8 at vip dot qq dot com
-Status: Assigned +Status: Open
 [2021-12-14 14:25 UTC] yyb8 at vip dot qq dot com
open
 [2021-12-14 14:30 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2021-12-14 14:30 UTC] cmb@php.net
Thanks for the swift reply!  However, the backtrace is useless,
but I should have expected that because this is a JIT issue.

What SAPI do you use?  FPM or (F)CGI?  If the latter, that would
likely be a duplicate of bug #81679.
 [2021-12-15 01:11 UTC] yyb8 at vip dot qq dot com
-Status: Feedback +Status: Assigned
 [2021-12-15 01:11 UTC] yyb8 at vip dot qq dot com
I use php-fpm
 [2021-12-15 01:11 UTC] yyb8 at vip dot qq dot com
-Status: Assigned +Status: Open
 [2021-12-15 01:11 UTC] yyb8 at vip dot qq dot com
open
 [2021-12-15 10:05 UTC] cmb@php.net
-Assigned To: cmb +Assigned To:
 [2021-12-15 10:05 UTC] cmb@php.net
> I use php-fpm

Okay, then it may have a different root cause.
 [2021-12-16 15:05 UTC] jfmeinesz at gmail dot com
Hi,

Not 100% sure if my comment is related, but I have reasons to think it is so I'll post it (basically, the logs says core dump as well).

I am also using PHP8.1, Laravel 8 along with NGINX 1.21/1.19 (tested on both), and php-fpm using opcache and JIT tracing. I am using docker and docker swarm to serve this project. Also, my nginx and php containers have a health check that waits for a "service nginx status" (NGINX) and a custom laravel command for the php-fpm container.

My problem is similar, but not quite the same : it does not happens every time I start the containers, sometimes it works fine, sometimes the bug occurs, I'd say it happens about 50% of the time... Seems like this bug is a tough nut

When this bug happens, my php-fpm containers are turning crazy, returning HTTP 509 and printing the following output in loop : 
WARNING: [pool www] child 10366 exited on signal 11 (SIGSEGV - core dumped) after XXXXX seconds from start 

Some requests are served, some are HTTP 509, and the warning is returned every seconds in the logs.
Strange thing that might helps : during this episode, I also had the following output printed twice in the logs :
WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 1 idle, and 22 total children

Strange thing is that 22 children wasn't my max_children defined in the config, here is my config :

clear_env = no
pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 15
pm.max_requests = 600

When this bug happens, I have to shutdown the containers, and start them up again until it disappears (sometimes I need to restart the containers twice in a row). When the bug is not there, everything works fine though, my whole project have no issues.

Hope this helps you to find the origin of this bug.

Regards,
 [2021-12-17 01:13 UTC] yyb8 at vip dot qq dot com
I run the ab -n 10000 -c 100 -k 'http://www.laravel9.com'

the crash.

If I open the http://www.laravel9.com first in browser,
nest step  run the ab -n 10000 -c 100 -k 'http://www.laravel9.com',
then will not crash.
 [2021-12-17 01:14 UTC] yyb8 at vip dot qq dot com
I run the ab -n 10000 -c 100 -k 'http://www.laravel9.com'

then crash.

If I open the http://www.laravel9.com first in browser,
next step  run the ab -n 10000 -c 100 -k 'http://www.laravel9.com',
then will not crash.
 [2022-01-10 07:34 UTC] dmitry@php.net
How to install that "laravel9  echo  hello world"?
 [2022-01-10 07:48 UTC] yyb8 at vip dot qq dot com
install laravel9:

composer create-project laravel/laravel example-app "dev-master"

then in the routes/web.php

write:
Route::get('/', function () {
    return 'hello world';
    
});
 [2022-05-17 21:46 UTC] cbing at cybernetics dot com
I feel that this is also related to, or a duplicate of, https://github.com/php/php-src/issues/8461
 [2022-07-11 13:36 UTC] yyb8 at vip dot qq dot com
-Status: Open +Status: Closed
 [2022-07-11 13:36 UTC] yyb8 at vip dot qq dot com
php8.1.8 fixed this problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC