You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Fred Moyer <fr...@redhotpenguin.com> on 2012/03/16 21:02:42 UTC

Any other additions for 2.0.6 rc3?

I'm planning on rolling more release candidates this weekend.  SizeLimit, Reload, and 2.0.6 rc3.  Any other additions I need to wait for? 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Exceptions in APR::Pool cleanups

Posted by Torsten Förtsch <to...@gmx.net>.
On Monday, 19 March 2012 08:32:41 Vick Khera wrote:
> > After a bit odf thinking about it I tend to forbid pool cleanups (and 
> > PerlCleanupHandlers) to die. If they do we can:
...
> > 2) stringify it and write it to STDERR
> >
> > 3) gather it in a special hash, e.g. @APR::Pool::cleanup_exceptions
> 
> I concur with your thinking.  Option 3 would probably be most useful, though
> 2 has an appeal as well.

Thanks for the reply. I have just committed revision 1302389 which implements 
option 2.

I decided against 3 after I explained the problem to my wife which is often 
useful to clear my mind. The point is, what would the calling program do with 
@APR::Pool::cleanup_exceptions? Suppose you have a pool with 10 cleanups. Now 
you call $p->destroy. One of the cleanups dies. Which one? In general the 
calling program cannot do anything useful with the information other than log 
it somewhere. If a cleanup expects burps from its guts it should deal with 
them itself.

Anyway, the way it is done now allows to catch these exceptions as warnings by 
means of $SIG{__WARN__}.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Exceptions in APR::Pool cleanups

Posted by Vick Khera <kh...@kcilink.com>.
On Mar 18, 2012, at 9:41 AM, Torsten Förtsch wrote:

> After a bit odf thinking about it I tend to forbid pool cleanups (and 
> PerlCleanupHandlers) to die. If they do we can:
> 
> 1) completely ignore the exception
> 
> 2) stringify it and write it to STDERR
> 
> 3) gather it in a special hash, e.g. @APR::Pool::cleanup_exceptions

I concur with your thinking.  Option 3 would probably be most useful, though 2 has an appeal as well.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Exceptions in APR::Pool cleanups

Posted by Torsten Förtsch <to...@gmx.net>.
On Saturday, 17 March 2012 11:03:32 Torsten Förtsch wrote:
> Further, I'd like to implement tests for C<die $string> and 
> C<die $reference> in a pool cleanup

This is a request for comment. So please comment!

Should we really allow pool cleanups to throw exceptions?

Assuming I have a pool with 2 registered cleanups. One dies. Should the other 
be called if the first one dies?

If yes, what should the value of $@ be if the second one also dies? If the 
second one does not die should $@ be cleared?

After a bit odf thinking about it I tend to forbid pool cleanups (and 
PerlCleanupHandlers) to die. If they do we can:

1) completely ignore the exception

2) stringify it and write it to STDERR

3) gather it in a special hash, e.g. @APR::Pool::cleanup_exceptions

Anyway, the current code in trunk is wrong. No matter if we rethrow the 
exception as is or a stringified version of it, we must not leave 
mpxs_cleanup_run() via longjmp() due to the way apr_pool_destroy() is 
implemented:

APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool)
{
...
    /* Run cleanups */
    run_cleanups(&pool->cleanups);

...

    /* Remove the pool from the parents child list */
    if (pool->parent) {
...
        if ((*pool->ref = pool->sibling) != NULL)
            pool->sibling->ref = pool->ref;
...

At first, all cleanups are run. Only then the pool being destroyed is 
disconnected from it parent. So, if we leave one of the cleanups via non-local 
goto we get partly destroyed pool still connected to its parent. Now, when the 
parent is destroyed it will destroy the partly destroyed one again.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Any other additions for 2.0.6 rc3?

Posted by Torsten Förtsch <to...@gmx.net>.
On Saturday, 17 March 2012 07:36:45 Fred Moyer wrote:
> Cool I'll roll the Apache::* rc's first and wait a few more days on 2.0.6
> rc3

Fred, I am done.

The pool cleanup exception stuff turned out to be a real bug.

As for the null pointer in dconf->sec_file, I couldn't figure out how it can 
happen with httpd 2.2. But since this is common with httpd 2.4 and we have to 
deal with it anyway I see no harm to adopt those changes now.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Any other additions for 2.0.6 rc3?

Posted by Fred Moyer <fr...@redhotpenguin.com>.
Cool I'll roll the Apache::* rc's first and wait a few more days on 2.0.6 rc3  

On Saturday, March 17, 2012 at 3:03 AM, Torsten Förtsch wrote:

> On Friday, 16 March 2012 13:02:42 Fred Moyer wrote:
> > I'm planning on rolling more release candidates this weekend. SizeLimit,
> > Reload, and 2.0.6 rc3. Any other additions I need to wait for?
> >  
>  
>  
>  
> I am going to commit the remaining 2 Perl_croak bits reported by Niko Tyni  
> this weekend. Further, I'd like to implement tests for C<die $string> and  
> C<die $reference> in a pool cleanup and a PerlCleanupHandler.
>  
> Then there is this simple case reported by Alexander.Elgert@t-systems.com (mailto:Alexander.Elgert@t-systems.com) on  
> 22.02.2012 titled "mod_perl-2.0.5 -- nullpointer patch". It is a reasonable  
> precaution measure, although I hadn't had the time yet to investigate how it  
> could happen.
>  
> These were my plans for the weekend. I don't care if any of these do make it  
> into 2.0.6. I leave that to you to decide.
>  
> If anyone wants to commit the nullpointer thing please have a look at  
> modperl_pcw.c in the httpd24 branch. I think we can simply use that file.  
> However, it would be good to know why the code got there with NULL in
> dconf->sec_file.
>  
> Torsten Förtsch
>  
> --  
> Need professional modperl support? Hire me! (http://foertsch.name)
>  
> Like fantasy? http://kabatinte.net  



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Any other additions for 2.0.6 rc3?

Posted by Torsten Förtsch <to...@gmx.net>.
On Friday, 16 March 2012 13:02:42 Fred Moyer wrote:
> I'm planning on rolling more release candidates this weekend.  SizeLimit,
> Reload, and 2.0.6 rc3.  Any other additions I need to wait for?

I am going to commit the remaining 2 Perl_croak bits reported by Niko Tyni 
this weekend. Further, I'd like to implement tests for C<die $string> and 
C<die $reference> in a pool cleanup and a PerlCleanupHandler.

Then there is this simple case reported by Alexander.Elgert@t-systems.com on 
22.02.2012 titled "mod_perl-2.0.5 -- nullpointer patch". It is a reasonable 
precaution measure, although I hadn't had the time yet to investigate how it 
could happen.

These were my plans for the weekend. I don't care if any of these do make it 
into 2.0.6. I leave that to you to decide.

If anyone wants to commit the nullpointer thing please have a look at 
modperl_pcw.c in the httpd24 branch. I think we can simply use that file. 
However, it would be good to know why the code got there with NULL in
dconf->sec_file.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org