Bug 63216 - mod_brotli segfaults in BrotliEncoderCompressStream
Summary: mod_brotli segfaults in BrotliEncoderCompressStream
Status: RESOLVED INVALID
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Other Modules (show other bugs)
Version: 2.4.38
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-28 11:29 UTC by asf
Modified: 2019-06-19 05:23 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description asf 2019-02-28 11:29:43 UTC
Hello,

just wanted to report that I'm seeing mod_brotli segfaults on my server. The backtraces from the coredumps I was able to catch all look like this:

#0  0x00007f9a787e99e0 in BrotliEncoderCompressStream () from /usr/lib/libbrotlienc.so.1
#1  0x00007f9a788446a6 in ?? () from /etc/httpd/modules/mod_brotli.so
#2  0x00007f9a78a6bf3e in ?? () from /etc/httpd/modules/mod_filter.so
#3  0x00007f9a780753d0 in ?? () from /etc/httpd/modules/mod_proxy_fcgi.so
#4  0x00007f9a78076886 in ?? () from /etc/httpd/modules/mod_proxy_fcgi.so
#5  0x00007f9a78093e9c in proxy_run_scheme_handler () from /etc/httpd/modules/mod_proxy.so
#6  0x00007f9a78094c7f in ?? () from /etc/httpd/modules/mod_proxy.so
#7  0x000055af2ec6bd50 in ap_run_handler ()
#8  0x000055af2ec6c2e6 in ap_invoke_handler ()
#9  0x000055af2ec8338d in ap_process_async_request ()
#10 0x000055af2ec7f622 in ?? ()
#11 0x000055af2ec75d50 in ap_run_process_connection ()
#12 0x00007f9a77f91cde in ?? () from /etc/httpd/modules/mod_mpm_event.so
#13 0x00007f9a77f926ae in ?? () from /etc/httpd/modules/mod_mpm_event.so
#14 0x00007f9a78d14a9d in start_thread () from /usr/lib/libpthread.so.0
#15 0x00007f9a78c44b23 in clone () from /usr/lib/libc.so.6

The system is a KVM-based virtual server running Arch Linux current with the 4.19 LTS kernel.

Please let me know if I can help fixing this in any other way.

–Christian
Comment 1 Luca Toscano 2019-04-11 19:08:54 UTC
Hi Christian,

thanks for the report. From a quick look the segfault seems happening on libbrotlienc and not httpd, but it would be great to have more info about the stack trace. Do you have time and patience to recompile httpd with debugging symbols? In this way we could resolve all the question marks and pin-point the exact line of code in mod_brotli. 

Alternatively, do you have a way to reliably reproduce this issue? If so, could you please add more info to this report?

Thanks!
Comment 2 asf 2019-04-12 07:07:50 UTC
Hey Luca,

thanks for getting back to me on this! Unfortunately, I wasn't able to reproduce. In fact, the issue hasn't happened again after I filed this report.

If it happens again and I'm able to reproduce it, I'll isolate the virtual host in question and run it with a debug-enabled httpd for sure.


Seems all very edge-case, so I guess, this can be closed for now.

Thanks again!

–Christian
Comment 3 Christophe JAILLET 2019-06-19 05:23:57 UTC
Closing, as suggested in comment #2.