From b289674a2585658b826c12f09f0caa01c18cbd3a Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Thu, 5 Jul 2018 19:45:14 +0000 Subject: [PATCH] Merge r1588806 from trunk: r1494157 from eventopt for event, per sf's review comments. use a subpool of pchild since skiplist allocations will happen across threads and are only protected from other skiplist operations. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1835179 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 9 --------- server/mpm/event/event.c | 4 +++- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/STATUS b/STATUS index 8f8343f46d..8a02863302 100644 --- a/STATUS +++ b/STATUS @@ -124,15 +124,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) event: based on the commit log ("use a subpool of pchild since skiplist - allocations will happen across threads and are only protected from - other skiplist operations.", per sf's review comments), it sounds like this - should be backported. - trunk patch: http://svn.apache.org/r1588806 - 2.4.x patch: http://home.apache.org/~jailletc36/backport_1588806.patch - +1: ylavic, jim, rpluem - - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 31fa04af02..f07b757ab9 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -2431,6 +2431,7 @@ static void child_main(int child_num_arg, int child_bucket) apr_threadattr_t *thread_attr; apr_thread_t *start_thread_id; int i; + apr_pool_t *pskip; /* for benefit of any hooks that run as this child initializes */ retained->mpm->mpm_state = AP_MPMQ_STARTING; @@ -2458,7 +2459,8 @@ static void child_main(int child_num_arg, int child_bucket) apr_thread_mutex_create(&g_timer_skiplist_mtx, APR_THREAD_MUTEX_DEFAULT, pchild); APR_RING_INIT(&timer_free_ring, timer_event_t, link); - apr_skiplist_init(&timer_skiplist, pchild); + apr_pool_create(&pskip, pchild); + apr_skiplist_init(&timer_skiplist, pskip); apr_skiplist_set_compare(timer_skiplist, timer_comp, timer_comp); /* Just use the standard apr_setup_signal_thread to block all signals -- 2.40.0