On Fri, Oct 23, 2015 at 10:42 AM, Stefan Eissing
<[email protected]> wrote:
>
> Can I recover any files/lines from these
> ======= Backtrace: =========
> /lib64/libc.so.6[0x32a507174f]
> /lib64/libc.so.6(cfree+0x4b)[0x32a5075a4b]
> /opt/appl/apr-1.5.2/lib/libapr-1.so.0(apr_allocator_destroy+0x1b)[0x2abbed566e6b]
> /opt/appl/httpd/modules/mod_http2.so[0x2abbf10e082e]
> /opt/appl/httpd/modules/mod_http2.so[0x2abbf10e32ee]
> /opt/appl/httpd/modules/mod_http2.so[0x2abbf10db00a]
> /opt/appl/httpd/modules/mod_http2.so[0x2abbf10db233]
> /opt/appl/httpd/modules/mod_http2.so[0x2abbf10de351]
> /opt/appl/httpd-2.4.17/bin/httpd(ap_run_process_connection+0x4a)[0x456efa]
> /opt/appl/httpd-2.4.17/bin/httpd[0x468fa0]
> /lib64/libpthread.so.0[0x32a5c0683d]
> /lib64/libc.so.6(clone+0x6d)[0x32a50d526d]
> ======= Memory map: ========

That's an apr_pool_destroy() from either h2_mplx_destroy() or
h2_worker_destroy(), the only http2's pools that have their own
allocator.

I think the (++attempts >= 6) case in h2_mplx_release_and_join() could
trigger this, do we really want a timedwait here?
Also, apr_thread_cond_signal() in release() should probably be under
mutex, something like (2.4.x):

Index: modules/http2/h2_mplx.c
===================================================================
--- modules/http2/h2_mplx.c    (revision 1710105)
+++ modules/http2/h2_mplx.c    (working copy)
@@ -143,12 +143,18 @@ static void reference(h2_mplx *m)
     apr_atomic_inc32(&m->refs);
 }

-static void release(h2_mplx *m)
+static void release(h2_mplx *m, int lock)
 {
     if (!apr_atomic_dec32(&m->refs)) {
+        if (lock) {
+            apr_thread_mutex_lock(m->lock);
+        }
         if (m->join_wait) {
             apr_thread_cond_signal(m->join_wait);
         }
+        if (lock) {
+            apr_thread_mutex_lock(m->unlock);
+        }
     }
 }

@@ -158,7 +164,7 @@ void h2_mplx_reference(h2_mplx *m)
 }
 void h2_mplx_release(h2_mplx *m)
 {
-    release(m);
+    release(m, 1);
 }

 static void workers_register(h2_mplx *m) {
@@ -189,7 +195,7 @@ apr_status_t h2_mplx_release_and_join(h2_mplx *m,
     if (APR_SUCCESS == status) {
         int attempts = 0;

-        release(m);
+        release(m, 0);
         while (apr_atomic_read32(&m->refs) > 0) {
             m->join_wait = wait;
             ap_log_cerror(APLOG_MARK, (attempts? APLOG_INFO : APLOG_DEBUG),
--


>
> or do I have to ask the user to run a -g version and report on that?

That could be useful, along with "CoreDumpDirectory /tmp" (and ulimit
-c unlimited for the process launching httpd) which would provide the
corresponding core file.

>
> High load wreckage in production, always tricky...

Indeed...


Regards,
Yann.

Reply via email to