Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 29724 invoked from network); 24 Apr 2007 13:34:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 13:34:08 -0000 Received: (qmail 88882 invoked by uid 500); 24 Apr 2007 13:34:11 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 88844 invoked by uid 500); 24 Apr 2007 13:34:10 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 88833 invoked by uid 99); 24 Apr 2007 13:34:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 06:34:10 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [195.227.30.246] (HELO datura.kippdata.de) (195.227.30.246) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 06:34:03 -0700 Received: from [217.19.179.62] (179-62.access.witcom.de [217.19.179.62] (may be forged)) by datura.kippdata.de (8.13.5/8.13.5) with ESMTP id l3ODXgSc019756 for ; Tue, 24 Apr 2007 15:33:42 +0200 (CEST) Message-ID: <462E0727.9010402@kippdata.de> Date: Tue, 24 Apr 2007 15:33:27 +0200 From: Rainer Jung User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: More on i5/OS and some modifications needed References: <3iGbeK7K29xXqpTGf302BA6QWrBhemCTbwRoOY5aUrS@akmail> <6291fc850704230744n677f6e83i37d87d6aeab4b4a7@mail.gmail.com> <6291fc850704231508o7b5bd5eaofb4942ceec3a48e8@mail.gmail.com> <6291fc850704240201m6e076c9chdb849efd36e8d9ba@mail.gmail.com> <462DCFCF.2040405@kippdata.de> <6291fc850704240321y70a6651bo31c6b10b1e7395d2@mail.gmail.com> <6291fc850704240537h33f6b619yf9964a4101caefcd@mail.gmail.com> <462E0258.4080406@kippdata.de> <6291fc850704240615s6b0d9093xccc287e176aa87fd@mail.gmail.com> In-Reply-To: <6291fc850704240615s6b0d9093xccc287e176aa87fd@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Great. I think I now understand the problem. Could you try this one relativ to your last change: Index: mod_jk.c =================================================================== --- mod_jk.c (revision 531926) +++ mod_jk.c (working copy) @@ -2539,11 +2539,7 @@ static apr_status_t jklog_cleanup(void *d) { - /* set the main_log to NULL */ -#ifdef AS400 - main_log = null; -#endif - + /* set the log to NULL */ d = NULL; return APR_SUCCESS; } @@ -2616,9 +2612,10 @@ jkl->logger_private = flp; flp->jklogfp = conf->jklogfp; conf->log = jkl; - if (main_log == NULL) + if (main_log == NULL) { main_log = conf->log; - apr_pool_cleanup_register(p, conf->log, jklog_cleanup, jklog_cleanup); + apr_pool_cleanup_register(p, main_log, jklog_cleanup, jklog_cleanup); + } return 0; } The point is: when I added full virtual server support for all configs I changed the cleanup function to NULL the virtual server logger. It NULLed main_log before. But the only reason it should NULL a logger was the check for NULL in if (main_log == NULL) main_log = conf->log; So if main_log is set once, it never gets reset. This is bad, if the pool from which it got acquired is dead. So we actually need to register the log cleanup only for main_log, because otherwise main_log will always reference an outdated logger. conf->log will be overwritten during each init, no need to reset those. At least that's my theory for it. Could you test this patch? Regards, Rainer Henri Gomez schrieb: > I made it works by adding main_log = NULL in jklog_cleanup > > static apr_status_t jklog_cleanup(void *d) > { > /* set the main_log to NULL */ > d = NULL; > main_log = NULL; > return APR_SUCCESS; > } > > Don't forget that jk is initialized twice and on i5/OS in the same > thread, so may be the static var should be reset. > > What do you think of the patch ? > > > 2007/4/24, Rainer Jung : >> main_log is a static in mod_jk.c, which is initialized as NULL. >> >> It gets set inside open_jklog() which gets called once for every virtual >> server by jk_post_config() during server initialization. >> >> The first virtual server inherits its logger conf->log from its >> configuration to main_log. It also registers a cleanup handler which >> will NULL its conf->log, but that should not change main_log. >> >> main_log should never get reset. >> >> To find the problem, it would be best to first reduce the apache config >> to not use any virtual servers. >> >> You can log the value of main_log for debug purposes anywhere in >> mod_jk.c, because its a global static. >> >> Regards, >> >> Rainer >> >> Henri Gomez schrieb: >> > I'm looking for the exception in jk_log. It happen in ws_write right >> > now and I wonder what's the life cycle of main_log. >> > >> > On i5/OS, the init / post are done on the same thread (not the same on >> > Unixes). >> > >> > How is reset the main_log ? >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: dev-help@tomcat.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org