develooper Front page | perl.perl5.porters | Postings from July 2008

[perl #56908] DBI memory leak

From:
David Landgren via RT
Date:
July 17, 2008 21:01
Subject:
[perl #56908] DBI memory leak
Message ID:
rt-3.6.HEAD-8814-1216330660-221.56908-15-0@perl.org
On Mon Jul 14 00:40:45 2008, lav@yar.ru wrote:
> This is a bug report for perl from lav@yar.ru,
> generated with the help of perlbug 1.36 running under perl 5.10.0.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> Under perl-5.10.0 the following simple program leaks memory,
> while under perl-5.8.8 it does not. DBI module version is the
> same under both perl versions (1.605). The leak seems to be not
> specific to DBD driver, as it also happens with mysql and
> oracle drivers.
> 
> use DBI;
> my $dbh=DBI->connect('DBI:NullP:');
> while(1) {
> 	my $q=$dbh->prepare(q{select 1 from dual});
> }

DBI does some sneaky things with the internals, in the pursuit of raw
performance.

The internals were heavily reworked during the development track up to
5.10, and in the process DBI was dinged a couple of times by changes in
assumptions. As such, and given the absence of response so far (in spite
of a delightfully short test snippet -- thank you), I recommend you post
your report to the dbi-users mailing list.

I've cc'ed Tim Bunce on this reply. It just may turn out that Tim has a
easy solution regardless, and was not aware of the bug report.

Thanks,
David Landgren



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About