Perl Error Free To Wrong Pool
work or back home? Try the new Code-Maven Open Source podcast. threads Posted on 2006-07-18 21:52:45-07 by dmb In the last posting I overlooked the last message which is probably the cause of the crash. The message was: Free to wrong pool 23856c8 not 222c80 during global destruction. Is there a way of avoiding this problem? Posted on 2006-07-18 23:04:15-07 by jdhedden in response to 2642 1. You need to ensure you're using the lastest version of the 'threads' module from CPAN. 2. Not all modules are thread-safe, especially modules that use XS code. Therefore, whatever module you're getting the ->Documents method from may be at fault. Posted on 2006-07-18 23:59:28-07 by dmb in response to 2643 1) I just downloaded the threads module from CPAN (associated with your name) a few days ago. Is ther a way to confirm that I have the correct one? 2) I understand that other non-Perl modules may not be thread-safe. By the time I get to the logic that is executed by the threads I no longer need the parent context where the 'Documents' and other strings were referenced. Is there a way to isolate the prior context (or quiesce it) before initiating the execution of the threaded logic? For instance is there a practical way of dividing the processing up into two steps in Perl so that the step 1 context is discarded before starting the multi-threaded step? Posted on 2006-07-19 13:50:39-07 by jdhedden in response to 2644 You can get the version number using: perl -Mthreads -e 'print "$threads::VERSION\n"' As of this posting, the lastest version is 1.36. To keep non-thread-safe modules out of threads, you can create the threads in a BEGIN block before including the non-thread-safe modules, and then feed data to the threads using queues: use threads; use Thread::Queue; # Thread function that gets data via a queue # (NOTE: Must be coded up before the BEGIN block.) sub thr_func { my $que = shift; # Wait for data my $data = $que->dequeue(); # Do work on $data ... } # Create threads and queues # (NOTE: Threads must be created in a BEGIN block before # 'use'ing any non-thread-safe modules.) my %threads; BEGIN { for (1..5) { my $que = Thread::Queue->new(); my $thr = threads->create('thr_func', $que); $thread
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Free to wrong pool http://perlmaven.com/threads-free-to-wrong-pool 2608aa8 not 6d3fe8 at test.pl up vote 0 down vote favorite Following is my code: sub test_ms { my $coderef1 = shift; my $coderef2 = shift; if (fork() == 0) { &$coderef1; exit; } &$coderef2; } When I am running this, I am getting the error as Free to wrong pool 2608aa8 not 6d3fe8 at test.pl Why am I getting this error? windows perl fork share|improve http://stackoverflow.com/questions/28581600/free-to-wrong-pool-2608aa8-not-6d3fe8-at-test-pl this question edited Feb 18 '15 at 11:31 Сухой27 43.2k33977 asked Feb 18 '15 at 10:43 Mayank 86110 What are you passing in to your subroutine? –Sobrique Feb 18 '15 at 10:52 1 Try upgrading your perl to a newer version. –Сухой27 Feb 18 '15 at 10:52 My perl version is 5.14. –Mayank Feb 18 '15 at 11:15 I am passing this: my $coderef1 = sub { $Excel->Run('login') }; –Mayank Feb 18 '15 at 11:15 Are you using Windows? Because using fork on Windows will not work as expected. –Chankey Pathak Feb 18 '15 at 11:26 | show 1 more comment 2 Answers 2 active oldest votes up vote 2 down vote perlfork says On Windows fork() system call is not available That's why it's not working as expected for you. Try using Win32::Process::Create. See: What is the difference between Windows fork and Unix fork? A Great little summary of issues with fork on Windows Mr. Peabody Explains fork() share|improve this answer edited Feb 18 '15 at 11:40 answered Feb 18 '15 at 11:30 Chankey Pathak 11.5k73881 add a comment| up vote 0 down vot
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring http://stackoverflow.com/questions/2156286/what-is-the-cause-for-panic-free-from-wrong-pool-during-global-destruction-i developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join https://rt.perl.org/Ticket/Display.html?id=126240 them; it only takes a minute: Sign up What is the cause for “panic: free from wrong pool during global destruction.” in Term::ReadLine::Gnu? up vote 13 down vote favorite 2 in https://rt.cpan.org/Ticket/Display.html?id=37194#txn-641389 I reopened a bug concerning a Perl perl error crash in conjunction with the libreadline XS bindings. I attached the necessary debug information, but until now there has been no acknowledgement from the maintainer. I want this finally fixed; it's a major inconvenience to not have readline in Devel::REPL and the Perl debugger. My Perl guts and C夫 is nearly non-existent, so I can't do the usual thing and produce a patch on my own. So I would like to employ your help; more eyeballs ↔ shallow bugs perl error free and all that. My questions to you: Can you reproduce this crash despite -DPERL_USE_SAFE_PUTENV? If yes, let's compare what is the common factor. Do you know what is the cause and how do you go about finding it? I have a debugging perl and know how to use gdb, but where do I have to set a breakpoint to observe the crash properly? perl crash gdb share|improve this question edited Mar 8 '10 at 0:33 Svante 31.9k548102 asked Jan 28 '10 at 16:55 daxim 33.9k44198 Do I have a way to access the debug information without having to sign up for an account on rt.cpan.org? I'd love to look at it but hate having to register for things. –Chris Jester-Young Feb 5 '10 at 16:05 Viewing tickets and attachments are publicly accessible. –daxim Feb 8 '10 at 0:50 I see. (Apparently it required cookies; my default policy was cookies disabled, and requesting attachments caused me to be sent to a login page instead. :-P) –Chris Jester-Young Feb 8 '10 at 3:35 You get that error when you cause Armageddon and clean the wrong gene pool. –Trevoke Feb 9 '10 at 20:26 Quick q. daxim: is you application multi-threaded, and multithreading at or around the time of the error? –vladr Mar 6 '10 at 4:25 | show 1 more comment 2 Answers 2 active oldest v
Queue: perl5 People Owner: Nobody Requestors: perl [at] profvince.com Cc: dagolden [at] cpan.org AdminCc: Bug Information Operating System: darwin PatchStatus: (no value) Severity: medium Type: core Perl Version: 5.23.4 Fixed In: (no value) Links Depends on : (Create) Depended on by : (Create) Parents : (Create) Children : (Create) Refers to : (Create) Referred to by : (Create) Attachments 0001-perl-126240-use-DPERL_USE_SAFE_PUTENV-where-possible.patch Tue Dec 08 15:38:01 2015 (1.6k) by Tony Cook