It works ! great.
Could I commit ?
Also find a way to fix for i5/OS the HTTP 500 problem
2007/4/24, Henri Gomez <[EMAIL PROTECTED]>:
You remove completly the apr_pool_cleanup_register(p, conf->log, jklog_cleanup,
jklog_cleanup) ?
2007/4/24, Rainer Jung <[EMAIL PROTECTED]>:
> 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 <[EMAIL PROTECTED]>:
> >> 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: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]