[the patch to add this new test is inlined at the end of this post]
t/TEST hooks/cleanup3
consistently segfaults as apr_pool_clear seem to be unable to handle slow cleanup handlers. If someone can look into this issue, it'll help a lot, since apr-dev seems to be either dead or non-caring,
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23238
Looks like it's on us to find and fix that bug :(
if this problem is not fixed, crucial cleanup handlers might fail to be completed, with obvious consequences.
#0 allocator_free (allocator=0x885acc0, node=0x0) at apr_pools.c:361
361 next = node->next;
(gdb) where
#0 allocator_free (allocator=0x885acc0, node=0x0) at apr_pools.c:361
#1 0x402675f4 in apr_pool_clear (pool=0x8aa7f58) at apr_pools.c:738
#2 0x080c1629 in child_main (child_num_arg=142978240) at prefork.c:613
#3 0x080c1901 in make_child (s=0x811ca60, slot=0) at prefork.c:788
#4 0x080c197e in startup_children (number_to_start=1) at prefork.c:806
#5 0x080c1fed in ap_mpm_run (_pconf=0x8117a78, plog=0x815db90, s=0x0)
at prefork.c:1022
#6 0x080c737a in main (argc=7, argv=0xbffff3a4) at main.c:660
#7 0x4034dc57 in __libc_start_main () from /lib/i686/libc.so.6--- /dev/null 1969-12-31 16:00:00.000000000 -0800 +++ t/hooks/cleanup3.t 2003-09-18 01:28:15.000000000 -0700 @@ -0,0 +1,11 @@ +use strict; +use warnings FATAL => 'all'; + +use Apache::TestRequest; +use Apache::TestTrace; + +#warning "Note: This test will take 25 seconds to run"; + +my $location = "/TestHooks__cleanup3"; +print GET_BODY_ASSERT $location; +
--- /dev/null 1969-12-31 16:00:00.000000000 -0800
+++ t/hooks/TestHooks/cleanup3.pm 2003-09-22 17:01:04.000000000 -0700
@@ -0,0 +1,47 @@
+package TestHooks::cleanup3;
+
+# all this test does, is installing a very slow cleanup handler, if it
+# happens to run while httpd tries to shutdown itself, we get a
+# segfault in the apr pool managing code (not modperl). However it's
+# hard to arrange for this test to be a part of the main test suite. it
+# should probably be in a separate test-suite with having only this
+# test and probably should add a real client side which will print a
+# message: this test is supposed to take about X seconds, where X is
+# the time the cleanup sleeps for
+
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::RequestRec ();
+use Apache::RequestIO ();
+
+use Apache::Test;
+
+use Apache::Const -compile => qw(OK);
+
+sub handler {
+ my $r = shift;
+
+ plan $r, tests => 1;
+
+ ok 1;
+
+ # XXX: this triggers a segfault if run alone/last
+ $r->push_handlers(PerlCleanupHandler => \&cleanup);
+
+ return Apache::OK;
+}
+
+sub cleanup {
+ sleep 25; # emulate a lengthy job
+ return Apache::OK;
+}
+
+1;
+__DATA__
+<NoAutoConfig>
+ <Location /TestHooks__cleanup3>
+ SetHandler modperl
+ PerlResponseHandler TestHooks::cleanup3
+ </Location>
+</NoAutoConfig>__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
