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

FPM: segfault dynamically loading extension without opache #12232

Closed
bukka opened this issue Sep 17, 2023 · 0 comments
Closed

FPM: segfault dynamically loading extension without opache #12232

bukka opened this issue Sep 17, 2023 · 0 comments

Comments

@bukka
Copy link
Member

bukka commented Sep 17, 2023

Description

If PHP-FPM loads extension from fpm config and opcache is not loaded, it crashes with the following back trace:

#0  zend_interned_string_ht_lookup (str=0x5555570c0ea0, interned_strings=0x555556e3b240) at /home/jakub/prog/php/83/Zend/zend_string.c:160
#1  0x0000555555dd4a7f in zend_new_interned_string_request (str=0x5555570c0ea0) at /home/jakub/prog/php/83/Zend/zend_string.c:245
#2  0x0000555555cecda7 in zend_register_module_ex (module=0x7ffff5555340 <jsond_module_entry>) at /home/jakub/prog/php/83/Zend/zend_API.c:2489
#3  0x0000555555a9c026 in php_load_extension (filename=0x5555570be4c0 "jsond", type=1, start_now=1) at /home/jakub/prog/php/83/ext/standard/dl.c:237
#4  0x0000555555a9c132 in php_dl (file=0x5555570be4c0 "jsond", type=1, return_value=0x7fffffffd4a0, start_now=1) at /home/jakub/prog/php/83/ext/standard/dl.c:285
#5  0x0000555555e89705 in fpm_php_apply_defines_ex (kv=0x5555570be480, mode=4) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm_php.c:90
#6  0x0000555555e898ae in fpm_php_apply_defines (wp=0x555556febe80) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm_php.c:125
#7  0x0000555555e89a99 in fpm_php_init_child (wp=0x555556febe80) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm_php.c:213
#8  0x0000555555e7943b in fpm_child_init (wp=0x555556febe80) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm_children.c:199
#9  0x0000555555e79e0b in fpm_children_make (wp=0x555556febe80, in_event_loop=0, nb_to_spawn=0, is_debug=1) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm_children.c:461
#10 0x0000555555e7a0be in fpm_children_create_initial (wp=0x555556febe80) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm_children.c:513
#11 0x0000555555e78e8e in fpm_run (max_requests=0x7fffffffd5e8) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm.c:99
#12 0x0000555555e88825 in main (argc=6, argv=0x7fffffffdb68) at /home/jakub/prog/php/83/sapi/fpm/fpm/fpm_main.c:1834

Example FPM config is following:

[global]
error_log = /dev/stderr
[unconfined]
listen = 127.0.0.1:9012
pm = static
pm.max_children = 1
pm.status_path = /status
catch_workers_output = yes
php_admin_value[extension] = jsond

PHP Version

PHP 8.0+

Operating System

Linux

bukka added a commit to bukka/php-src that referenced this issue Sep 17, 2023
bukka added a commit to bukka/php-src that referenced this issue Sep 17, 2023
bukka added a commit to bukka/php-src that referenced this issue Sep 22, 2023
bukka added a commit to bukka/php-src that referenced this issue Sep 22, 2023
bukka added a commit to bukka/php-src that referenced this issue Sep 22, 2023
bukka added a commit to bukka/php-src that referenced this issue Oct 6, 2023
…opcache

Also fixes incorrect assertion in ini init that php_dl is always
temporary.

Closes phpGH-12277
@bukka bukka closed this as completed in 0217be4 Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant