New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory corruption with heavy module loading in threads #9008
Comments
From @jdheddenThis is a bug report for perl from jdhedden@cpan.org, There seems to be a memory corruption problem that manifests The attached script readily evokes this bug. It uses Before the get() call, the following modules are loaded (as 'Carp.pm' => '/usr/lib/perl5/5.9.5/Carp.pm', After the get() call, %INC contains: '/usr/lib/perl5/5.9.5/cygwin/auto/Compress/Raw/Zlib/autosplit.ix' => Yowza! So when the attached script is run without args, all When the script is run with an argument, a get() call is As I stated above, the script fails for me more than 80% of Flags: Site configuration information for perl 5.9.5: Configured by Jerry at Wed Aug 29 14:29:01 EDT 2007. Summary of my perl5 (revision 5 version 9 subversion 5 patch 31761) Locally applied patches: @INC for perl 5.9.5: Environment for perl 5.9.5: |
From @jdhedden |
From @jdheddenJerry D. Hedden wrote:
I would consider this bug a showstopper. While the supplied |
From @schwernJerry D. Hedden wrote:
As 5.8.8 cores, too, I would rate this as "no worse than 5.8.8" and thus not a BTW The fireworks with bleadperl sure are pretty... $ bleadperl ~/Downloads/fetch_bug.pl -- |
The RT System itself - Status changed from 'new' to 'open' |
From @jdheddenJerry D. Hedden wrote:
Michael G Schwern wrote:
It may be that the problem is not new to 5.9, but the ease |
From @iabynOn Wed, Sep 05, 2007 at 02:06:25PM -0400, Jerry D. Hedden wrote:
Actually I've reduced the test case to: use threads; threads->create(\&thr_fetch) for 1..20; sub thr_fetch where dummy.pm just contains the single line "1;" This gives a "panic: free from wrong pool". I hope to track down this problem when I get a bit of free time. -- |
From @jdheddenJerry D. Hedden wrote:
Dave Mitchell wrote:
I've reduced it yet again: use threads; threads->create(sub { eval '1' }) for 1..20; So the problems seems to occur when doing string evals.
Sure hope you can get to it before 5.10 goes out. |
From @jbenjoreOn 9/12/07, Jerry D. Hedden <jdhedden@cpan.org> wrote:
What, simultaneous compilation worked in the past?! Which versions? Josh |
From @jdheddenJerry D. Hedden wrote:
Joshua ben Jore wrote:
The above works on 5.8.7 with threads 1.65. It fails with |
From @iabynOn Wed, Sep 12, 2007 at 10:53:36AM -0400, Jerry D. Hedden wrote:
Turns out there are at least two bugs. The one above has been fixed by use threads; sub f { my @t; which fails about 1 in 10 times. It might be associated with creating const -- |
From @jdheddenJerry D. Hedden wrote:
Dave Mitchell wrote:
Any chance of tackling this before the code freeze, Dave? |
From @iabynOn Fri, Sep 14, 2007 at 07:31:22PM +0100, Dave Mitchell wrote:
Now fixed (hopefully) by #32091. -- Change 32091 by davem@davem-pigeon on 2007/10/10 15:03:16 newCONTSUB() wasn't thread-safe ([perl #45053]) Affected files ... ... //depot/perl/ext/threads/t/problems.t#18 edit Differences ... ==== //depot/perl/ext/threads/t/problems.t#18 (text) ==== @@ -29,9 +29,9 @@ $| = 1; @@ -178,4 +178,20 @@ + ==== //depot/perl/op.c#958 (text) ==== @@ -5696,6 +5696,13 @@ ENTER; + if (IN_PERL_RUNTIME) { |
From @jdheddenJerry D. Hedden wrote:
Dave Mitchell wrote:
Dave Mitchell wrote:
Excellent.
I think the test should go in t/op/threads.t because it is a change to |
From @jdheddenChange 31864 was supposed to fix threads crashing bug 45053: http://www.mail-archive.com/perl5-changes@perl.org/msg18477.html However, some residual crashing remains. The attached script is the test added by 31864 to for (( ii=0; $ii < 100; ii++ )); do echo $ii; ./crash.pl; done Occassionally, it outputs: Bad free() ignored (PERL_CORE) during global destruction. (I cannot reproduce these failures in the latest 5.8.x.) |
From @jdhedden
This bug occurs on my home PC that has 4GB of RAM, but not on my work Can anyone else even reproduce it? |
From nospam-abuse@bloodgate.comOn Saturday 23 February 2008 00:26:12 Jerry D. Hedden wrote:
It doesn't crash here, 64Bit Ubuntu with 4Gbyte of memory: Just for testing I replaced the "100" with "10000" and it took quite a Btw, using "2000", my system takes # time perl crash.pl real 0m30.602s this seems an aweful long time for creating/joining/destroying 2000 ############################################################ use strict; { # EOF This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License Complete documentation for Perl, including FAQ lists, should be found on te@te:~$ cat /proc/meminfo best wishes, Tels -- This email violates U.S. patent #5,546,528 and EU patent ________________________________________ ~ ~ |
From p5p@spam.wizbit.beOn Sun Feb 03 08:57:50 2008, jdhedden@cpan.org wrote:
I believe this was also fixed with change 32091. http://public.activestate.com/cgi-bin/perlbrowse/p/32091 newCONTSUB() wasn't thread-safe ([perl #45053]) perl-p-5.9.5\@32090/perl test_45053_c.pl perl-p-5.9.5\@32091/perl test_45053_c.pl (Also ran the script in a 1..100 loop - no output there either) |
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#45053 (status was 'resolved')
Searchable as RT45053$
The text was updated successfully, but these errors were encountered: