You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stefan Eissing <st...@greenbytes.de> on 2021/04/20 13:58:17 UTC

recent watchdog pool changes

Yann, can you have a look if this fix of mine does do the right thing? For me, mod_md works better when it does not use destroyed pools. 🤪

If this is ok, we might want to backport this really fast.

/Stefan


diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c
index d833939cb0..551f0156f7 100644
--- a/modules/core/mod_watchdog.c
+++ b/modules/core/mod_watchdog.c
@@ -175,6 +175,7 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
                 wl = wl->next;
             }
             apr_pool_destroy(ctx);
+            ctx = NULL;
         }
         else {
             ap_run_watchdog_init(wd_server_conf->s, w->name, w->pool);
@@ -235,8 +236,10 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
                 ap_run_watchdog_step(wd_server_conf->s, w->name, ctx);
             }
         }
-        if (ctx)
+        if (ctx) {
             apr_pool_destroy(ctx);
+            ctx = NULL;
+        }
         if (!w->is_running) {
             break;
         }

Re: recent watchdog pool changes

Posted by Stefan Eissing <st...@greenbytes.de>.
Ah, then I added my vote for this. Thanks for the pointer.

> Am 20.04.2021 um 16:09 schrieb Joe Orton <jo...@redhat.com>:
> 
> On Tue, Apr 20, 2021 at 03:58:17PM +0200, Stefan Eissing wrote:
>> Yann, can you have a look if this fix of mine does do the right thing? For me, mod_md works better when it does not use destroyed pools. 🤪
>> 
>> If this is ok, we might want to backport this really fast.
> 
> This is failing for you in 2.4.x, right?  The fix is proposed in STATUS:
> 
>  *) mod_watchdog: Fix incomplete backport in r1888928.
>     trunk patch: http://svn.apache.org/r1876619
>                  http://svn.apache.org/r1876675
>     +1: ylavic, jorton
> 
> 
>> 
>> /Stefan
>> 
>> 
>> diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c
>> index d833939cb0..551f0156f7 100644
>> --- a/modules/core/mod_watchdog.c
>> +++ b/modules/core/mod_watchdog.c
>> @@ -175,6 +175,7 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
>>                 wl = wl->next;
>>             }
>>             apr_pool_destroy(ctx);
>> +            ctx = NULL;
>>         }
>>         else {
>>             ap_run_watchdog_init(wd_server_conf->s, w->name, w->pool);
>> @@ -235,8 +236,10 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
>>                 ap_run_watchdog_step(wd_server_conf->s, w->name, ctx);
>>             }
>>         }
>> -        if (ctx)
>> +        if (ctx) {
>>             apr_pool_destroy(ctx);
>> +            ctx = NULL;
>> +        }
>>         if (!w->is_running) {
>>             break;
>>         }
>> 
> 


Re: recent watchdog pool changes

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Apr 20, 2021 at 03:58:17PM +0200, Stefan Eissing wrote:
> Yann, can you have a look if this fix of mine does do the right thing? For me, mod_md works better when it does not use destroyed pools. 🤪
> 
> If this is ok, we might want to backport this really fast.

This is failing for you in 2.4.x, right?  The fix is proposed in STATUS:

  *) mod_watchdog: Fix incomplete backport in r1888928.
     trunk patch: http://svn.apache.org/r1876619
                  http://svn.apache.org/r1876675
     +1: ylavic, jorton


> 
> /Stefan
> 
> 
> diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c
> index d833939cb0..551f0156f7 100644
> --- a/modules/core/mod_watchdog.c
> +++ b/modules/core/mod_watchdog.c
> @@ -175,6 +175,7 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
>                  wl = wl->next;
>              }
>              apr_pool_destroy(ctx);
> +            ctx = NULL;
>          }
>          else {
>              ap_run_watchdog_init(wd_server_conf->s, w->name, w->pool);
> @@ -235,8 +236,10 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
>                  ap_run_watchdog_step(wd_server_conf->s, w->name, ctx);
>              }
>          }
> -        if (ctx)
> +        if (ctx) {
>              apr_pool_destroy(ctx);
> +            ctx = NULL;
> +        }
>          if (!w->is_running) {
>              break;
>          }
>