Skip to content

Commit fbc7d1c

Browse files
committed
metrics: avoid possible segfault after restart twice
Accessing the metrics endpoint after restarting apachectl twice can result in a segfault due to internal state corruption, especially when using prefork mpm. Signed-off-by: Atzm WATANABE <[email protected]>
1 parent 0611aab commit fbc7d1c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/metrics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ apr_status_t oidc_metrics_cleanup(server_rec *s) {
879879
apr_thread_join(&rv, _oidc_metrics_thread);
880880
if (rv != APR_SUCCESS)
881881
oidc_serror(s, "apr_thread_join failed");
882+
_oidc_metrics_thread_exit = FALSE;
882883
_oidc_metrics_thread = NULL;
883884

884885
/* delete the shared memory segment if we are in the parent process */

0 commit comments

Comments
 (0)