]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add missing pool tags to help debugging.
authorYann Ylavic <ylavic@apache.org>
Thu, 16 Apr 2020 12:32:33 +0000 (12:32 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 16 Apr 2020 12:32:33 +0000 (12:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876599 13f79535-47bb-0310-9956-ffa450edef68

42 files changed:
modules/aaa/mod_authnz_fcgi.c
modules/aaa/mod_authnz_ldap.c
modules/aaa/mod_authz_groupfile.c
modules/arch/win32/mod_isapi.c
modules/cache/mod_cache_socache.c
modules/cache/mod_socache_dbm.c
modules/cluster/mod_heartmonitor.c
modules/core/mod_watchdog.c
modules/database/mod_dbd.c
modules/dav/main/props.c
modules/filters/mod_include.c
modules/filters/mod_sed.c
modules/filters/mod_substitute.c
modules/generators/mod_autoindex.c
modules/generators/mod_cgid.c
modules/ldap/util_ldap.c
modules/loggers/mod_journald.c
modules/mappers/mod_rewrite.c
modules/mappers/mod_speling.c
modules/md/md_acme.c
modules/md/md_http.c
modules/md/md_util.c
modules/metadata/mod_mime_magic.c
modules/proxy/balancers/mod_lbmethod_heartbeat.c
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy_fcgi.c
modules/proxy/mod_proxy_http.c
modules/proxy/mod_proxy_uwsgi.c
modules/proxy/mod_serf.c
modules/proxy/proxy_util.c
modules/ssl/mod_ssl_ct.c
modules/ssl/ssl_engine_ocsp.c
modules/ssl/ssl_util.c
modules/ssl/ssl_util_stapling.c
server/apreq_parser.c
server/core.c
server/mpm/mpmt_os2/mpmt_os2_child.c
server/mpm/netware/mpm_netware.c
server/mpm/winnt/mpm_winnt.c
server/mpm/winnt/nt_eventlog.c
server/mpm_unix.c
server/request.c

index b32d8a37d48df83123c3e361bf88360fb0b87ee6..ae437d8c02a08d9e0fff8252480826638be7fad4 100644 (file)
@@ -713,6 +713,7 @@ static void req_rsp(request_rec *r, const fcgi_provider_conf *conf,
     }
 
     apr_pool_create(&temp_pool, r->pool);
+    apr_pool_tag(temp_pool, "mod_authnz_fcgi (req_rsp)");
 
     setupenv(r, password, apache_role);
 
index b9f8671c756b235a9932cfa85e577e1289d6fcc2..5ba21e04dbed88c74853cd11c9fcadc3e51b78f6 100644 (file)
@@ -481,6 +481,7 @@ static authn_ldap_request_t* build_request_config(request_rec *r)
         (authn_ldap_request_t *)apr_pcalloc(r->pool, sizeof(authn_ldap_request_t));
     ap_set_module_config(r->request_config, &authnz_ldap_module, req);
     apr_pool_create(&(req->ldc_pool), r->pool);
+    apr_pool_tag(req->ldc_pool, "authn_ldap_req_ldc"):
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01740)
                  "ldap authorize: Creating LDAP req structure");
     return req;
index 88c6cf0f3e4c33755361d259477c6c1d96adf620..c2431e05b7953dfe23b7a93d8aad43626b3ccc50 100644 (file)
@@ -98,6 +98,8 @@ static apr_status_t groups_for_user(apr_pool_t *p, char *user, char *grpfile,
     }
 
     apr_pool_create(&sp, p);
+    apr_pool_tag(sp, "authz_groupfile (groups_for_user)");
+
     ap_varbuf_init(p, &vb, VARBUF_INIT_LEN);
 
     while (!(ap_varbuf_cfg_getline(&vb, f, VARBUF_MAX_LEN))) {
index 23e6a68a549c390a2d3c0e464e0d95baffa4fcf0..5592a5744e96b79d42108ec23fe95cf4e7e597fa 100644 (file)
@@ -1692,6 +1692,7 @@ static int isapi_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
                      "could not create the isapi cache pool");
         return APR_EGENERAL;
     }
