FS#54666 - [apache] Segfaults when someone connects

Attached to Project: Arch Linux
Opened by coldsphinx (ColdSphinX) - Sunday, 02 July 2017, 13:17 GMT
Last edited by Jan de Groot (JGC) - Saturday, 08 July 2017, 21:28 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Anatol Pomozov (anatolik)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After my last update apache startet to throw segfaults when someone connected to the server.
So I did some debugging and ended up disabling http2 to keep the server working.

Additional info:
* package version(s)
** 4.11.7-1-ARCH
** extra/apache 2.4.26-1
** extra/nghttp2 1.23.1-1
** core/libnghttp2 1.23.1-1
** core/openssl 1.1.0.f-1
** core/glibc 2.25-5

* config and/or log files etc.
[code][core:notice] [pid XXXX] AH00052: child pid XXXX exit signal Segmentation fault (11)[/code]
[code]*** longjmp causes uninitialized stack frame ***: /usr/bin/httpd terminated
======= Backtrace: =========
/usr/lib/libc.so.6(+0x7254c)[0x7f4a7a10c54c]
/usr/lib/libc.so.6(__fortify_fail+0x37)[0x7f4a7a198307]
/usr/lib/libc.so.6(+0xfe20d)[0x7f4a7a19820d]
/usr/lib/libc.so.6(__longjmp_chk+0x2b)[0x7f4a7a19816b]
/etc/httpd/modules/libphp7.so(+0x10679f)[0x7f4a73a6e79f]
/usr/lib/php/modules/xdebug.so(xdebug_error_cb+0x74a)[0x7f4a6dc66bea]
/etc/httpd/modules/libphp7.so(zend_error_noreturn+0x254)[0x7f4a73a6de6d]
/etc/httpd/modules/libphp7.so(zend_throw_error+0x145)[0x7f4a73a6e3ce]
/etc/httpd/modules/libphp7.so(+0x36ca29)[0x7f4a73cd4a29]
/etc/httpd/modules/libphp7.so(zend_fetch_class_by_name+0x8e)[0x7f4a73cd734e]
/etc/httpd/modules/libphp7.so(+0x423847)[0x7f4a73d8b847]
/etc/httpd/modules/libphp7.so(execute_ex+0x3b)[0x7f4a73d3305b]
/usr/lib/php/modules/xdebug.so(xdebug_execute_ex+0x3a6)[0x7f4a6dc52256]
/etc/httpd/modules/libphp7.so(+0x4260b4)[0x7f4a73d8e0b4]
/etc/httpd/modules/libphp7.so(execute_ex+0x3b)[0x7f4a73d3305b]
/usr/lib/php/modules/xdebug.so(xdebug_execute_ex+0x3a6)[0x7f4a6dc52256]
/etc/httpd/modules/libphp7.so(+0x422ce4)[0x7f4a73d8ace4]
/etc/httpd/modules/libphp7.so(execute_ex+0x3b)[0x7f4a73d3305b]
/usr/lib/php/modules/xdebug.so(xdebug_execute_ex+0x3a6)[0x7f4a6dc52256]
/etc/httpd/modules/libphp7.so(+0x4266d4)[0x7f4a73d8e6d4]
/etc/httpd/modules/libphp7.so(execute_ex+0x3b)[0x7f4a73d3305b]
/usr/lib/php/modules/xdebug.so(xdebug_execute_ex+0x3a6)[0x7f4a6dc52256]
/etc/httpd/modules/libphp7.so(+0x423054)[0x7f4a73d8b054]
/etc/httpd/modules/libphp7.so(execute_ex+0x3b)[0x7f4a73d3305b]
/usr/lib/php/modules/xdebug.so(xdebug_execute_ex+0x3a6)[0x7f4a6dc52256]
/etc/httpd/modules/libphp7.so(zend_execute+0x198)[0x7f4a73d908d8]
/etc/httpd/modules/libphp7.so(zend_execute_scripts+0xe1)[0x7f4a73ce6c41]
/etc/httpd/modules/libphp7.so(php_execute_script+0x2c0)[0x7f4a73c80a00]
/etc/httpd/modules/libphp7.so(+0x42aa72)[0x7f4a73d92a72]
/usr/bin/httpd(ap_run_handler+0x40)[0x44be10]
/usr/bin/httpd(ap_invoke_handler+0x99)[0x44c389]
/usr/bin/httpd(ap_process_async_request+0x29b)[0x4614fb]
/usr/bin/httpd(ap_process_request+0x10)[0x4616c0]
/etc/httpd/modules/mod_http2.so(+0x26da6)[0x7f4a75e64da6]
/usr/bin/httpd(ap_run_process_connection+0x40)[0x4557f0]
/etc/httpd/modules/mod_http2.so(+0x281f7)[0x7f4a75e661f7]
/etc/httpd/modules/mod_http2.so(+0x2b5b6)[0x7f4a75e695b6]
/usr/lib/libpthread.so.0(+0x7297)[0x7f4a7a446297]
/usr/lib/libc.so.6(clone+0x3f)[0x7f4a7a1871ef][/code]

Steps to reproduce:

Enable HTTP2

httpd.conf:
[code]LoadModule http2_module modules/mod_http2.so
Protocols h2 http/1.1[/code]
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 08 July 2017, 21:28 GMT
Reason for closing:  Fixed
Comment by coldsphinx (ColdSphinX) - Sunday, 02 July 2017, 13:21 GMT
How can I set the missing topic afterwards? Missed to set it.
Sorry :/
Comment by Jan de Groot (JGC) - Wednesday, 05 July 2017, 08:08 GMT
This bug has been fixed on the 2.4.x branch by disabling HTTP/2 support when prefork is used:
http://svn.apache.org/viewvc?view=revision&revision=1800774

From the documentation:
https://httpd.apache.org/docs/trunk/howto/http2.html#mpm-config

Prefork MPM is not advised with HTTP/2. With 2.4.26 it's broken, later versions will not allow you to enable it with prefork.
Comment by Anatol Pomozov (anatolik) - Wednesday, 05 July 2017, 17:42 GMT
I cherry-picked rev1800774 and pushed a new apache-2.4.26-2 into [testing]. Please verify it works as expected.
Comment by Anatol Pomozov (anatolik) - Wednesday, 05 July 2017, 17:51 GMT
I cherry-picked rev1800774 and pushed a new apache-2.4.26-2 into [testing]. Please verify it works as expected.
Comment by coldsphinx (ColdSphinX) - Thursday, 06 July 2017, 13:43 GMT
apache package 2.4.26-3 fixed it for me by disabling http2 when using mpm prefork.
So, I guess I'll have to change to mpm worker, so I need threadsafe php now. But that's another story.
Comment by Jan de Groot (JGC) - Saturday, 08 July 2017, 21:27 GMT
You don't need threadsafe php, switch to php-fpm and mod_proxy_fcgi instead. Even when PHP is compiled with Zend_TS, it will give no warranty that a 3rd party module or library that you use is threadsafe.

Loading...