[php-src] Issue #8159: Apache / PHP segfaults (PHP 8.0 and 8.1, but also 7.4)
| From: | unix-world | Date: | Sat, 05 Mar 2022 15:00:15 +0000 |
| Subject: | [php-src] Issue #8159: Apache / PHP segfaults (PHP 8.0 and 8.1, but also 7.4) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240223@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8159
Comment Author: unix-world
# Here is a second debug log that the OpenBSD package maintainer sent me, using a newer GDB version:
## PHP 8.0.15 (debug) with newer GDB
```
> Reading symbols from /usr/local/lib/php-8.0/modules/zip.so...done.
> Loaded symbols for /usr/local/lib/php-8.0/modules/zip.so
> Reading symbols from /usr/local/lib/libzip.so.4.1...done.
> Loaded symbols for /usr/local/lib/libzip.so.4.1
> #0 0x0000016f89cb7aa0 in ?? ()
> (gdb) list
> 1 ext/zip/php_zip.c: No such file or directory.
> in ext/zip/php_zip.c
> (gdb) bt
> #0 0x0000016f89cb7aa0 in ?? ()
> #1 0x0000016f76872ede in start_accel_module () at ext/opcache/zend_accelerator_module.c:518
> #2 0x0000016f7686594f in accel_startup (extension=0x16f4bdd0510) at ext/opcache/
> ZendAccelerator.c:2901
> #3 0x0000016f39047819 in zend_extension_startup (extension=0x16f4bdd0510) at Zend/
> zend_extensions.c:196
[..]
```
```
$ egdb httpd2 /httpd2.core
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd7.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from httpd2...
Reading symbols from /usr/local/sbin/.debug/httpd2.dbg...
[New process 199520]
Core was generated by `httpd2'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000cebe2b39380 in ?? ()
(gdb) bt
#0 0x00000cebe2b39380 in ?? ()
#1 0x00000cec80fed18e in start_accel_module () at ext/opcache/zend_accelerator_module.c:518
#2 0x00000cec80fdf63f in accel_startup (extension=0xcec16ffe210) at
ext/opcache/ZendAccelerator.c:3114
#3 0x00000cebe081fd29 in zend_extension_startup (extension=0xcec16ffe210) at
Zend/zend_extensions.c:196
#4 0x00000cebe07d85df in zend_llist_apply_with_del (l=0xcebe0bf37c8 <zend_extensions>,
func=0xcebe081fcf0 <zend_extension_startup>) at Zend/zend_llist.c:171
#5 0x00000cebe081fcd5 in zend_startup_extensions () at Zend/zend_extensions.c:217
#6 0x00000cebe06fd468 in php_module_startup (sf=0xcebe0bdaba8 <apache2_sapi_module>,
additional_modules=0xcebe0bdacc0 <php_apache_module>, num_additional_modules=1) at
main/main.c:2259
#7 0x00000cebe0b0aa0e in php_apache2_startup (sapi_module=0xcebe0bdaba8
<apache2_sapi_module>)
at sapi/apache2handler/sapi_apache2.c:376
#8 0x00000cebe0b09fd5 in php_apache_server_startup (pconf=0xcec6f92c028, plog=0xcec23c36028,
ptemp=0xcec66ee5028,
s=0xcec6ecd3110) at sapi/apache2handler/sapi_apache2.c:490
#9 0x00000ce9da79c935 in ap_run_post_config (pconf=0xcec6f92c028, plog=0xcec23c36028,
ptemp=0xcec66ee5028, s=0xcec6ecd3110)
at config.c:102
#10 0x00000ce9da797843 in main (argc=3, argv=0x7f7ffffd4838) at main.c:807
(gdb) bt full
#0 0x00000cebe2b39380 in ?? ()
No symbol table info available.
#1 0x00000cec80fed18e in start_accel_module () at ext/opcache/zend_accelerator_module.c:518
No locals.
#2 0x00000cec80fdf63f in accel_startup (extension=0xcec16ffe210) at
ext/opcache/ZendAccelerator.c:3114
No locals.
#3 0x00000cebe081fd29 in zend_extension_startup (extension=0xcec16ffe210) at
Zend/zend_extensions.c:196
No locals.
#4 0x00000cebe07d85df in zend_llist_apply_with_del (l=0xcebe0bf37c8 <zend_extensions>,
func=0xcebe081fcf0 <zend_extension_startup>) at Zend/zend_llist.c:171
element = 0xcec16ffe200
next = 0x0
#5 0x00000cebe081fcd5 in zend_startup_extensions () at Zend/zend_extensions.c:217
No locals.
#6 0x00000cebe06fd468 in php_module_startup (sf=0xcebe0bdaba8 <apache2_sapi_module>,
additional_modules=0xcebe0bdacc0 <php_apache_module>, num_additional_modules=1) at
main/main.c:2259
zuf = {
error_function = 0xcebe06fd830 <php_error_cb>,
printf_function = 0xcebe06faa80 <php_printf>,
write_function = 0xcebe0720570 <php_output_write>,
fopen_function = 0xcebe06fe610 <php_fopen_wrapper_for_zend>,
message_handler = 0xcebe06fe670 <php_message_handler_for_zend>,
get_configuration_directive = 0xcebe06fe9d0
<php_get_configuration_directive_for_zend>,
ticks_function = 0xcebe071cad0 <php_run_ticks>,
on_timeout = 0xcebe06fc0e0 <php_on_timeout>,
stream_open_function = 0xcebe06fea10 <php_stream_open_for_zend>,
printf_to_smart_string_function = 0xcebe07051f0 <php_printf_to_smart_string>,
printf_to_smart_str_function = 0xcebe0708920 <php_printf_to_smart_str>,
getenv_function = 0xcebe07118a0 <sapi_getenv>,
resolve_path_function = 0xcebe06fea50 <php_resolve_path_for_zend>
}
zuv = {
html_errors = true
}
retval = 0
module_number = 0
php_os = 0xcebdf8e08ea "OpenBSD"
module = 0xcebdf901034
#7 0x00000cebe0b0aa0e in php_apache2_startup (sapi_module=0xcebe0bdaba8
<apache2_sapi_module>)
at sapi/apache2handler/sapi_apache2.c:376
No locals.
#8 0x00000cebe0b09fd5 in php_apache_server_startup (pconf=0xcec6f92c028, plog=0xcec23c36028,
ptemp=0xcec66ee5028,
s=0xcec6ecd3110) at sapi/apache2handler/sapi_apache2.c:490
data = 0x1
userdata_key = 0xcebdf90aaf6 "apache2hook_post_config"
#9 0x00000ce9da79c935 in ap_run_post_config (pconf=0xcec6f92c028, plog=0xcec23c36028,
ptemp=0xcec66ee5028, s=0xcec6ecd3110)
at config.c:102
rv = <error reading variable rv (Cannot access memory at address 0x0)>
pHook = <optimized out>
n = 9
#10 0x00000ce9da797843 in main (argc=3, argv=0x7f7ffffd4838) at main.c:807
rc = <optimized out>
temp_error_log = <optimized out>
showdirectives = <optimized out>
showcompile = <optimized out>
def_server_root = 0xce9da77d483 "/var/www"
confname = 0xce9da7843c0 "/etc/apache2/httpd2.conf"
process = <optimized out>
pconf = 0xcec6f92c028
pcommands = <optimized out>
error = <optimized out>
opt = <optimized out>
opt_arg = 0x0
c = 0 '\000'
rv = <optimized out>
plog = 0x0
ptemp = 0x0
signal_server = <optimized out>
mod = <optimized out>
```