+    apr_pool_tag(loaded.pool, "mod_isapi_load");
 
     loaded.hash = apr_hash_make(loaded.pool);
     if (!loaded.hash) {
index 2cdc9504acb11552a7a5098f31f25de12720af9a..cddda5dbbd90dec1345dfb0b76e3b503dc13a973 100644 (file)
@@ -471,6 +471,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
      * about for the lifetime of the response.
      */
     apr_pool_create(&sobj->pool, r->pool);
+    apr_pool_tag(sobj->pool, "mod_cache_socache (open_entity)");
 
     sobj->buffer = apr_palloc(sobj->pool, dconf->max);
     sobj->buffer_len = dconf->max;
@@ -800,6 +801,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r,
                     : obj->info.expire + dconf->mintime;
 
     apr_pool_create(&sobj->pool, r->pool);
+    apr_pool_tag(sobj->pool, "mod_cache_socache (store_headers)");
 
     sobj->buffer = apr_palloc(sobj->pool, dconf->max);
     sobj->buffer_len = dconf->max;
index 4460dffd27d7045d9efe3ae23a2d8aa20679f2cc..7c0ca223fb598e41cb0f9f034a38e42b86c1de66 100644 (file)
@@ -92,6 +92,7 @@ static const char *socache_dbm_create(ap_socache_instance_t **context,
     }
 
     apr_pool_create(&ctx->pool, p);
+    apr_pool_tag(ctx->pool, "socache_dbm_instance");
 
     return NULL;
 }
index 61a851764d03f3dc3a7cda16097ccec6ef08db43..2e8d12dd2e6bbb2fffa4ebd3206fc241a2524fc1 100644 (file)
@@ -633,6 +633,7 @@ static apr_status_t hm_watchdog_callback(int state, void *data,
                 apr_interval_time_t timeout;
 
                 apr_pool_create(&p, pool);
+                apr_pool_tag(p, "hm_running");
 
                 pfd.desc_type = APR_POLL_SOCKET;
                 pfd.desc.s = ctx->sock;
@@ -807,6 +808,7 @@ static void *hm_create_config(apr_pool_t *p, server_rec *s)
     ctx->interval = apr_time_from_sec(HM_UPDATE_SEC);
     ctx->s = s;
     apr_pool_create(&ctx->p, p);
+    apr_pool_tag(ctx->p, "hm_ctx");
     ctx->servers = apr_hash_make(ctx->p);
 
     return ctx;
index bc05e8521150b5f07b4dc5456a140dc3710289f3..d833939cb0ac7ca79fd4bc338e99b37ade4496af 100644 (file)
@@ -112,6 +112,7 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
     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(apr_thread_t *thread, void *data)
                      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(apr_thread_t *thread, void *data)
 
     /* 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(apr_thread_t *thread, void *data)
             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(apr_thread_t *thread, void *data)
              */
             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);
@@ -441,6 +445,7 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
         if (!(wd_server_conf = apr_pcalloc(ppconf, sizeof(wd_server_conf_t))))
             return APR_ENOMEM;
         apr_pool_create(&wd_server_conf->pool, ppconf);
+        apr_pool_tag(wd_server_conf->pool, "wd_server_conf");
         apr_pool_userdata_set(wd_server_conf, pk, apr_pool_cleanup_null, ppconf);
     }
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(010033)
index 72126652e20d621015af97420c5cb20767b84009..aa6b76489ff4a0d5549010ff52754fe41c81cec7 100644 (file)
@@ -525,6 +525,7 @@ static apr_status_t dbd_construct(void **data_ptr,
                      "Failed to create memory pool");
         return rv;
     }
+    apr_pool_tag(rec_pool, "dbd_rec_pool");
 
     rec = apr_pcalloc(rec_pool, sizeof(ap_dbd_t));
 
