Hi there,

Yesterday I was trying to play with the http2 module on Apache from
ports, as I saw it was added to the ports file list. The problem is
that the module isnt working correctly.

If you try it on a http vhost, it simply returns the page via the
normal way (http).
And if you enable it on a https vhost, the vhost stops working (doesnt
serve anything).

So I went to https://httpd.apache.org/dev/debugging.html , and saw the
instructions on how to debug Apache, and ran httpd2 on gdb with the -X
option.

After a few requests, httpd2 segfaults, but only when using the
"mpm_prefork" module. With "mpm_event" or "mpm_worker" it doesnt
crash.

# gdb --args httpd2 -X
(gdb) run
Starting program: /usr/local/sbin/httpd2 -X
AH00557: httpd2: apr_sockaddr_info_get() failed for web.my.domain
AH00558: httpd2: Could not reliably determine the server's fully
qualified domain name, using 127.0.0.1. Set the 'ServerName' directive
globally to suppress this message

Program received signal SIGSEGV, Segmentation fault.
0x000014a785962a1b in ap_mpm_pod_check () from /usr/local/sbin/httpd2
(gdb) bt
#0  0x000014a785962a1b in ap_mpm_pod_check () from /usr/local/sbin/httpd2
#1  0x000014aa29a81f9e in child_main ()
   from /usr/local/lib/apache2/mod_mpm_prefork.so
#2  0x000014aa29a82321 in make_child ()
   from /usr/local/lib/apache2/mod_mpm_prefork.so
#3  0x000014aa29a833cf in prefork_run ()
   from /usr/local/lib/apache2/mod_mpm_prefork.so
#4  0x000014a785937d12 in ap_run_mpm () from /usr/local/sbin/httpd2
#5  0x000014a7859318b3 in main () from /usr/local/sbin/httpd2

And if you run httpd2 -X and try to access an SSL vhost it also crashes.

Program received signal SIGPIPE, Broken pipe.
[Switching to thread 1003084]
0x00001ff81dfaf1aa in writev () at <stdin>:2
2       <stdin>: No such file or directory.
        in <stdin>
Current language:  auto; currently asm
(gdb) bt
#0  0x00001ff81dfaf1aa in writev () at <stdin>:2
#1  0x00001ff7a7eec2ed in writev (fd=19, iov=0x1ff7789a7780, iovcnt=1)
    at /usr/src/lib/librthread/rthread_cancel.c:621
#2  0x00001ff75d837311 in apr_socket_sendv () from
/usr/local/lib/libapr-1.so.5.0
#3  0x00001ff53a44f3b8 in writev_nonblocking () from /usr/local/sbin/httpd2
#4  0x00001ff53a44f6e3 in send_brigade_nonblocking () from
/usr/local/sbin/httpd2
#5  0x00001ff53a44fbc9 in ap_core_output_filter () from /usr/local/sbin/httpd2
#6  0x00001ff7e916011c in bio_filter_out_pass () from
/usr/local/lib/apache2/mod_ssl.so
#7  0x00001ff7e9161955 in bio_filter_out_ctrl () from
/usr/local/lib/apache2/mod_ssl.so
#8  0x00001ff7e9171d42 in modssl_smart_shutdown () from
/usr/local/lib/apache2/mod_ssl.so
#9  0x00001ff7e916059c in ssl_filter_io_shutdown () from
/usr/local/lib/apache2/mod_ssl.so
#10 0x00001ff7e9161dcf in ssl_io_filter_output () from
/usr/local/lib/apache2/mod_ssl.so
#11 0x00001ff7e9162498 in ssl_io_filter_coalesce () from
/usr/local/lib/apache2/mod_ssl.so
#12 0x00001ff53a45f72a in ap_shutdown_conn () from /usr/local/sbin/httpd2
#13 0x00001ff53a45f798 in ap_start_lingering_close () from
/usr/local/sbin/httpd2
#14 0x00001ff8185d03a4 in worker_thread () from
/usr/local/lib/apache2/mod_mpm_event.so
#15 0x00001ff7a7ee977e in _rthread_start (v=Variable "v" is not available.
) at /usr/src/lib/librthread/rthread.c:145
#16 0x00001ff81df9952b in __tfork_thread () at
/usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#17 0x0000000000000000 in ?? ()

I dont know if this is expected on OpenBSD or already known, if it is,
please ignore this message.

This is making debugging Apache to figure out why http2 isnt working impossible.

Regards.

Reply via email to