From 277ee6b6fc9d9837291fd65531f5442e855079f5 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Mon, 2 Jan 2012 09:00:55 +0000 Subject: [PATCH] Add a bit of debug logging git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1226375 13f79535-47bb-0310-9956-ffa450edef68 --- docs/log-message-tags/next-number | 2 +- modules/slotmem/mod_slotmem_shm.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index c7ffbf8084..0f6991adc9 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2293 +2295 diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c index 496764c119..cd6ead27e0 100644 --- a/modules/slotmem/mod_slotmem_shm.c +++ b/modules/slotmem/mod_slotmem_shm.c @@ -24,6 +24,7 @@ #include "ap_slotmem.h" #include "httpd.h" +#include "http_main.h" #ifdef AP_NEED_SET_MUTEX_PERMS #include "unixd.h" #endif @@ -571,6 +572,10 @@ static apr_status_t slotmem_grab(ap_slotmem_instance_t *slot, unsigned int *id) } } if (i >= slot->desc.num) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02293) + "slotmem(%s) grab failed. Num %u/num_free %u", + slot->name, slotmem_num_slots(slot), + slotmem_num_free_slots(slot)); return APR_EINVAL; } *inuse = 1; @@ -591,6 +596,10 @@ static apr_status_t slotmem_release(ap_slotmem_instance_t *slot, inuse = slot->inuse; if (id >= slot->desc.num || !inuse[id] ) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02294) + "slotmem(%s) release failed. Num %u/inuse[%u] %d", + slot->name, slotmem_num_slots(slot), + id, (int)inuse[id]); return APR_NOTFOUND; } inuse[id] = 0; -- 2.40.0