@@ -589,6 +590,7 @@ static apr_status_t dbd_construct(void **data_ptr,
         apr_pool_destroy(rec->pool);
         return rv;
     }
+    apr_pool_tag(prepared_pool, "dbd_prepared_pool");
 
     rv = dbd_prepared_init(prepared_pool, cfg, rec);
     if (rv != APR_SUCCESS) {
@@ -673,6 +675,7 @@ static apr_status_t dbd_setup_init(apr_pool_t *pool, server_rec *s)
                          "Failed to create reslist cleanup memory pool");
             return rv2;
         }
+        apr_pool_tag(group->pool, "dbd_group");
 
 #if APR_HAS_THREADS
         rv2 = dbd_setup(s, group);
index 6965edccc035bcd1093d41e88f1fb5cbdc7916bc..8b0e1212d8277a2fc1f822eb3c72a6a11e299244 100644 (file)
@@ -723,6 +723,7 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
         apr_xml_parser *parser;
 
         apr_pool_create (&pool, propdb->p);
+        apr_pool_tag(pool, "mod_dav-xml_parser");
         parser = apr_xml_parser_create (pool);
 
         apr_xml_parser_feed(parser, "<r xmlns:D=\"DAV:\" ", 18);
index 9f69d8adf931643a85b0ca693f2956d683510780..584d8fb311fa20ee490f1045c301dfc927ea1076 100644 (file)
@@ -3855,6 +3855,7 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
         ctx->intern = intern = apr_palloc(r->pool, sizeof(*ctx->intern));
         ctx->pool = r->pool;
         apr_pool_create(&ctx->dpool, ctx->pool);
+        apr_pool_tag(ctx->dpool, "includes_dpool");
 
         /* runtime data */
         intern->tmp_bb = apr_brigade_create(ctx->pool, f->c->bucket_alloc);
