Skip Menu |

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 40028
Status: rejected
Priority: 0/
Queue: DBI

People
Owner: Nobody in particular
Requestors: tut [...] bambra.net
Cc:
AdminCc:

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



Subject: Memory leak on $dbh->prepare
Date: Tue, 14 Oct 2008 11:54:09 +0400
To: bug-DBI [...] rt.cpan.org
From: Sergey Panteleev <tut [...] bambra.net>
Hi, I've found the memory leak when I call prepare method on some query. Everytime I call it DBI losts 1 SV. I use DBD::mysql driver, but it seems that the problem is not there: http://www.nntp.perl.org/group/perl.perl5.porters/2008/07/msg138559.html Leak exists in the last version 1.607.
Subject: Re: [rt.cpan.org #40028] Memory leak on $dbh->prepare
Date: Tue, 14 Oct 2008 17:28:30 +0100
To: Sergey V Panteleev via RT <bug-DBI [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
It's a bug in 5.10.0. Already fixed. See http://www.google.com/search?client=safari&rls=en-us&q='DBI+memory+leak+in+5.10.0+due+to+change+26530'&ie=UTF-8&oe=UTF-8 Tim. On Tue, Oct 14, 2008 at 03:53:29AM -0400, Sergey V Panteleev via RT wrote: Show quoted text
> Tue Oct 14 03:53:16 2008: Request 40028 was acted upon. > Transaction: Ticket created by tut@bambra.net > Queue: DBI > Subject: Memory leak on $dbh->prepare > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: tut@bambra.net > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40028 > > > > Hi, > > I've found the memory leak when I call prepare method on some query. > Everytime I call it DBI losts 1 SV. I use DBD::mysql driver, but it > seems that the problem is not there: > http://www.nntp.perl.org/group/perl.perl5.porters/2008/07/msg138559.html > > Leak exists in the last version 1.607.
Not a DBI bug but a perl bug in 5.10.0, fixed by: Change 34209 by davem@davem-pigeon on 2008/08/20 23:15:36 [perl #56908] DBI memory leak in 5.10.0 due to change 26530 A weakref to a HV would leak, because the xhv_backreferences array is created with a refcount of 2 (to avoid premature freeing during global destruction), but the RC was only decremented once when the parent HV was freed. Also, when thread cloned, the new array was being created with a RC of 1, rather than 2, which coincidentally worked due to the first bug.