httpd-41142
Version:
httpd 2.2.3
How it is diagnosed (reproduced or source analysis)?
source analysis (we didn’t reproduce it).
Symptom:
Hang -- infinite loop
Root cause:
Infinite loop. If mod_dbd in conjunction with apr_dbd_pgsql is in use it
happens, that the 'next' pointer of a node points to the
node itself. This introduces an endless loop consuming 100%
of CPU.
*** ./srclib/apr/memory/unix/apr_pools.c.fcs Sun Dec 10 12:44:28 2006
--- ./srclib/apr/memory/unix/apr_pools.c Sun Dec 10 12:45:52 2006
***************
*** 107,112 ****
--- 107,115 ----
for (index = 0; index < MAX_INDEX; index++) {
ref = &allocator->free[index];
while ((node = *ref) != NULL) {
+ /* jens 2006/12/10 - this should not happen, however it intro-
+ duced endless loops when apr_dbd_pgsql is in use */
+ if( node->next == node) node->next = NULL;
*ref = node->next;
free(node);
}
Is there error msg?
No.
How can Errlog help?
Since once the user noticed the hang, she/he will likely use sigkill to kill the process, Errlog can print an error msg in the sigkill handler (also printing the context) which will be very useful for the diagnosis.