index 8d29a03707d40e71bfa03a54ff57e8a739aead92..0181deefa08f789c17443202debd6ca2c166ee4b 100644 (file)
@@ -254,6 +254,7 @@ static apr_status_t init_context(ap_filter_t *f, sed_expr_config *sed_cfg, int u
     ctx->bufsize = MODSED_OUTBUF_SIZE;
     if (usetpool) {
         apr_pool_create(&(ctx->tpool), r->pool);
+        apr_pool_tag(ctx->tpool, "sed_tpool");
     }
     else {
         ctx->tpool = r->pool;
index efbdffc4049c88ea5e9d915e373eb465f70b778c..58e696debba1586a07b2ebafe8c55cd2356ca85a 100644 (file)
@@ -450,6 +450,7 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
         ctx->passbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
         /* Create our temporary pool only once */
         apr_pool_create(&(ctx->tpool), f->r->pool);
+        apr_pool_tag(ctx->tpool, "substitute_tpool");
         apr_table_unset(f->r->headers_out, "Content-Length");
     }
 
index 21fc59a011f9127868718554df3057d1741a0235..f977b8832475ce770686f8ac1711a620addb6781 100644 (file)
@@ -1517,6 +1517,7 @@ static void output_directories(struct ent **ar, int n,
     char *breakrow = "";
 
     apr_pool_create(&scratch, r->pool);
+    apr_pool_tag(scratch, "autoindex_scratch");
 
     name_width = d->name_width;
     desc_width = d->desc_width;
index 2778430ee430bfd2112bad13a9296311c14b9169..0c50e0487c0b3afd163bf1ea45289f71b25a79c1 100644 (file)
@@ -713,6 +713,7 @@ static int cgid_server(void *data)
     apr_status_t rv;
 
     apr_pool_create(&ptrans, pcgi);
+    apr_pool_tag(ptrans, "cgid_ptrans");
 
     apr_signal(SIGCHLD, SIG_IGN);
     apr_signal(SIGHUP, daemon_signal_handler);
@@ -997,6 +998,7 @@ static int cgid_start(apr_pool_t *p, server_rec *main_server,
     else if (daemon_pid == 0) {
         if (pcgi == NULL) {
             apr_pool_create(&pcgi, p);
+            apr_pool_tag(pcgi, "cgid_pcgi");
         }
         exit(cgid_server(main_server) > 0 ? DAEMON_STARTUP_ERROR : -1);
     }
index 22db0fe08bff25414e46528ea85d3fd098092b23..57aa856e5b422b9b64fd6bff3bc9eab5abaa881c 100644 (file)
@@ -861,6 +861,7 @@ static util_ldap_connection_t *
 #endif
             return NULL;
         }
+        apr_pool_tag(newpool, "util_ldap_connection");
 
         /*
          * Add the new connection entry to the linked list. Note that we
@@ -908,6 +909,7 @@ static util_ldap_connection_t *
 #endif
                 return NULL;
             }
+            apr_pool_tag(l->rebind_pool, "util_ldap_rebind");
         }
 
         if (p) {
@@ -2854,6 +2856,7 @@ static void *util_ldap_create_config(apr_pool_t *p, server_rec *s)
      * no shared memory managed by either.
      */
     apr_pool_create(&st->pool, p);
+    apr_pool_tag(st->pool, "util_ldap_state");
 #if APR_HAS_THREADS
     apr_thread_mutex_create(&st->mutex, APR_THREAD_MUTEX_DEFAULT, st->pool);
 #endif
index 6b4ced30a8748e7f46b4c3e5f7ba6c53d161f8a9..0175b527363633b212367be34f9b138a3c86ba2e 100644 (file)
@@ -116,6 +116,7 @@ static void journald_log(apr_pool_t *pool, const char *log,
                     NULL);
         return;
     }
+    apr_pool_tag(subpool, "journald_log");
 
     /* Adds new entry to iovec if previous additions were successful. */
 #define IOVEC_ADD_LEN(FORMAT, VAR, LEN) \
index 21d33eeb9cba5703593d7c38f52ab7b6746c1cc1..661bc30f4858fa16ebf1a5a6a2884b155eaf8d29 100644 (file)
@@ -1063,6 +1063,7 @@ static void set_cache_value(const char *name, apr_time_t t, char *key,
 #endif
                 return;
             }
+            apr_pool_tag(p, "rewrite_cachedmap");
 
             map = apr_palloc(cachep->pool, sizeof(cachedmap));
             map->pool = p;
@@ -1140,6 +1141,7 @@ static int init_cache(apr_pool_t *p)
         cachep = NULL; /* turns off cache */
         return 0;
     }
+    apr_pool_tag(cachep->pool, "rewrite_cachep");
 
     cachep->maps = apr_hash_make(cachep->pool);
 #if APR_HAS_THREADS
