Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 36286 invoked from network); 25 Apr 2007 07:54:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Apr 2007 07:54:33 -0000 Received: (qmail 69789 invoked by uid 500); 25 Apr 2007 07:54:35 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 69745 invoked by uid 500); 25 Apr 2007 07:54:35 -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 69734 invoked by uid 99); 25 Apr 2007 07:54:35 -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 00:54:35 -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.231 as permitted sender) Received: from [64.233.162.231] (HELO nz-out-0506.google.com) (64.233.162.231) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 00:54:28 -0700 Received: by nz-out-0506.google.com with SMTP id x7so185521nzc for ; Wed, 25 Apr 2007 00:54:07 -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=gSR4kNe7Ptjtwnsg7B0S39+d9Bi7efVcADo53wGGKQCx+B0/ERmNdzC9FLaSFnKa4DKaFsWYkaguzo77XW92DL/Cyug0X1Vs6Cf8cONzLfk/l9C3NaPGYkX3kQKtHgItIGI10Q79ZzevufIpKIyU+MmGdlUdIGPdMcicCR4+uBU= 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=eJtgaXwMKv72YALibkS9Y9/c9fdnQgSd0KNNHgxVey0WXvvS98K8s47Gw2QEC0+Kr9AFSYgRsPSYK5W+JPKhR166Ujijf/Uf/rmD9IP4RkTrPDUsAF0HLdbEIctUMKiG0SfIT9WVZflOjtdQ6xsj/9avzRW2QPdqm5zrVb2LpL0= Received: by 10.114.110.1 with SMTP id i1mr129147wac.1177487646897; Wed, 25 Apr 2007 00:54:06 -0700 (PDT) Received: by 10.115.72.15 with HTTP; Wed, 25 Apr 2007 00:54:06 -0700 (PDT) Message-ID: <6291fc850704250054vea40c1fp886aef3a1c0a7f1@mail.gmail.com> Date: Wed, 25 Apr 2007 09:54:06 +0200 From: "Henri Gomez" To: "Tomcat Developers List" Subject: Re: More on i5/OS and some modifications needed In-Reply-To: <6291fc850704240645v7f83d488w3cb8b475fa329afb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3iGbeK7K29xXqpTGf302BA6QWrBhemCTbwRoOY5aUrS@akmail> <6291fc850704240201m6e076c9chdb849efd36e8d9ba@mail.gmail.com> <462DCFCF.2040405@kippdata.de> <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> X-Virus-Checked: Checked by ClamAV on apache.org 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 ? 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