httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60956] New: Event MPM listener thread may get blocked by SSL shutdowns
Date Wed, 05 Apr 2017 13:20:56 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60956

            Bug ID: 60956
           Summary: Event MPM listener thread may get blocked by SSL
                    shutdowns
           Product: Apache httpd-2
           Version: 2.4.23
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mpm_event
          Assignee: bugs@httpd.apache.org
          Reporter: frank.meier@ergon.ch
  Target Milestone: ---

I have analyzed an Apache httpd 2.4.23 server that did not handle new
connections anymore. I found this stack trace:

#0  0x00007f996d44f283 in poll () from /lib64/libc.so.6
#1  0x00007f996df8764f in apr_poll () from /opt/apache/bin/libapr-1.so.0
#2  0x00007f996eacb485 in ap_core_output_filter ()
#3  0x00007f996cf46488 in bio_filter_out_pass () from
/opt/apache/bin/mod_ssl.so
#4  0x00007f996cf483bf in bio_filter_out_ctrl () from
/opt/apache/bin/mod_ssl.so
#5  0x00007f996cf5803b in modssl_smart_shutdown () from
/opt/apache/bin/mod_ssl.so
#6  0x00007f996cf4856e in ssl_filter_io_shutdown.isra.2 () from
/opt/apache/bin/mod_ssl.so
#7  0x00007f996cf49c10 in ssl_io_filter_output () from
/opt/apache/bin/mod_ssl.so
#8  0x00007f996cf46b4e in ssl_io_filter_coalesce () from
/opt/apache/bin/mod_ssl.so
#9  0x00007f996ead9f93 in ap_shutdown_conn ()
#10 0x00007f996a505702 in start_lingering_close_nonblocking () from
/opt/apache/bin/mod_mpm_event.so
#11 0x00007f996a5040ac in process_timeout_queue () from
/opt/apache/bin/mod_mpm_event.so
#12 0x00007f996a5063b0 in listener_thread () from
/opt/apache/bin/mod_mpm_event.so
#13 0x00007f996d90faa1 in start_thread () from /lib64/libpthread.so.0
#14 0x00007f996d458aad in clone () from /lib64/libc.so.6


The function start_lingering_close_nonblocking() is blocked by a call to
poll(), which must not happen. Because the listener thread is blocked, this
process does not accept new connections anymore.

The line numbers are missing in the stack, but I think this happens:
- ap_shutdown_conn() creates an "End Of Connection" bucket (EOC)
- mod_ssl detects this in ssl_io_filter_output() and calls
modssl_smart_shutdown()
- modssl_smart_shutdown() sends an SSL "close notify" shutdown alert to the
peer and then flushes the data - this may block

The clean SSL shutdown has been implemented in Apache httpd 2.4.12 (see bug
54998). Previous versions of Apache httpd 2.4 are not affected.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message