You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Kurt George Gjerde <ku...@intermedia.uib.no> on 2004/01/13 18:22:41 UTC

Re: [mp2] free to wrong pool (win32)

[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:stas@stason.org http://use.perl.org http://apacheweek.com
>> http://modperlbook.org http://apache.org   http://ticketmaster.com
>>
>>
> 

-- 
Kurt George Gjerde
kurt.gjerde@intermedia.uib.no
ICQ:156792385


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


Re: [mp2] free to wrong pool (win32)

Posted by Kurt George Gjerde <ku...@intermedia.uib.no>.
Stas Bekman wrote:

> Stas Bekman wrote:
>> Steve Hay wrote:
>>> However, the new t/threads.t file isn't in that package.
>> oops, I forgot to update MANIFEST.
> 
> But it was one of the Kurt's tests, so it should be OK. I'll post a new 
> package as soon as I finish messing with it.

Great! That was fast. Now I need to start compiling my own stuff :)
(or I'll have to wait for 5.8.4 + ActiveState).

> Jan said that the 're' package should have similar problems, so if you 
> can try to write an "exploit" in a similar fashion, that would be useful.

Had a quick try at this one but was unable to make it break. I'll do 
some more tests later.

I have a DBI "free to wrong pool" though, but I'll post it in a new thread.


-Kurt.

-- 
Kurt George Gjerde
kurt.gjerde@intermedia.uib.no
ICQ:156792385

InterMedia - New Media / Net Based Learning
University of Bergen, Norway

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


Re: [mp2] free to wrong pool (win32)

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Steve Hay wrote:

>> However, the new t/threads.t file isn't in that package.
> 
> oops, I forgot to update MANIFEST.

But it was one of the Kurt's tests, so it should be OK. I'll post a new 
package as soon as I finish messing with it.

Jan said that the 're' package should have similar problems, so if you can try 
to write an "exploit" in a similar fashion, that would be useful.

Thanks.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Re: [mp2] free to wrong pool (win32)

Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Stas Bekman wrote:
> 
> 
>>Stas Bekman wrote:
>> 
>>
>>
>>>Steve Hay wrote:
>>>
>>>   
>>>
>>>
>>>>Kurt George Gjerde wrote:
>>>>     
>>>>
>>>
>>>[...]
>>>
>>>   
>>>
>>>
>>>>>Sorry. But yes, the following two scripts reproduces the error.
>>>>>       
>>>>>
>>>
>>>Thanks, Kurt. They don't segfault for me on linux. So I may need to try 
>>>to adjust your test.
>>>
>>>   
>>>
>>>
>>>>They both fail for me too.  Only the first one gives the "free to pool 
>>>>during global destruction" error, but both give program error popup 
>>>>windows.  Stack traces below from 5.8.3-RC1.  (They're both the same, 
>>>>I think.)
>>>>     
>>>>
>>>
>>>Kurt and Steve, no problem, I'll try to fix it and send the patches to 
>>>p5p. I've talked to Nick and he said that the fixes won't enter 5.8.3 no 
>>>matter what. But they will be available on CPAN (since Storable has a 
>>>dual life). First I want to finish the batch of mp2 docs generation. 
>>>There is a way too many functions. Then I need to handle A-T autoconfig 
>>>problems and next I'll work on this issue.
>>>   
>>>
>>
>>I wasn't able to reproduce it on linux, but please try this new version:
>>http://apache.org/~stas/Storable-2.10.tar.gz
>>
>>I've added a new test t/threads.t which contains one of the "exploits" Kurt 
>>has posted, plus added a call to init_perinterp from a newly added CLONE 
>>function, which hopefully fixes the problem.
>>
> 
> Yes, it does appear to fix the problems -- both the test scripts that 
> Kurt put together now run without error for me.

Great. Thanks for testing, Steve.

> However, the new t/threads.t file isn't in that package.

oops, I forgot to update MANIFEST.

> If only fixing mp2 was that easy...

If only I could reproduce the segfaults you reported on mp2. I have some ideas 
of the possible culprits, all related to CLONE.

As I'm still unable to write a test for Storable that will make it fail under 
linux I'm digging into the XS, trying to make it to.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Re: [mp2] free to wrong pool (win32)

Posted by Steve Hay <st...@uk.radan.com>.
Stas Bekman wrote:

>Stas Bekman wrote:
>  
>
>>Steve Hay wrote:
>>
>>    
>>
>>>Kurt George Gjerde wrote:
>>>      
>>>
>>[...]
>>
>>    
>>
>>>>Sorry. But yes, the following two scripts reproduces the error.
>>>>        
>>>>
>>Thanks, Kurt. They don't segfault for me on linux. So I may need to try 
>>to adjust your test.
>>
>>    
>>
>>>They both fail for me too.  Only the first one gives the "free to pool 
>>>during global destruction" error, but both give program error popup 
>>>windows.  Stack traces below from 5.8.3-RC1.  (They're both the same, 
>>>I think.)
>>>      
>>>
>>Kurt and Steve, no problem, I'll try to fix it and send the patches to 
>>p5p. I've talked to Nick and he said that the fixes won't enter 5.8.3 no 
>>matter what. But they will be available on CPAN (since Storable has a 
>>dual life). First I want to finish the batch of mp2 docs generation. 
>>There is a way too many functions. Then I need to handle A-T autoconfig 
>>problems and next I'll work on this issue.
>>    
>>
>
>I wasn't able to reproduce it on linux, but please try this new version:
>http://apache.org/~stas/Storable-2.10.tar.gz
>
>I've added a new test t/threads.t which contains one of the "exploits" Kurt 
>has posted, plus added a call to init_perinterp from a newly added CLONE 
>function, which hopefully fixes the problem.
>
Yes, it does appear to fix the problems -- both the test scripts that 
Kurt put together now run without error for me.

However, the new t/threads.t file isn't in that package.

If only fixing mp2 was that easy...

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


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


Re: [mp2] free to wrong pool (win32)

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Steve Hay wrote:
> 
>> Kurt George Gjerde wrote:
> 
> [...]
> 
>>> Sorry. But yes, the following two scripts reproduces the error.
> 
> 
> Thanks, Kurt. They don't segfault for me on linux. So I may need to try 
> to adjust your test.
> 
>> They both fail for me too.  Only the first one gives the "free to pool 
>> during global destruction" error, but both give program error popup 
>> windows.  Stack traces below from 5.8.3-RC1.  (They're both the same, 
>> I think.)
> 
> 
> Kurt and Steve, no problem, I'll try to fix it and send the patches to 
> p5p. I've talked to Nick and he said that the fixes won't enter 5.8.3 no 
> matter what. But they will be available on CPAN (since Storable has a 
> dual life). First I want to finish the batch of mp2 docs generation. 
> There is a way too many functions. Then I need to handle A-T autoconfig 
> problems and next I'll work on this issue.

I wasn't able to reproduce it on linux, but please try this new version:
http://apache.org/~stas/Storable-2.10.tar.gz

I've added a new test t/threads.t which contains one of the "exploits" Kurt 
has posted, plus added a call to init_perinterp from a newly added CLONE 
function, which hopefully fixes the problem.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Re: [mp2] free to wrong pool (win32)

Posted by Elizabeth Mattijsen <li...@dijkmat.nl>.
At 09:58 -0800 1/14/04, Stas Bekman wrote:
>Steve Hay wrote:
>>Kurt George Gjerde wrote:
>>>Sorry. But yes, the following two scripts reproduces the error.
>Thanks, Kurt. They don't segfault for me on linux. So I may need to 
>try to adjust your test.

They don't crash on Mac OS X either...


Liz

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


Re: [mp2] free to wrong pool (win32)

Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Kurt George Gjerde wrote:
[...]

>>Sorry. But yes, the following two scripts reproduces 
>>the error.

Thanks, Kurt. They don't segfault for me on linux. So I may need to try to 
adjust your test.

> They both fail for me too.  Only the first one gives the "free to pool 
> during global destruction" error, but both give program error popup 
> windows.  Stack traces below from 5.8.3-RC1.  (They're both the same, I 
> think.)

Kurt and Steve, no problem, I'll try to fix it and send the patches to p5p. 
I've talked to Nick and he said that the fixes won't enter 5.8.3 no matter 
what. But they will be available on CPAN (since Storable has a dual life). 
First I want to finish the batch of mp2 docs generation. There is a way too 
many functions. Then I need to handle A-T autoconfig problems and next I'll 
work on this issue.



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Re: [mp2] free to wrong pool (win32)

Posted by Steve Hay <st...@uk.radan.com>.
Kurt George Gjerde wrote:

>Stas Bekman wrote:
>
>  
>
>>If you can try and fix it that would be great (see Jan's solution). You 
>>should be able to reproduce it outside mod_perl with 'use threads and 
>>starting a thread after using nfreeze'.
>>    
>>
>
>I'm not the right person to try and fix this (lacking both the 
>experience and a C compiler; and it would take me too long to get into 
>XS and all that).
>
I have a C/C++ compiler and some XS knowledge, but I'm out of my depth 
with the threads stuff.  I'm happy to assist in any way I can.

Stas: I looked at Jan's e-mail which you previously cited, but I 
couldn't figure out what I was supposed to do with it.  Do you have a 
patch that I can try out?

>Sorry. But yes, the following two scripts reproduces 
>the error.
>
They both fail for me too.  Only the first one gives the "free to pool 
during global destruction" error, but both give program error popup 
windows.  Stack traces below from 5.8.3-RC1.  (They're both the same, I 
think.)

- Steve

>
>You want me to send this to perl5-porters?
>
>-Kurt.
>
>
>-1-
>   # Perl dies with "free to wrong pool"
>   use threads;
>   use Storable qw(nfreeze);
>
>   my $t = threads->new(\&sub1);
>
>   sleep 1;
>
>   sub sub1 {
>     nfreeze {};
>   }
>
VMem::Free(void * 0x019b1004) line 208 + 3 bytes
CPerlHost::Free(void * 0x019b1004) line 59 + 34 bytes
PerlMemFree(IPerlMem * 0x002224e4, void * 0x019b1004) line 302
Perl_safesysfree(void * 0x019b1004) line 140 + 26 bytes
XS_Storable__Cxt_DESTROY(interpreter * 0x0022411c, cv * 0x018ffc94) line 
5884 + 12 bytes
Perl_pp_entersub(interpreter * 0x0022411c) line 2840 + 16 bytes
S_call_body(interpreter * 0x0022411c, op * 0x0140fc90, int 0) line 2218 
+ 9 bytes
Perl_call_sv(interpreter * 0x0022411c, sv * 0x018ffc94, long 150) line 
2139 + 15 bytes
Perl_sv_clear(interpreter * 0x0022411c, sv * 0x018c2764) line 5102 + 18 
bytes
Perl_sv_free(interpreter * 0x0022411c, sv * 0x018c2764) line 5348 + 13 bytes
do_clean_objs(interpreter * 0x0022411c, sv * 0x018c2770) line 385 + 13 bytes
S_visit(interpreter * 0x0022411c, void (interpreter *, sv *)* 0x280f78f7 
do_clean_objs(interpreter *, sv *)) line 331 + 11 bytes
Perl_sv_clean_objs(interpreter * 0x0022411c) line 424 + 14 bytes
perl_destruct(interpreter * 0x0022411c) line 496 + 9 bytes
RunPerl(int 2, char * * 0x002224b8, char * * 0x00222b48) line 206 + 12 bytes
main(int 2, char * * 0x002224b8, char * * 0x00222b48) line 18 + 18 bytes
PERL! mainCRTStartup + 227 bytes
KERNEL32! 77e814c7()

>
>-2-
>   # Perl dies without "free to wrong pool" (but with an
>   # exception dialog on win32)
>   use threads;
>   use Storable qw(nfreeze);
>
>   my $t = threads->new(\&sub1);
>
>   $t->join();
>
>   sub sub1 {
>     nfreeze {};
>   }
>
VMem::Free(void * 0x019b002c) line 202 + 3 bytes
CPerlHost::Free(void * 0x019b002c) line 59 + 34 bytes
PerlMemFree(IPerlMem * 0x002224e4, void * 0x019b002c) line 302
Perl_safesysfree(void * 0x019b002c) line 140 + 26 bytes
XS_Storable__Cxt_DESTROY(interpreter * 0x0022411c, cv * 0x018ffc94) line 
5884 + 12 bytes
Perl_pp_entersub(interpreter * 0x0022411c) line 2840 + 16 bytes
S_call_body(interpreter * 0x0022411c, op * 0x0140fc90, int 0) line 2218 
+ 9 bytes
Perl_call_sv(interpreter * 0x0022411c, sv * 0x018ffc94, long 150) line 
2139 + 15 bytes
Perl_sv_clear(interpreter * 0x0022411c, sv * 0x018c2764) line 5102 + 18 
bytes
Perl_sv_free(interpreter * 0x0022411c, sv * 0x018c2764) line 5348 + 13 bytes
do_clean_objs(interpreter * 0x0022411c, sv * 0x018c2770) line 385 + 13 bytes
S_visit(interpreter * 0x0022411c, void (interpreter *, sv *)* 0x280f78f7 
do_clean_objs(interpreter *, sv *)) line 331 + 11 bytes
Perl_sv_clean_objs(interpreter * 0x0022411c) line 424 + 14 bytes
perl_destruct(interpreter * 0x0022411c) line 496 + 9 bytes
RunPerl(int 2, char * * 0x002224b8, char * * 0x00222b48) line 206 + 12 bytes
main(int 2, char * * 0x002224b8, char * * 0x00222b48) line 18 + 18 bytes
PERL! mainCRTStartup + 227 bytes
KERNEL32! 77e814c7()




------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


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


Re: [mp2] free to wrong pool (win32)

Posted by Kurt George Gjerde <ku...@intermedia.uib.no>.
Stas Bekman wrote:
>> Kurt, every time I reply to you I get a bounce from your address 
>> [sorry for posting to the list, but I have no other way to tell this 
>> to Kurt]
> I guess it's not Kurt, but someone else, I've asked Ask to remove
> pltt@umich.edu from this list's subscribers.

Yes, I think it's the list. I get the same bounce as well when posting 
to the list.

Might have found another problem yesterday which possibly relates to 
DBI. Under heavy load I got the following:

   Attempt to free unreferenced scalar: SV 0x280bac00 at
   E:/usr/site/lib/DBI.pm line 626.

I'll investigate further today and get back with more.

Thanks,
-Kurt.

-- 
Kurt George Gjerde
kurt.gjerde@intermedia.uib.no
ICQ:156792385

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


Re: [mp2] free to wrong pool (win32)

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Kurt, every time I reply to you I get a bounce from your address [sorry 
> for posting to the list, but I have no other way to tell this to Kurt]

I guess it's not Kurt, but someone else, I've asked Ask to remove
pltt@umich.edu from this list's subscribers.

> Autoresponder wrote:
>  > The Prince Lyrics Transcription Team no longer exists. You will not
>  > receive any response to your E-mail other than this message.
>  >
>  > The PLTT used to be an association of Prince fans from around the world,
>  > working via the Internet be create accurate and complete transcriptions
>  > of the songs written, composed, and produced by Prince Rogers Nelson and
>  > O(+>.
>  >
>  > The PLTT transcribed the lyrics from "For You" to "New Power Soul". 
> These
>  > lyrics are now archived at:
>  >
>  > http://www.rustvold.com/cgi-usr/dlr/getPLTT
>  >
>  > In memoriam of the PLTT and the PLRFC-crew (1989 - 2002)
> 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org


-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Re: [mp2] free to wrong pool (win32)

Posted by Stas Bekman <st...@stason.org>.
Kurt, every time I reply to you I get a bounce from your address [sorry for 
posting to the list, but I have no other way to tell this to Kurt]


Autoresponder wrote:
 > The Prince Lyrics Transcription Team no longer exists. You will not
 > receive any response to your E-mail other than this message.
 >
 > The PLTT used to be an association of Prince fans from around the world,
 > working via the Internet be create accurate and complete transcriptions
 > of the songs written, composed, and produced by Prince Rogers Nelson and
 > O(+>.
 >
 > The PLTT transcribed the lyrics from "For You" to "New Power Soul". These
 > lyrics are now archived at:
 >
 > http://www.rustvold.com/cgi-usr/dlr/getPLTT
 >
 > In memoriam of the PLTT and the PLRFC-crew (1989 - 2002)

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Re: [mp2] free to wrong pool (win32)

Posted by Kurt George Gjerde <ku...@intermedia.uib.no>.
Stas Bekman wrote:

> If you can try and fix it that would be great (see Jan's solution). You 
> should be able to reproduce it outside mod_perl with 'use threads and 
> starting a thread after using nfreeze'.

I'm not the right person to try and fix this (lacking both the 
experience and a C compiler; and it would take me too long to get into 
XS and all that). Sorry. But yes, the following two scripts reproduces 
the error.

You want me to send this to perl5-porters?

-Kurt.


-1-
   # Perl dies with "free to wrong pool"
   use threads;
   use Storable qw(nfreeze);

   my $t = threads->new(\&sub1);

   sleep 1;

   sub sub1 {
     nfreeze {};
   }

-2-
   # Perl dies without "free to wrong pool" (but with an
   # exception dialog on win32)
   use threads;
   use Storable qw(nfreeze);

   my $t = threads->new(\&sub1);

   $t->join();

   sub sub1 {
     nfreeze {};
   }





-- 
Kurt George Gjerde
kurt.gjerde@intermedia.uib.no
ICQ:156792385

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


Re: [mp2] free to wrong pool (win32)

Posted by Stas Bekman <st...@stason.org>.
Kurt George Gjerde wrote:
> [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).

Most likely it's the problem Jan Dubois has mentioned here:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-12/msg00994.html
If you can try and fix it that would be great (see Jan's solution). You should 
be able to reproduce it outside mod_perl with 'use threads and starting a 
thread after using nfreeze'.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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