[moving thread into the dev list]

Here's a minimal setup for reproducing the "free to wrong pool XXX not YYY during global destruction" that I experienced. It boils down to loading Storable during startup and using nfreeze() in a script. Loading Storable at startup is OK, and using nfreeze() in a script is OK, but doing both produces the error. The same thing happens with freeze() and dclone() as well (and probably other functions; haven't tested).

LINEUP-1 below reproduces the error but the "free to wrong pool" is not actually written to the error_log. The system dialog "Apache HTTP Server has encountered a problem and need to be closed" (on winXP) appears. Storable is loaded in startup.pl (or as PerlModule in httpd.conf).

LINEUP-2 reproduces the error with both the "free to wrong pool" error message and the system dialog. Storable is loaded indirectly through a PerlLoadModule (not PerlModule) directive in httpd.conf.

I guess both lineups encounter the same problem but you need the second to get the error message.


Also, the error appears in two different contexts. My original problem as well as LINEUP-2 below produces the following during shutdown:


[Tue Jan 13 18:07:11 2004] [notice] Child 2568: Child process is exiting
Free to wrong pool 6d77a8 not 85ae00 during global destruction.
[Tue Jan 13 18:07:17 2004] [notice] Parent: Child process exited successfully.


But during my search for the error I also got the following:

[Mon Jan 12 16:17:11 2004] [notice] Child 3116: Child process is exiting
Free to wrong pool 13bc7a0 not 82d9b0 during global destruction.
[Mon Jan 12 16:17:25 2004] [notice] Parent: Forcing termination of child process 264



-Kurt.




== LINEUP-1 ==

-- httpd.conf (all the mp stuff) --
LoadModule perl_module modules/mod_perl.so
PerlRequire "/apps/Apache2/conf/startup.pl"
#PerlModule Storable

<Location /t>
  SetHandler perl-script
  PerlResponseHandler MyApache::T
</Location>


-- startup.pl -- use Apache2; use Storable;


-- T.pm -- package MyApache::T;

use strict;
use Apache::Const -compile => qw(OK);
use Storable qw(nfreeze);

sub handler {
  my $r = shift;
  my $data;
  nfreeze \$data;
  print "woops";
  return Apache::OK;
}
1;


== LINEUP-2 ==


-- httpd.conf (all the mp stuff) --
LoadModule perl_module modules/mod_perl.so
PerlRequire "/apps/Apache2/conf/startup.pl"
PerlLoadModule MyApache::T_C1

<Location /t>
  SetHandler perl-script
  PerlResponseHandler MyApache::T
</Location>


-- startup.pl -- use Apache2;


-- T.pm -- (same as in LINEUP-1)


-- T_C1.pm -- package MyApache::T_C1;

use strict;
use Storable;
our @APACHE_MODULE_COMMANDS = ();





Kurt George Gjerde wrote:
I'll try and put together a mininal setup reproducing the problem tomorrow.

And to Steve, not I'm not using <Perl> sections.

-Kurt.

Stas Bekman wrote:

Kurt George Gjerde wrote:

Hi,

I'm suddenly getting "Free to wrong pool 12857d8 not 17d8ce0 during global destruction" when stopping the httpd (after requesting a certain "script" of mine; I've narrowed the problem down to a module which I've used for a while without any problems). Anyway, is this something I should worry about or is this a mp2/perl8/win32 problem that will be solved in time?

The script's running fine with no apparent memory leaks (as far as I can see) but the OS suggests to send a bug report to Microsoft every time I stop (or restart) the server (another reason to migrate).

[Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.2]



Yes, it's a known problem on win32. We have several short startup configs that reliable reproduce that problem.
http://marc.theaimsgroup.com/?l=apache-modperl-dev&w=2&r=1&s=free+to+wrong+pool&q=b



The problem is that I'm not running win32 and can't reproduce it on linux. So if you can show us a minimal configuration (httpd.conf/startup.pl/etc) and a script that you can reproduce the problem with it may help a lot.


The issue has to do with threads. Purhaps you are using some XS module which wasn't fixed to work with perl threads. For example GTop was such a module untill recently, I've fixed its main interface to work under ithreads, but still need to fix a few other interfaces to make it clean.

__________________________________________________________________
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




-- Kurt George Gjerde [EMAIL PROTECTED] ICQ:156792385


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to