Apache segmentation fault when loading libphp7.so

From: Date: Tue, 11 Aug 2020 10:21:04 +0000
Subject: Apache segmentation fault when loading libphp7.so
Groups: php.install 
Request: Send a blank email to php-install+get-20521@lists.php.net to get a copy of this message
Hello, I run a server with Debian Buster. I used to compile some of the needed programs, so that I am able to use more recent versions than provided by my distribution. Two of these are PHP and Apache httpd. Now I have updated my httpd to version 2.4.46 and wanted to update PHP from 7.2.9 to 7.4.9. Unfortunately httpd dies with segmentation fault, so I reinstalled 7.2.9 again, which works good. So I startet to install both httpd and PHP in special directories for testing. The Apache testing verion is 2.4.43. PHP testing version is 7.4.9. This issue also occures when using the latest 7.3 version. The configure options are: Apache: ./configure --prefix=/usr/local/httpd-test --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/ --enable-modules=all --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-rewrite --enable-mods-shared=all --enable-ssl PHP: ./configure --prefix=/usr/local/php-test --disable-all --disable-cgi --with-apxs2=/usr/local/httpd-test/bin/apxs (I had more options, but this was the last one) configure, make and make install run without errors, make test has some fails, but nevertheless the module should load, shouldn't ist? Before you ask: I do not receive any log messages, neither in error_log nor in syslog. When I start httpd in debug mode, I get: /usr/local/httpd-test/bin/httpd -X -e debug -k start [Tue Aug 11 12:04:48.056439 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module authn_file_module from /usr/local/httpd-test/modules/mod_authn_file.so [Tue Aug 11 12:04:48.056548 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module authn_core_module from /usr/local/httpd-test/modules/mod_authn_core.so [Tue Aug 11 12:04:48.056626 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module authz_host_module from /usr/local/httpd-test/modules/mod_authz_host.so [Tue Aug 11 12:04:48.056707 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module authz_groupfile_module from /usr/local/httpd-test/modules/mod_authz_groupfile.so [Tue Aug 11 12:04:48.056781 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module authz_user_module from /usr/local/httpd-test/modules/mod_authz_user.so [Tue Aug 11 12:04:48.056860 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module authz_core_module from /usr/local/httpd-test/modules/mod_authz_core.so [Tue Aug 11 12:04:48.056939 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module access_compat_module from /usr/local/httpd-test/modules/mod_access_compat.so [Tue Aug 11 12:04:48.057018 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module auth_basic_module from /usr/local/httpd-test/modules/mod_auth_basic.so [Tue Aug 11 12:04:48.057103 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module reqtimeout_module from /usr/local/httpd-test/modules/mod_reqtimeout.so [Tue Aug 11 12:04:48.057183 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module filter_module from /usr/local/httpd-test/modules/mod_filter.so [Tue Aug 11 12:04:48.057267 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module mime_module from /usr/local/httpd-test/modules/mod_mime.so [Tue Aug 11 12:04:48.057360 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module log_config_module from /usr/local/httpd-test/modules/mod_log_config.so [Tue Aug 11 12:04:48.057514 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module env_module from /usr/local/httpd-test/modules/mod_env.so [Tue Aug 11 12:04:48.057605 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module headers_module from /usr/local/httpd-test/modules/mod_headers.so [Tue Aug 11 12:04:48.057690 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module setenvif_module from /usr/local/httpd-test/modules/mod_setenvif.so [Tue Aug 11 12:04:48.057784 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module version_module from /usr/local/httpd-test/modules/mod_version.so [Tue Aug 11 12:04:48.057868 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module unixd_module from /usr/local/httpd-test/modules/mod_unixd.so [Tue Aug 11 12:04:48.057949 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module status_module from /usr/local/httpd-test/modules/mod_status.so [Tue Aug 11 12:04:48.058045 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module autoindex_module from /usr/local/httpd-test/modules/mod_autoindex.so [Tue Aug 11 12:04:48.058131 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module dir_module from /usr/local/httpd-test/modules/mod_dir.so [Tue Aug 11 12:04:48.058215 2020] [so:debug] [pid 24664:tid 3083007424] mod_so.c(266): AH01575: loaded module alias_module from /usr/local/httpd-test/modules/mod_alias.so Speicherzugriffsfehler "Speicherzugrifftsfehler" = "Segmentation fault" There is no change when running the regular httpd in background. When I stop it, I get the same fault. At last I tried to find out things with a core dump. But I don't get a clue what happens. I can just see, that the error occures when loading libphp7.so. Below are "bt" and "bt full". Is someone able to help me with the installation? If you need further information, just ask. Thank you for your help. Greetings Kai (gdb) bt #0 resolve_base64_decode () at /usr/src/apache_testing/php-7.4.9/Zend/zend_cpuinfo.h:141 #1 0xb7f82aa2 in elf_machine_rel (skip_ifunc=<optimized out>, reloc_addr_arg=<optimized out>, version=<optimized out>, sym=<optimized out>, reloc=0xb76a44f8, map=0x230d420) at ../sysdeps/i386/dl-machine.h:353 #2 elf_dynamic_do_Rel (skip_ifunc=<optimized out>, lazy=<optimized out>, nrelative=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>, map=<optimized out>) at do-rel.h:137 #3 _dl_relocate_object (scope=<optimized out>, reloc_mode=<optimized out>, consider_profiling=<optimized out>) at dl-reloc.c:258 #4 0xb7f89efa in dl_open_worker (a=<optimized out>) at dl-open.c:377 #5 0xb7d42a9c in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:196 #6 0xb7f898fe in _dl_open (file=0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", mode=-2147483390, caller_dlopen=0xb7e68934 <apr_dso_load+36>, nsid=<optimized out>, argc=3, argv=0xbfebd264, env=0xbfebd274) at dl-open.c:599 #7 0xb7dec2c8 in dlopen_doit (a=0xbfebcb2c) at dlopen.c:66 #8 0xb7d42a9c in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:196 #9 0xb7d42b40 in __GI__dl_catch_error (objname=0x230247c, errstring=0x2302480, mallocedp=0x2302478, operate=0xb7dec250 <dlopen_doit>, args=0xbfebcb2c) at dl-error-skeleton.c:215 #10 0xb7deca71 in _dlerror_run (operate=0xb7dec250 <dlopen_doit>, args=0xbfebcb2c) at dlerror.c:163 #11 0xb7dec366 in __dlopen (file=0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", mode=258) at dlopen.c:87 #12 0xb7e68934 in apr_dso_load (res_handle=0xbfebcce4, path=0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", pool=0x22d3218) at dso/unix/dso.c:139 #13 0x0050b295 in dso_load (cmd=cmd@entry=0xbfebd04c, modhandlep=modhandlep@entry=0xbfebcce4, filename=filename@entry=0x230b3f0 "modules/libphp7.so", used_filename=0xbfebccec) at mod_so.c:162 #14 0x0050b53a in load_module (cmd=0xbfebd04c, dummy=0xbfebcf8c, modname=0x230b3e0 "php7_module", filename=0x230b3f0 "modules/libphp7.so") at mod_so.c:263 #15 0x004f7ff2 in invoke_cmd (cmd=<optimized out>, parms=parms@entry=0xbfebd04c, mconfig=mconfig@entry=0xbfebcf8c, args=<optimized out>) at config.c:895 #16 0x004f8c98 in execute_now (p=0xbfebcfd4, ptemp=0xbfebcfd8, parent=<optimized out>, sub_tree=<optimized out>, parms=<optimized out>, args=0x22fdd03 "php7_module modules/libphp7.so", cmd_line=<optimized out>) at config.c:1707 #17 ap_build_config_sub (p=p@entry=0x22d3218, temp_pool=temp_pool@entry=0x22fdbe8, l=<optimized out>, parms=<optimized out>, current=<optimized out>, curr_parent=<optimized out>, conftree=<optimized out>) at config.c:1171 #18 0x004faba2 in ap_build_config (parms=0xbfebd04c, p=0x22d3218, temp_pool=0x22fdbe8, conftree=0x554628 <ap_conftree>) at config.c:1428 #19 0x004fb342 in ap_process_resource_config (s=0x22fa930, fname=0x2300990 "/usr/local/httpd-test/conf/httpd.conf", conftree=0x554628 <ap_conftree>, p=<optimized out>, ptemp=0x22fdbe8) at config.c:1877 #20 0x004fc135 in ap_read_config (process=<optimized out>, ptemp=<optimized out>, filename=<optimized out>, conftree=<optimized out>) at config.c:2339 #21 0x004d3c33 in main (argc=<optimized out>, argv=<optimized out>) at main.c:659 (gdb) bt full #0 resolve_base64_decode () at /usr/src/apache_testing/php-7.4.9/Zend/zend_cpuinfo.h:141 No locals. #1 0xb7f82aa2 in elf_machine_rel (skip_ifunc=<optimized out>, reloc_addr_arg=<optimized out>, version=<optimized out>, sym=<optimized out>, reloc=0xb76a44f8, map=0x230d420) at ../sysdeps/i386/dl-machine.h:353 refsym = 0xb765f5fc sym_map = 0x230d420 value = <optimized out> strtab = <optimized out> reloc_addr = <optimized out> r_type = 7 l = <optimized out> scope = <optimized out> reloc_addr = <optimized out> r_type = <optimized out> l = <optimized out> strtab = <optimized out> scope = <optimized out> refsym = <optimized out> sym_map = <optimized out> value = <optimized out> _lr = <optimized out> _tc = <optimized out> v = <optimized out> strtab = <optimized out> td = <optimized out> strtab = <optimized out> #2 elf_dynamic_do_Rel (skip_ifunc=<optimized out>, lazy=<optimized out>, nrelative=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>, map=<optimized out>) at do-rel.h:137 ndx = <optimized out> version = <optimized out> symtab = <optimized out> relative = <optimized out> r = 0xb76a44f8 end = <optimized out> l_addr = <optimized out> r = <optimized out> end = <optimized out> l_addr = <optimized out> symtab = <optimized out> relative = <optimized out> version = <optimized out> ndx = <optimized out> #3 _dl_relocate_object (scope=<optimized out>, reloc_mode=<optimized out>, consider_profiling=<optimized out>) at dl-reloc.c:258 ranges_index = <optimized out> ranges = {{start = 3076968624, size = 235704, nrelative = 25988, lazy = 0}, {start = 0, size = 0, nrelative = 0, lazy = 0}} edr_lazy = <optimized out> textrels = <optimized out> errstring = 0x0 lazy = <optimized out> skip_ifunc = <optimized out> --Type <RET> for more, q to quit, c to continue without paging--c l = <optimized out> strtab = <optimized out> #4 0xb7f89efa in dl_open_worker (a=<optimized out>) at dl-open.c:377 i = 0 args = <optimized out> file = <optimized out> mode = -2147483390 call_map = <optimized out> dst = <optimized out> new = <optimized out> __PRETTY_FUNCTION__ = "dl_open_worker" r = <optimized out> reloc_mode = 0 nmaps = <optimized out> l = <optimized out> maps = {0x230d420, 0x230d720, 0x230da10, 0xb7c88f39 <__GI___libc_malloc+137>, 0xbfebc80c, 0xb7cf4a85 <___fxstat64+21>, 0xb7de5860 <_IO_file_jumps>, 0xb7c800b5 <__GI__IO_file_stat+21>, 0x3, 0x3} relocation_in_progress = <optimized out> any_tls = <optimized out> first_static_tls = <optimized out> #5 0xb7d42a9c in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:196 errcode = 1 c = {exception = 0xbfebc924, errcode = 0xbfebc854, env = {{__jmpbuf = {0, -1075066588, -1208355580, -1075064204, 1453507769, 694651049}, __mask_was_saved = 0, __saved_mask = {__val = {2, 36700800, 3084802144, 3219900760, 3083066467, 36699168, 3219900736, 24, 3083066229, 60312, 2, 0, 3083773984, 3083495927, 36699144, 3084808192, 3083774010, 36699152, 36699200, 3084422868, 3, 1151860746, 0, 3084893561, 3086482252, 3082150963, 36744608, 0, 3084893838, 3086611716, 1, 3082949363}}}}} old = <optimized out> #6 0xb7f898fe in _dl_open (file=0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", mode=-2147483390, caller_dlopen=0xb7e68934 <apr_dso_load+36>, nsid=<optimized out>, argc=3, argv=0xbfebd264, env=0xbfebd274) at dl-open.c:599 args = {file = 0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", mode = -2147483390, caller_dlopen = 0xb7e68934 <apr_dso_load+36>, map = 0x230d420, nsid = 0, argc = 3, argv = 0xbfebd264, env = 0xbfebd274} exception = {objname = 0x0, errstring = 0xb7b5e3a8 "{", message_buffer = 0x21 <error: Cannot access memory at address 0x21>} errcode = <optimized out> __PRETTY_FUNCTION__ = "_dl_open" #7 0xb7dec2c8 in dlopen_doit (a=0xbfebcb2c) at dlopen.c:66 args = 0xbfebcb2c #8 0xb7d42a9c in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:196 errcode = 0 c = {exception = 0xbfebcac0, errcode = 0xbfebc9f4, env = {{__jmpbuf = {0, 36709504, 36709500, -1075065628, 1453393081, 694651049}, __mask_was_saved = 0, __saved_mask = {__val = {4294967295, 3086414592, 3082150824, 36753536, 1, 3085837360, 28, 3085837856, 3086414592, 3219901076, 3219901072, 3086610432, 3084808192, 36753536, 3084808192, 3086416848, 3084133516, 36744608, 36753536, 3219901092, 36754004, 0, 0, 2, 0, 0, 0, 3085339152, 36744608, 0, 0, 3086613260}}}}} old = <optimized out> #9 0xb7d42b40 in __GI__dl_catch_error (objname=0x230247c, errstring=0x2302480, mallocedp=0x2302478, operate=0xb7dec250 <dlopen_doit>, args=0xbfebcb2c) at dl-error-skeleton.c:215 exception = {objname = 0x0, errstring = 0x0, message_buffer = 0xb7e6fa99 <apr_palloc+9> "\201ï\350\001"} errorcode = <optimized out> #10 0xb7deca71 in _dlerror_run (operate=0xb7dec250 <dlopen_doit>, args=0xbfebcb2c) at dlerror.c:163 result = 0x2302470 #11 0xb7dec366 in __dlopen (file=0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", mode=258) at dlopen.c:87 args = {file = 0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", mode = 258, new = 0xbfebd04c, caller = 0xb7e68934 <apr_dso_load+36>} #12 0xb7e68934 in apr_dso_load (res_handle=0xbfebcce4, path=0x22fe670 "/usr/local/httpd-test/modules/libphp7.so", pool=0x22d3218) at dso/unix/dso.c:139 os_handle = <optimized out> #13 0x0050b295 in dso_load (cmd=cmd@entry=0xbfebd04c, modhandlep=modhandlep@entry=0xbfebcce4, filename=filename@entry=0x230b3f0 "modules/libphp7.so", used_filename=0xbfebccec) at mod_so.c:162 retry = 0 fullname = <optimized out> my_error = "\000\000\000\000x\234/\002;t\365\345#E\346\267\030\062-\002\024\000\000\000[\000\000\000\a\000\000\000\310>\266\267\200\257\060\002\231\372\346\267H\343\350\267\300\243/\002\025\345ԷH\343\350\267\331c\346\267į0\002\000\000\000\000Yc\346\267\000 U\000\000\000\000\000\000\000\000\000\231\372\346\267H\343\350\267\002\000\000\000\375\345ԷH\343\350\267\300b\346\267p\263\060\002\000\000\000\000(\000\000\000H\343\350\267\026\346Է\255\346ԷH\343\350\267(\000\000\000\260\261\060\002\000\000\000\000yb\346\267\000@\266\267@\263\060\002\024\000\000\000\210\314\353\277l\373\265\267\030\062-\002\002\000\000\000\024\000\000\000\000@\266\267\350\257\060\002\030\062-\002ȫ/\002\030\062"... #14 0x0050b53a in load_module (cmd=0xbfebd04c, dummy=0xbfebcf8c, modname=0x230b3e0 "php7_module", filename=0x230b3f0 "modules/libphp7.so") at mod_so.c:263 modhandle = 0x230adc8 modsym = 0xb7b640a0 <alias_module> modp = <optimized out> module_file = 0x22fe670 "/usr/local/httpd-test/modules/libphp7.so" sconf = <optimized out> modi = 0x22fb048 modie = <optimized out> i = <optimized out> error = <optimized out> #15 0x004f7ff2 in invoke_cmd (cmd=<optimized out>, parms=parms@entry=0xbfebd04c, mconfig=mconfig@entry=0xbfebcf8c, args=<optimized out>) at config.c:895 override_list_ok = <optimized out> w = <optimized out> w2 = <optimized out> w3 = <optimized out> errmsg = 0x0 #16 0x004f8c98 in execute_now (p=0xbfebcfd4, ptemp=0xbfebcfd8, parent=<optimized out>, sub_tree=<optimized out>, parms=<optimized out>, args=0x22fdd03 "php7_module modules/libphp7.so", cmd_line=<optimized out>) at config.c:1707 retval = <optimized out> cmd = <optimized out> ml = 0x22f8930 dir = <optimized out> cmd = <optimized out> ml = <optimized out> dir = <optimized out> retval = <optimized out> #17 ap_build_config_sub (p=p@entry=0x22d3218, temp_pool=temp_pool@entry=0x22fdbe8, l=<optimized out>, parms=<optimized out>, current=<optimized out>, curr_parent=<optimized out>, conftree=<optimized out>) at config.c:1171 sub_tree = 0x0 retval = 0x0 args = 0x22fdd03 "php7_module modules/libphp7.so" cmd_name = <optimized out> newdir = <optimized out> cmd = <optimized out> ml = <optimized out> lname = <optimized out> #18 0x004faba2 in ap_build_config (parms=0xbfebd04c, p=0x22d3218, temp_pool=0x22fdbe8, conftree=0x554628 <ap_conftree>) at config.c:1428 current = 0x2301af8 curr_parent = 0x0 errmsg = <optimized out> last_ptr = <optimized out> rc = <optimized out> vb = {buf = 0x22fdcf8 "LoadModule php7_module modules/libphp7.so", avail = 207, strlen = 41, pool = 0x22fdbe8, info = 0x0} max_len = 16777216 #19 0x004fb342 in ap_process_resource_config (s=0x22fa930, fname=0x2300990 "/usr/local/httpd-test/conf/httpd.conf", conftree=0x554628 <ap_conftree>, p=<optimized out>, ptemp=0x22fdbe8) at config.c:1877 cfp = 0x2301a40 parms = {info = 0x0, override = 150, override_opts = 239, override_list = 0x0, limited = -1, limited_xmethods = 0x0, xlimited = 0x0, config_file = 0x2301a40, directive = 0x0, pool = 0x22d3218, temp_pool = 0x22fdbe8, server = 0x22fa930, path = 0x0, cmd = 0x551100 <so_cmds>, context = 0x0, err_directive = 0x230b398} rv = 0 error = <optimized out> #20 0x004fc135 in ap_read_config (process=<optimized out>, ptemp=<optimized out>, filename=<optimized out>, conftree=<optimized out>) at config.c:2339 confname = <optimized out> error = <optimized out> p = 0x22d3218 s = 0x22fa930 #21 0x004d3c33 in main (argc=<optimized out>, argv=<optimized out>) at main.c:659 c = 0 '\000' showcompile = <optimized out> showdirectives = <optimized out> confname = <optimized out> def_server_root = <optimized out> temp_error_log = <optimized out> error = <optimized out> process = 0x22d1298 pconf = <optimized out> plog = 0x22fbbd8 ptemp = 0x22fdbe8 pcommands = 0x22f5328 opt = 0x22f53c8 rv = <optimized out> mod = <optimized out> opt_arg = 0x22d1208 "\350\321,\002ػ/\002\370\361,\002\354\321,\002\240\026-\002" signal_server = <optimized out> rc = 0

« previous php.install (#20521) next »