Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 46533 invoked from network); 25 Apr 2007 08:18:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Apr 2007 08:18:44 -0000 Received: (qmail 15028 invoked by uid 500); 25 Apr 2007 08:18:46 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 14973 invoked by uid 500); 25 Apr 2007 08:18:45 -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 14962 invoked by uid 99); 25 Apr 2007 08:18:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 01:18:45 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of henri.gomez@gmail.com designates 64.233.162.232 as permitted sender) Received: from [64.233.162.232] (HELO nz-out-0506.google.com) (64.233.162.232) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 01:18:38 -0700 Received: by nz-out-0506.google.com with SMTP id x7so192868nzc for ; Wed, 25 Apr 2007 01:18:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MHx0pm9HYp2jKqHtPaXkGGuovbgnamSRnMfRDN190sf7joXvl16JZfdPooZrO/NwzzILz8N6Ecc+4FRtPvGGVvWEONm0Wgl7mJXNDoagXZ8PJ3FsdJ3v9Z0nk92l97+Hq7kGr1LhfebG+JY2/s0jkoF70ZO21G/yGtsHCpTaYmI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gT42b7kVVtNyDcCiWtXQcMtPuO2icf4d45fpWcFA9oo3UuMIo3boCcNANnAYhNBxqJoo/UGZiapTe/D5NvupM0FjbEvVMjLDu8MrFlTY/mNMDFs85bdAvmCeoep3SnDvGsXD61Bb6f0bPM0CqH6RAkLGA6QmZpVDHRIiNQ3UH4g= Received: by 10.115.108.1 with SMTP id k1mr129269wam.1177489097274; Wed, 25 Apr 2007 01:18:17 -0700 (PDT) Received: by 10.115.72.15 with HTTP; Wed, 25 Apr 2007 01:18:17 -0700 (PDT) Message-ID: <6291fc850704250118q4529052vcbee43929ab20085@mail.gmail.com> Date: Wed, 25 Apr 2007 10:18:17 +0200 From: "Henri Gomez" To: "Tomcat Developers List" Subject: Re: More on i5/OS and some modifications needed In-Reply-To: <1177488902.3832.12.camel@jfcpc> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3iGbeK7K29xXqpTGf302BA6QWrBhemCTbwRoOY5aUrS@akmail> <6291fc850704240321y70a6651bo31c6b10b1e7395d2@mail.gmail.com> <6291fc850704240537h33f6b619yf9964a4101caefcd@mail.gmail.com> <462E0258.4080406@kippdata.de> <6291fc850704240615s6b0d9093xccc287e176aa87fd@mail.gmail.com> <462E0727.9010402@kippdata.de> <6291fc850704240641kd868215re791b3bb7cf5c67e@mail.gmail.com> <6291fc850704240645v7f83d488w3cb8b475fa329afb@mail.gmail.com> <6291fc850704250054vea40c1fp886aef3a1c0a7f1@mail.gmail.com> <1177488902.3832.12.camel@jfcpc> X-Virus-Checked: Checked by ClamAV on apache.org Exact. I'll commit a fix asap 2007/4/25, Jean-Frederic : > On Wed, 2007-04-25 at 09:54 +0200, Henri Gomez wrote: > > In jklog_cleanup I could see : > > > > static apr_status_t jklog_cleanup(void *d) > > { > > #ifdef AS400 > > main_log = NULL; > > #endif > > > > d = NULL; > > return APR_SUCCESS; > > } > > > > Shouldn't it be *d = NULL ? > > I think that you should have: > apr_pool_cleanup_register(p, &main_log, jklog_cleanup, jklog_cleanup); > if you want to use *d = NULL; to set main_log to NULL. > > Cheers > > Jean-Frederic > > > > > Also shouldn't we reset main_log and conf->log ? > > > > > > 2007/4/24, Henri Gomez : > > > It works ! great. > > > > > > Could I commit ? > > > > > > Also find a way to fix for i5/OS the HTTP 500 problem > > > > > > 2007/4/24, Henri Gomez : > > > > You remove completly the apr_pool_cleanup_register(p, conf->log, jklog_cleanup, > > > > jklog_cleanup) ? > > > > > > > > 2007/4/24, Rainer Jung : > > > > > 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 > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > 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