Hi Yann, this is now a segfault with mod_http2 + beam v4 patch + mpm v7 patch: Program terminated with signal SIGSEGV, Segmentation fault. #0 allocator_free (node=0x0, allocator=0x7f8974080c90) at memory/unix/apr_pools.c:381 #0 allocator_free (node=0x0, allocator=0x7f8974080c90) at memory/unix/apr_pools.c:381 #1 apr_pool_clear (pool=0x7f89740830d8) at memory/unix/apr_pools.c:793 #2 0x00005611421447a8 in ap_push_pool (queue_info=0x0, pool_to_recycle=0x7f8974080c98) at fdqueue.c:234 #3 0x000056114213faea in process_lingering_close (cs=0x7f8974083368, pfd=0x561142cc97f8) at event.c:1513 #4 0x0000561142143620 in listener_thread (thd=0x0, dummy=0x54716c3684bbc) at event.c:1837 #5 0x00007f8989bb20a4 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #6 0x00007f89898e762d in clone () from /lib/x86_64-linux-gnu/libc.so.6
Stefan Am 25.01.2017 um 12:10 schrieb Stefan Priebe - Profihost AG: > Am 25.01.2017 um 10:46 schrieb Stefan Eissing: >> Thanks Yann! >> >> Stefan: here is the patch as committed to trunk: > > Up and running. Will report back. > >> >> >> Cheers, Stefan >> >>> Am 25.01.2017 um 01:41 schrieb Yann Ylavic <ylavic....@gmail.com>: >>> >>> Hi Stefan, >>> >>> On Tue, Jan 24, 2017 at 1:37 PM, Stefan Eissing >>> <stefan.eiss...@greenbytes.de> wrote: >>>> Yann, thanks for the patch. I agree that the cleanups need to be killed in >>>> the right place. Not certain if it was wrong before, but that part is not >>>> easy to see for every combination. >>>> >>>> I did some rework and hope this makes it more readable. If you find the >>>> time to look at it, feedback welcome. >>> >>> I still fear that if beam->pool gets destroyed while both >>> beam_send_cleanup() and beam_cleanup() are registered, the former is >>> called twice. >>> >>> I'd change: >>> if (safe_send) { >>> if (beam->send_pool && beam->send_pool != beam->pool) { >>> apr_pool_cleanup_kill(beam->send_pool, beam, beam_send_cleanup); >>> } >>> status = beam_send_cleanup(beam); >>> } >>> >>> with: >>> if (safe_send) { >>> if (beam->send_pool) { >>> if (beam->send_pool != beam->pool) { >>> apr_pool_cleanup_kill(beam->send_pool, beam, >>> beam_send_cleanup); >>> } >>> status = beam_send_cleanup(beam); >>> } >>> } >>> >>> since in the above case beam_send_cleanup is run first and sets >>> send_pool=NULL. >>> >>> Attached v3 with this only change w.r.t. v2. >>> Otherwise, looks good to me, thanks! >>> <h2_beams_cleanup_v3.diff> >> >> Stefan Eissing >> >> <green/>bytes GmbH >> Hafenstrasse 16 >> 48155 Münster >> www.greenbytes.de >>