yoavs 2004/06/16 07:38:56 Modified: jk/native2/server/apache2 mod_jk2.c Log: Bugzilla 26231 done. Revision Changes Path 1.83 +20 -5 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c Index: mod_jk2.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- mod_jk2.c 31 Mar 2004 14:22:04 -0000 1.82 +++ mod_jk2.c 16 Jun 2004 14:38:56 -0000 1.83 @@ -628,10 +628,25 @@ proc.pid); } else { - env->l->jkLog(env, env->l, JK_LOG_ERROR, - "jk2_init() Can't find child %d in none of the %d scoreboard slots\n", - proc.pid, workerEnv->maxDaemons); - workerEnv->childId = -2; + /* + * try again several times, there's a + * race condition here where jk2_child_init gets + * called before make_child completes. + */ + int counter = 0; + while (counter++ < 50 && workerEnv->childId == -1) { + env->l->jkLog(env, env->l, JK_LOG_INFO, + "jk2_child_init() child %d not in scoreboard yet, spin %d\n", + proc.pid, counter); + usleep(10); + workerEnv->childId = find_child_by_pid(&proc); + } + if (workerEnv->childId == -1) { + env->l->jkLog(env, env->l, JK_LOG_ERROR, + "jk2_init() Can't find child %d in any of the %d scoreboard slots\n", + proc.pid, max_daemons_limit); + workerEnv->childId = -2; + } } } else {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]