You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2014/03/05 14:31:21 UTC
svn commit: r1574476 - in /httpd/httpd/branches/2.4.x: ./ STATUS
modules/slotmem/mod_slotmem_shm.c
Author: jim
Date: Wed Mar 5 13:31:20 2014
New Revision: 1574476
URL: http://svn.apache.org/r1574476
Log:
Merge r1562472, r1561262, r1561923, r1574151 from trunk:
More debugging
More debug messaging... useful for tracking down
if we used attach or create
c89 fix
follow-up to r1562472, 1561262, and 1561923:
Improve messaging...
* easier to tell what went wrong in some cases
* reduce number of debug messages without losing information in some cases
Submitted by: jim, covener, trawick
Reviewed/backported by: jim
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1561262,1561923,1562472,1574151
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1574476&r1=1574475&r2=1574476&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed Mar 5 13:31:20 2014
@@ -98,13 +98,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_slotmem_shm: debugging help
- trunk patch: http://svn.apache.org/r1562472
- http://svn.apache.org/r1561262
- http://svn.apache.org/r1561923
- http://svn.apache.org/r1574151
- 2.4.x patch: trunk works mod/ next_number
- +1: jim, ylavic, trawick
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
Modified: httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c?rev=1574476&r1=1574475&r2=1574476&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c Wed Mar 5 13:31:20 2014
@@ -354,6 +354,8 @@ static apr_status_t slotmem_create(ap_sl
if (strcmp(next->name, fname) == 0) {
/* we already have it */
*new = next;
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02603)
+ "create found %s in global list", fname);
return APR_SUCCESS;
}
if (!next->next) {
@@ -362,6 +364,8 @@ static apr_status_t slotmem_create(ap_sl
next = next->next;
}
}
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02602)
+ "create didn't find %s in global list", fname);
}
else {
fbased = 0;
@@ -379,15 +383,24 @@ static apr_status_t slotmem_create(ap_sl
rv = APR_EINVAL;
}
if (rv == APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02598)
+ "apr_shm_attach() succeeded");
+
/* check size */
if (apr_shm_size_get(shm) != size) {
apr_shm_detach(shm);
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(02599)
+ "existing shared memory for %s could not be used (failed size check)",
+ fname);
return APR_EINVAL;
}
ptr = (char *)apr_shm_baseaddr_get(shm);
memcpy(&desc, ptr, sizeof(desc));
if (desc.size != item_size || desc.num != item_num) {
apr_shm_detach(shm);
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(02600)
+ "existing shared memory for %s could not be used (failed contents check)",
+ fname);
return APR_EINVAL;
}
ptr += AP_SLOTMEM_OFFSET;
@@ -401,6 +414,11 @@ static apr_status_t slotmem_create(ap_sl
else {
rv = apr_shm_create(&shm, size, NULL, gpool);
}
+ ap_log_error(APLOG_MARK, rv == APR_SUCCESS ? APLOG_DEBUG : APLOG_ERR,
+ rv, ap_server_conf, APLOGNO(02611)
+ "create: apr_shm_create(%s) %s",
+ fname ? fname : "",
+ rv == APR_SUCCESS ? "succeeded" : "failed");
if (rv != APR_SUCCESS) {
return rv;
}