Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Php 8.3 SegFault #502

Open
Electro707 opened this issue Aug 25, 2024 · 1 comment
Open

Php 8.3 SegFault #502

Electro707 opened this issue Aug 25, 2024 · 1 comment

Comments

@Electro707
Copy link

Hello,

I am not familiar with php, so let me know if you need more information on my instance, or how to get a better traceback (php doesn't make that easy)

I am running scramble==v0.10.13 under php v8.3.10. When I access /docs/api in my Lychee instance, I get a segmentation fault.

Normally I would get a "Maximum call stack size" error, as per below

Dedoc\Scramble\Support\Type\TypeWalker::Dedoc\Scramble\Support\Type\{closure}:19 Maximum call stack size of 8339456 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?
App\Http\Middleware\DisableCSP::handle:57 Maximum call stack size of 8339456 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?; caused by

When I disabled zend.max_allowed_stack_size, the root cause is a segfault. I get the following backtrace after the child segfaults

hread 2.1 "php-fpm8.3" received signal SIGSEGV, Segmentation fault.
0x0000556eeecc5dba in ?? ()
(gdb) bt
#0  0x0000556eeecc5dba in ?? ()
#1  0x0000556eeecc6e6c in ?? ()
#2  0x0000556eeecc71a6 in zend_parse_parameters ()
#3  0x0000556eeebafaa6 in ?? ()
#4  0x0000556eeed2fafa in execute_ex ()
#5  0x0000556eeecaeaca in zend_call_function ()
#6  0x0000556eeecaee17 in zend_call_known_function ()
#7  0x0000556eeed36c45 in zend_user_it_new_iterator ()
#8  0x0000556eeed36c7e in zend_user_it_get_new_iterator ()
#9  0x0000556eeece05fb in ?? ()
#10 0x0000556eeecf29f3 in ?? ()
#11 0x0000556eeed29cde in execute_ex ()
#12 0x0000556eeecaeaca in zend_call_function ()
#13 0x0000556eeebde17b in ?? ()
#14 0x0000556eeed2e89f in execute_ex ()
#15 0x0000556eeecaeaca in zend_call_function ()
#16 0x0000556eeebde17b in ?? ()
#17 0x0000556eeed2e89f in execute_ex ()
#18 0x0000556eeecaeaca in zend_call_function ()
#19 0x0000556eeebde17b in ?? ()
#20 0x0000556eeed2e89f in execute_ex ()
#21 0x0000556eeecaeaca in zend_call_function ()
#22 0x0000556eeebde17b in ?? ()
#23 0x0000556eeed2e89f in execute_ex ()
#24 0x0000556eeecaeaca in zend_call_function ()
#25 0x0000556eeebde17b in ?? ()
#26 0x0000556eeed2e89f in execute_ex ()
#27 0x0000556eeecaeaca in zend_call_function ()
#28 0x0000556eeebde17b in ?? ()
#29 0x0000556eeed2e89f in execute_ex ()
#30 0x0000556eeecaeaca in zend_call_function ()
#31 0x0000556eeebde17b in ?? ()
#32 0x0000556eeed2e89f in execute_ex ()
#33 0x0000556eeecaeaca in zend_call_function ()
.....
#36480 0x0000556eeecaeaca in zend_call_function ()
#36481 0x0000556eeebde17b in ?? ()
#36482 0x0000556eeed2e89f in execute_ex ()
#36483 0x0000556eeecaeaca in zend_call_function ()
#36484 0x0000556eeebdd50f in ?? ()
#36485 0x0000556eeed2e89f in execute_ex ()
#36486 0x0000556eeecaeaca in zend_call_function ()
#36487 0x0000556eeebdd50f in ?? ()
#36488 0x0000556eeed2e89f in execute_ex ()
#36489 0x0000556eeecaeaca in zend_call_function ()
#36490 0x0000556eeebdd50f in ?? ()
#36491 0x0000556eeed2e89f in execute_ex ()
#36492 0x0000556eeecaeaca in zend_call_function ()
#36493 0x0000556eeebdd50f in ?? ()
#36494 0x0000556eeed2e89f in execute_ex ()
#36495 0x0000556eeecaeaca in zend_call_function ()
#36496 0x0000556eeebde17b in ?? ()
#36497 0x0000556eeed2e89f in execute_ex ()
#36498 0x0000556eeecaeaca in zend_call_function ()
#36499 0x0000556eeebde17b in ?? ()
#36500 0x0000556eeed2e89f in execute_ex ()
#36501 0x0000556eeed31c95 in zend_execute ()
#36502 0x0000556eeecbd948 in zend_execute_scripts ()
#36503 0x0000556eeec5235e in php_execute_script ()
#36504 0x0000556eeeae3f4a in ?? ()
#36505 0x00007f487be4624a in __libc_start_call_main (main=main@entry=0x556eeeae31e0, argc=argc@entry=4, argv=argv@entry=0x7fff2b661ec8) at ../sysdeps/nptl/libc_start_call_main.h:58
#36506 0x00007f487be46305 in __libc_start_main_impl (main=0x556eeeae31e0, argc=4, argv=0x7fff2b661ec8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff2b661eb8) at ../csu/libc-start.c:360
#36507 0x0000556eeeae5f01 in _start ()
[25-Aug-2024 17:25:59.757210] DEBUG: pid 3728266, fpm_got_signal(), line 82: received SIGCHLD
[25-Aug-2024 17:25:59.757307] DEBUG: pid 3728266, fpm_event_loop(), line 440: event module triggered 1 events
[25-Aug-2024 17:25:59.757341] WARNING: pid 3728266, fpm_children_bury(), line 300: [pool www] child 3728312 exited on signal 11 (SIGSEGV) after 56.025324 seconds from start
[25-Aug-2024 17:25:59.757362] DEBUG: pid 3728266, fpm_children_make(), line 449: blocking signals before child birth
[25-Aug-2024 17:25:59.759878] DEBUG: pid 3728266, fpm_children_make(), line 473: unblocking signals, child born
[25-Aug-2024 17:25:59.760039] NOTICE: pid 3728266, fpm_children_make(), line 479: [pool www] child 3728323 started
@AndrewNovikof
Copy link

Same problem when using Laravel ^11.0 and php 8.3

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

mempry_limit=-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants