Mailing List Archive

Re: svn commit: r1888928 - in /httpd/httpd/branches/2.4.x: modules/aaa/ modules/arch/win32/ modules/cache/ modules/cluster/ modules/core/ modules/database/ modules/filters/ modules/generators/ modules/ldap/ modules/mappers/ modules/md/ modules/metadata/ m
On Sun, Apr 18, 2021 at 9:11 PM <jailletc36@apache.org> wrote:
>
> Modified: httpd/httpd/branches/2.4.x/modules/core/mod_watchdog.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/core/mod_watchdog.c?rev=1888928&r1=1888927&r2=1888928&view=diff
> ==============================================================================
> --- httpd/httpd/branches/2.4.x/modules/core/mod_watchdog.c (original)
> +++ httpd/httpd/branches/2.4.x/modules/core/mod_watchdog.c Sun Apr 18 19:11:48 2021
> @@ -112,6 +112,7 @@ static void* APR_THREAD_FUNC wd_worker(a
> int probed = 0;
> int inited = 0;
> int mpmq_s = 0;
> + apr_pool_t *ctx = NULL;
>
> w->pool = apr_thread_pool_get(thread);
> w->is_running = 1;
> @@ -165,8 +166,8 @@ static void* APR_THREAD_FUNC wd_worker(a
> w->singleton ? "Singleton " : "", w->name);
> apr_time_clock_hires(w->pool);
> if (wl) {
> - apr_pool_t *ctx = NULL;
> apr_pool_create(&ctx, w->pool);
> + apr_pool_tag(ctx, "wd_running");
> while (wl && w->is_running) {
> /* Execute watchdog callback */
> wl->status = (*wl->callback_fn)(AP_WATCHDOG_STATE_STARTING,
> @@ -183,7 +184,6 @@ static void* APR_THREAD_FUNC wd_worker(a
>
> /* Main execution loop */
> while (w->is_running) {
> - apr_pool_t *ctx = NULL;
> apr_time_t curr;
> watchdog_list_t *wl = w->callbacks;
>
> @@ -202,8 +202,10 @@ static void* APR_THREAD_FUNC wd_worker(a
> if (wl->status == APR_SUCCESS) {
> wl->step += (apr_time_now() - curr);
> if (wl->step >= wl->interval) {
> - if (!ctx)
> + if (!ctx) {
> apr_pool_create(&ctx, w->pool);
> + apr_pool_tag(ctx, "wd_running");
> + }
> wl->step = 0;
> /* Execute watchdog callback */
> wl->status = (*wl->callback_fn)(AP_WATCHDOG_STATE_RUNNING,
> @@ -224,8 +226,10 @@ static void* APR_THREAD_FUNC wd_worker(a
> */
> w->step += (apr_time_now() - curr);
> if (w->step >= wd_interval) {
> - if (!ctx)
> + if (!ctx) {
> apr_pool_create(&ctx, w->pool);
> + apr_pool_tag(ctx, "wd_running");
> + }
> w->step = 0;
> /* Run watchdog step hook */
> ap_run_watchdog_step(wd_server_conf->s, w->name, ctx);

These changes in mod_watchdog need two follow ups, r1876619 and
r1876675 (at least the first one) to fix the crash in ci.
Just proposed that in r1888934..

Regards;
Yann.