Skip Menu |

This queue is for tickets about the Data-Serializer CPAN distribution.

Report information
The Basics
Id: 39592
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Data-Serializer

People
Owner: neil [...] neely.cx
Requestors: jmartin [...] gsihosting.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Attempt to free .... during global destruction.
Date: Wed, 24 Sep 2008 13:11:04 -0500
To: <bug-Data-Serializer [...] rt.cpan.org>
From: "Martin, Jeremy" <jmartin [...] gsihosting.com>
Starting with Data::Serializer 0.48 an existing script now scrolls error messages like these for a very long time. Not sure if it will ever stop, I aborted the script after over 3 million lines were printed out. Reverting to Data::Serializer 0.46 seems to fix this. (Didn't try 0.47 since 0.48 came out only a day later) Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string '(Zú*' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string '(Zú*' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string 'Ð' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string 'Ð' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string 'àXC' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string 'àXC' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string '¢' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string '¢' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string '°}¨' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string '°}¨' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string 'ý' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction. Attempt to free non-existent shared string 'ý' at /usr/lib/perl5/site_perl/5.8.0/Data/Serializer.pm line 198 during global destruction.
The relevant code that references is the following: sub DESTROY { my $self = (shift); undef %_internal; } Which essentially is just ensuring that an internal data structure is cleaned out between invocations to ensure we don't slowly leak memory in very long memory resident runs. I cannot reproduce the problem you are reporting, can you provide me any means of reproducing this problem?
Subject: RE: [rt.cpan.org #39592] Attempt to free .... during global destruction.
Date: Wed, 29 Dec 2010 17:06:01 -0600
To: "bug-Data-Serializer [...] rt.cpan.org" <bug-Data-Serializer [...] rt.cpan.org>
From: "Martin, Jeremy" <jmartin [...] gsihosting.com>
Well, that was from 2 years ago, and that OS (RedHat Enterprise Linux 3 aka CentOS 3) is now End Of Life'd. :-) I have been sticking with v0.46 on RHEL 4 this whole time, but I just let it install v0.49 via CPAN and I was unable to reproduce this now. RHEL 5 now include a perl-Data-Serializer RPM (v0.49) which has also not caused us any issues. I don't have the exact code that was making RHEL 3 wig out back then, but I'm pretty sure it was something very close to this which is about all I do with Data::Serializer currently. It would have either been writing a cache file... my $serializer = Data::Serializer->new( cipher => 'Rijndael', digester => 'MD5', secret => 'change me, ); $serializer->store($structure, $cache_file); Or reading a cache file... my $serializer = Data::Serializer->new( cipher => 'Rijndael', digester => 'MD5', secret => 'change me', ); my $ref_structure = $serializer->retrieve($cache_file); Best wishes Jeremy Show quoted text
-----Original Message----- From: Neil A. Neely via RT [mailto:bug-Data-Serializer@rt.cpan.org] Sent: Wednesday, December 29, 2010 4:53 PM To: Martin, Jeremy Subject: [rt.cpan.org #39592] Attempt to free .... during global destruction. <URL: https://rt.cpan.org/Ticket/Display.html?id=39592 > The relevant code that references is the following: sub DESTROY { my $self = (shift); undef %_internal; } Which essentially is just ensuring that an internal data structure is cleaned out between invocations to ensure we don't slowly leak memory in very long memory resident runs. I cannot reproduce the problem you are reporting, can you provide me any means of reproducing this problem?
On Wed Dec 29 18:06:12 2010, jmartin@gsihosting.com wrote: Show quoted text
> Well, that was from 2 years ago, and that OS (RedHat Enterprise Linux > 3 aka CentOS 3) is now End Of Life'd. :-)
Dove much deeper into this problem - the override to DESTROY was only put in place to try and stomp a memory leak issue related towards bloat in the %_internal data structure over time. The much simpler solution was to eliminate %_internal completely and no longer require an override to DESTROY, and we should no longer have any risk of confusing perl's Garbage collector. I've uploaded this as 0.52.