@@ -4384,6 +4386,7 @@ static int apply_rewrite_list(request_rec *r, apr_array_header_t *rewriterules,
 
     if (dconf->options & OPTION_LONGOPT) { 
         apr_pool_create(&(ctx->temp_pool), r->pool);
+        apr_pool_tag(ctx->temp_pool, "rewrite_ctx_ptemp");
     }
     else { 
         ctx->temp_pool = NULL;
index 35d33ea03d531c0f8f1ce557c137598b60fe3258..2ed65eb81015265cfb58e04ba9fdfe417c367d42 100644 (file)
@@ -419,6 +419,7 @@ static int check_speling(request_rec *r)
 
             if (apr_pool_create(&sub_pool, p) != APR_SUCCESS)
                 return DECLINED;
+            apr_pool_tag(sub_pool, "speling_sub");
 
             t = apr_array_make(sub_pool, candidates->nelts * 8 + 8,
                               sizeof(char *));
index d42ea72230c6c9f28a92712d04d9508cbeaf1a8f..c085ba351846e0e1eda725310571ba83e69e2770 100644 (file)
@@ -121,6 +121,7 @@ static md_acme_req_t *md_acme_req_create(md_acme_t *acme, const char *method, co
     if (rv != APR_SUCCESS) {
         return NULL;
     }
+    apr_pool_tag(pool, "md_acme_req");
     
     req = apr_pcalloc(pool, sizeof(*req));
     if (!req) {
index bafa5913fd35d7ac57ba929f44d187ec707b8361..9c2790cd66a99f014bf4712d06f96226190d0e91 100644 (file)
@@ -169,6 +169,7 @@ static apr_status_t req_create(md_http_request_t **preq, md_http_t *http,
     if (rv != APR_SUCCESS) {
         return rv;
     }
+    apr_pool_tag(pool, "md_http_req");
     
     req = apr_pcalloc(pool, sizeof(*req));
     req->pool = pool;
index 6bf65e175dfcc6ca85d6199e737b2e505a0ccf1b..25830f2b92ddce37945f00ddac313212c33ed72d 100644 (file)
@@ -37,8 +37,8 @@ apr_status_t md_util_pool_do(md_util_action *cb, void *baton, apr_pool_t *p)
     apr_pool_t *ptemp;
     apr_status_t rv = apr_pool_create(&ptemp, p);
     if (APR_SUCCESS == rv) {
+        apr_pool_tag(ptemp, "md_pool_do");
         rv = cb(baton, p, ptemp);
-        
         apr_pool_destroy(ptemp);
     }
     return rv;
@@ -51,6 +51,7 @@ static apr_status_t pool_vado(md_util_vaction *cb, void *baton, apr_pool_t *p, v
     
     rv = apr_pool_create(&ptemp, p);
     if (APR_SUCCESS == rv) {
+        apr_pool_tag(ptemp, "md_pool_vado");
         rv = cb(baton, p, ptemp, ap);
         apr_pool_destroy(ptemp);
     }
index c4bc621cd21d259fce9462fc2d1a519cb098abcc..e45f209b73c516a9bb7a60c2bca4b50ad716945c 100644 (file)
@@ -2181,6 +2181,7 @@ static int uncompress(request_rec *r, int method,
      */
     if (apr_pool_create(&sub_context, r->pool) != APR_SUCCESS)
         return -1;
+    apr_pool_tag(sub_context, "magic_uncompress");
 
     if ((rv = create_uncompress_child(&parm, sub_context, &pipe_out)) != APR_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01553)
index 7aeaf71248549f24de03247fa769a9627df777a2..412bac420e680ca327b153b078a147922e2ed10a 100644 (file)
@@ -281,6 +281,7 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
     }
 
     apr_pool_create(&tpool, r->pool);
+    apr_pool_tag(tpool, "lb_heartbeat_tpool");
 
     servers = apr_hash_make(tpool);
 
index 7294e5a0b3a83952b79debe1097b0e486b3fa3df..71fae13edcb4f1b2ad6f2d17e2a6eb8a559a7376 100644 (file)
@@ -878,6 +878,7 @@ static int proxy_walk(request_rec *r)
             if (entry_proxy->refs && entry_proxy->refs->nelts) {
                 if (!rxpool) {
                     apr_pool_create(&rxpool, r->pool);
+                    apr_pool_tag(rxpool, "proxy_rxpool");
                 }
                 nmatch = entry_proxy->refs->nelts;
                 pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
index 77ad661c27353a0ab7eded53864c7c918392a464..a9d908e82ea479d7d86ac074ee5fd99a66fd4d49 100644 (file)
@@ -947,6 +947,7 @@ static int fcgi_do_request(apr_pool_t *p, request_rec *r,
     }
 
     apr_pool_create(&temp_pool, r->pool);
+    apr_pool_tag(temp_pool, "proxy_fcgi_do_request");
 
     /* Step 2: Send Environment via FCGI_PARAMS */
     rv = send_environment(conn, r, temp_pool, request_id);
index 3f356d40e75051ce27eaaf09dae5506af9a2fb4a..71c05e89982bbc3eda661b141ee3dd5d630195a7 100644 (file)
@@ -924,6 +924,7 @@ static request_rec *make_fake_req(conn_rec *c, request_rec *r)
     request_rec *rp;
 
     apr_pool_create(&pool, c->pool);
+    apr_pool_tag(pool, "proxy_http_rp");
 
     rp = apr_pcalloc(pool, sizeof(*r));
 
index 98b8579d0b7c9adb38e5a34f6edac5c686523d5b..32994470bed094753e9a66c952d7255c231d8850 100644 (file)
@@ -238,6 +238,7 @@ static request_rec *make_fake_req(conn_rec *c, request_rec *r)
     request_rec *rp;
 
     apr_pool_create(&pool, c->pool);
+    apr_pool_tag(pool, "proxy_uwsgi_rp");
 
     rp = apr_pcalloc(pool, sizeof(*r));
 
index 1819b91ee39b12defcc28a8bcfa00a75bf50f91a..d054a992697251cc7c325ea9d1eb19e0f808e0cb 100644 (file)
@@ -418,6 +418,7 @@ static int drive_serf(request_rec *r, serf_config_t *conf)
      * from the main serf context in the async mpm mode.
      */
     apr_pool_create(&pool, r->pool);
+    apr_pool_tag(pool, "mod_serf_drive");
     if (strcmp(conf->url.scheme, "cluster") == 0) {
         int rc;
         ap_serf_cluster_provider_t *cp;
@@ -955,6 +956,7 @@ static int hb_list_servers(void *baton,
     const char *path = apr_table_get(params, "path");
 
     apr_pool_create(&tpool, r->pool);
+    apr_pool_tag(tpool, "mod_serf_hb");
 
     path = ap_server_root_relative(tpool, path);
 
index bb12774a553e48f3a37d2faa14be9e3c5fd33f9b..23674ae2a8cbf913702f34b3cdbc3c977cda2ef3 100644 (file)
@@ -1335,6 +1335,7 @@ static proxy_worker *proxy_balancer_get_best_worker(proxy_balancer *balancer,
                  balancer->lbmethod->name, balancer->s->name);
 
     apr_pool_create(&tpool, r->pool);
+    apr_pool_tag(tpool, "proxy_lb_best");
 
     spares = apr_array_make(tpool, 1, sizeof(proxy_worker*));
     standbys = apr_array_make(tpool, 1, sizeof(proxy_worker*));
@@ -1973,6 +1974,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_worker(proxy_worker *worker, proxy_wo
     if (APLOGdebug(ap_server_conf)) {
         apr_pool_t *pool;
         apr_pool_create(&pool, ap_server_conf->process->pool);
+        apr_pool_tag(pool, "proxy_worker_name");
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02338)
                      "%s shm[%d] (0x%pp) for worker: %s", action, i, (void *)shm,
                      ap_proxy_worker_name(pool, worker));
index 748fc08bf307dd1203defe35853dd0853914de25..c2de848d382eb5d9815c28465a009265a941d3cc 100644 (file)
@@ -1038,6 +1038,7 @@ static int sct_daemon(server_rec *s_main)
 
     /* ptemp - temporary pool for refresh cycles */
     apr_pool_create(&ptemp, pdaemon);
+    apr_pool_tag(ptemp, "sct_daemon_refresh");
 
     while (!daemon_should_exit) {
         sct_daemon_cycle(sconf, s_main, ptemp, DAEMON_NAME);
@@ -1062,6 +1063,7 @@ static int daemon_start(apr_pool_t *p, server_rec *main_server,
     else if (daemon_pid == 0) {
         if (pdaemon == NULL) {
             apr_pool_create(&pdaemon, p);
+            apr_pool_tag(pdaemon, "sct_daemon");
         }
         exit(sct_daemon(main_server) > 0 ? DAEMON_STARTUP_ERROR : -1);
     }
@@ -1091,6 +1093,7 @@ static void *sct_daemon_thread(apr_thread_t *me, void *data)
 
     /* ptemp - temporary pool for refresh cycles */
     apr_pool_create(&ptemp, pdaemon);
+    apr_pool_tag(ptemp, "sct_daemon_thread");
 
     while (1) {
         if ((rv = ap_mpm_query(AP_MPMQ_MPM_STATE, &mpmq_s)) != APR_SUCCESS) {
@@ -1117,6 +1120,7 @@ static int daemon_thread_start(apr_pool_t *pconf, server_rec *s_main)
     apr_status_t rv;
 
     apr_pool_create(&pdaemon, pconf);
+    apr_pool_tag(pdaemon, "sct_daemon");
     rv = apr_thread_create(&daemon_thread, NULL, sct_daemon_thread, s_main,
                            pconf);
     if (rv != APR_SUCCESS) {
@@ -1260,6 +1264,7 @@ static int ssl_ct_post_config(apr_pool_t *pconf, apr_pool_t *plog,
         if (!sconf->db_log_config) {
             /* log config db in separate pool that can be cleared */
             apr_pool_create(&sconf->db_log_config_pool, pconf);
+            apr_pool_tag(sconf->db_log_config_pool, "sct_db_log_config");
             sconf->db_log_config =
                 apr_array_make(sconf->db_log_config_pool, 2,
                                sizeof(ct_log_config *));
index 5c6a205057c22a7cce711562ecc105a097dc7897..5e045125585309243a70e8fdccae5e537065990f 100644 (file)
@@ -284,6 +284,7 @@ int modssl_verify_ocsp(X509_STORE_CTX *ctx, SSLSrvConfigRec *sc,
     /* Create a temporary pool to constrain memory use (the passed-in
      * pool may be e.g. a connection pool). */
     apr_pool_create(&vpool, pool);
+    apr_pool_tag(vpool, "modssl_verify_ocsp");
 
     rv = verify_ocsp_status(cert, ctx, c, sc, s, vpool);
 
index afb54ac70fd597c555c98dd5faa6d83378bbeab8..83f590bbf9bff593b8614dd2c7f33e554f0015a4 100644 (file)
@@ -305,6 +305,7 @@ static struct CRYPTO_dynlock_value *ssl_dyn_create_function(const char *file,
      * away in the destruction callback.
      */
     apr_pool_create(&p, dynlockpool);
+    apr_pool_tag(p, "modssl_dynlock_value");
     ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE1, 0, p,
                   "Creating dynamic lock");
 
index 7ee434037187fcaa1b470c6325b6d14c9bd8bc00..cb5084e9665d4ff132e97d5c6b48f620dfc29cb5 100644 (file)
@@ -515,6 +515,7 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl,
 
     /* Create a temporary pool to constrain memory use */
     apr_pool_create(&vpool, conn->pool);
+    apr_pool_tag(vpool, "modssl_stapling_renew");
 
     if (apr_uri_parse(vpool, ocspuri, &uri) != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01939)
index 58a6ef6e30ef684938ed29ae5a71c1e4df1be39e..700cc43face662444abaf64ada2f7bdf11bbfe22 100644 (file)
@@ -107,6 +107,7 @@ APREQ_DECLARE(apr_status_t) apreq_pre_initialize(apr_pool_t *pool)
     status = apr_pool_create(&default_parser_pool, pool);
     if (status != APR_SUCCESS)
         return status;
+    apr_pool_tag(default_parser_pool, "apreq_default_parser");
 
     apr_pool_cleanup_register(default_parser_pool, NULL,
                               apreq_parsers_cleanup,
index 1b6c98251a12d12f89f5c9e8e8d0c5cc8db071f6..adad3e1318fc87243aad0253814533c3c893bda6 100644 (file)
@@ -759,6 +759,7 @@ void ap_core_reorder_directories(apr_pool_t *p, server_rec *s)
 
     /* we have to allocate tmp space to do a stable sort */
     apr_pool_create(&tmp, p);
+    apr_pool_tag(tmp, "core_reorder_directories");
     sortbin = apr_palloc(tmp, sec_dir->nelts * sizeof(*sortbin));
     for (i = 0; i < nelts; ++i) {
         sortbin[i].orig_index = i;
index bb7e1369ea541767c69083d1697eaf032f02f150..f405cd2ea9eb508581ccfb0fb47e32d25f9f69c3 100644 (file)
@@ -200,6 +200,7 @@ void ap_mpm_child_main(apr_pool_t *pconf)
         int last_poll_idx = 0;
 
         apr_pool_create(&pconn, pchild);
+        apr_pool_tag(pconn, "transaction");
         worker_args = apr_palloc(pconn, sizeof(worker_args_t));
         worker_args->pconn = pconn;
 
index a2f2862642806853c9a1fde229bc38af3972809f..fa26630d4d31bcb8cc051a141becc0ec84acf418 100644 (file)
@@ -896,6 +896,7 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
     set_signals();
 
     apr_pool_create(&pmain, pconf);
+    apr_pool_tag(pmain, "pmain");
     ap_run_child_init(pmain, ap_server_conf);
 
     if (ap_threads_max_free < ap_threads_min_free + 1)  /* Don't thrash... */
index 92907890b44873599bf6cbf1952beb91b15c3ff3..97086589fc97f857a502c4e028336e0c3e803450 100644 (file)
@@ -558,6 +558,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
     int envc;
 
     apr_pool_create_ex(&ptemp, p, NULL, NULL);
+    apr_pool_tag(ptemp, "create_process");
 
     /* Build the command line. Should look something like this:
      * C:/apache/bin/httpd.exe -f ap_server_confname
index e7e80d0dcd123880113bfc566641f7a9d6469d48..cd49ee652775552f00c688bbf9ce6e4a5b3430d2 100644 (file)
@@ -39,6 +39,7 @@ static DWORD WINAPI service_stderr_thread(LPVOID hPipe)
     apr_pool_t *p;
 
     apr_pool_create_ex(&p, NULL, NULL, NULL);
+    apr_pool_tag(p, "service_stderr_thread");
 
     errarg[0] = "The Apache service named";
     errarg[1] = display_name;
index d21c7e0e5149ff2c98313963b00a0455a73e1feb..8c4d233792d616d6d9244e47f1a628b26a12297e 100644 (file)
@@ -632,6 +632,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
     if (rv != APR_SUCCESS) {
         return rv;
     }
+    apr_pool_tag(p, "dummy_connection");
 
     /* If possible, find a listener which is configured for
      * plain-HTTP, not SSL; using an SSL port would either be
index d06bab5d311f32c782dbdf3ba92d1e76be902bcd..1e9a15a28ac0d9e66c73cbf7e75d95d4a07f6acd 100644 (file)
@@ -1268,6 +1268,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
             if (entry_core->refs && entry_core->refs->nelts) {
                 if (!rxpool) {
                     apr_pool_create(&rxpool, r->pool);
+                    apr_pool_tag(rxpool, "directory_walk_rxpool");
                 }
                 nmatch = entry_core->refs->nelts;
                 pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
@@ -1485,6 +1486,7 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
                 if (entry_core->refs && entry_core->refs->nelts) {
                     if (!rxpool) {
                         apr_pool_create(&rxpool, r->pool);
+                        apr_pool_tag(rxpool, "location_walk_rxpool");
                     }
                     nmatch = entry_core->refs->nelts;
                     pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
@@ -1687,6 +1689,7 @@ AP_DECLARE(int) ap_file_walk(request_rec *r)
                 if (entry_core->refs && entry_core->refs->nelts) {
                     if (!rxpool) {
                         apr_pool_create(&rxpool, r->pool);
+                        apr_pool_tag(rxpool, "file_walk_rxpool");
                     }
                     nmatch = entry_core->refs->nelts;
                     pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));