It certainly does appear to leak memory for you, too.  My script is similar, as 
are my results.

Thanks for checking.

Appears to be a confirmed memory leak to me.  Does anyone have an idea of how 
the weakref code can be fixed to solve this?  It appears that Tim doesn't have 
time...

Thanks,
Ephraim

> -----Original Message-----
> From: Tielman de Villiers [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 18, 2006 15:38
> To: Ephraim Dan
> Subject: RE: FW: memory leak in DBI ...
> 
> perl v5.8.7
> 
> DBI ver 1.50:
> before | total pid size:  6024 kB
>      1 | total pid size:  9152 kB (+3128 kB)
>    101 | total pid size:  9152 kB (+3128 kB)
>    201 | total pid size:  9152 kB (+3128 kB)
>    301 | total pid size:  9208 kB (+3184 kB)
>    401 | total pid size:  9208 kB (+3184 kB)
>    501 | total pid size:  9208 kB (+3184 kB)
>    601 | total pid size:  9208 kB (+3184 kB)
>    701 | total pid size:  9208 kB (+3184 kB)
>    801 | total pid size:  9208 kB (+3184 kB)
>    901 | total pid size:  9208 kB (+3184 kB)
> after  | total pid size:  9332 kB
> 
> DBI 1.51:
> before | total pid size:  5988 kB
>      1 | total pid size:  9116 kB (+3128 kB)
>    101 | total pid size:  9116 kB (+3128 kB)
>    201 | total pid size:  9116 kB (+3128 kB)
>    301 | total pid size:  9172 kB (+3184 kB)
>    401 | total pid size:  9172 kB (+3184 kB)
>    501 | total pid size:  9172 kB (+3184 kB)
>    601 | total pid size:  9172 kB (+3184 kB)
>    701 | total pid size:  9172 kB (+3184 kB)
>    801 | total pid size:  9172 kB (+3184 kB)
>    901 | total pid size:  9172 kB (+3184 kB)
> after  | total pid size:  9296 kB
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Tue, 2006-07-18 at 05:31 -0700, Ephraim Dan wrote:
> > What results did this give you?
> >
> > Thanks for testing.
> > I'll send you my test script soon.
> >
> > > -----Original Message-----
> > > From: Tielman de Villiers [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, July 18, 2006 15:29
> > > To: Ephraim Dan
> > > Subject: Re: FW: memory leak in DBI ...
> > >
> > > Hi Ephraim,
> > >
> > > I can have a look at this for you, could you pls send me your test
> > > script for the mem leaks? (I'll leave it up to you to post the results
> > > to the list).
> > >
> > > --tielman
> > >
> > > I've tested something like the below, but not sure if that gives the
> > > results you want (linux)?
> > >
> > >
> > > __START__
> > > my @statusArray;
> > >
> > > @statusArray = split (/\s+/, `grep Vm /proc/$$/status`);
> > > printf "before | total pid size: %5d kB\n", $statusArray[1];
> > >
> > > my $startmem = $statusArray[1];
> > >
> > > use DBI;
> > > ##my $dbh = DBI->connect( "dbi:Pg:dbname=test;host=xx", "user",
> > > "secret" );
> > > for my $i ( 1 .. 1000 ) {
> > >     my $dbh = DBI->connect( "dbi:Pg:dbname=test;host=xx", "user",
> > > "secret" );
> > >     my $sth = $dbh->prepare("SELECT * FROM test");
> > >     $sth->execute();
> > >     $sth->finish;
> > >        $dbh->disconnect;
> > >     @statusArray = split (/\s+/, `grep Vm /proc/$$/status`);
> > >     if ( $i % 100 == 1 ) {
> > >        printf "%6d | total pid size: %5d kB (+%3d kB)\n", $i,
> > > $statusArray[1], $statusArray[1] - $startmem;
> > >     }
> > > }
> > > ##$dbh->disconnect;
> > >
> > > @statusArray = split (/\s+/, `grep Vm /proc/$$/status`);
> > > printf "after  | total pid size: %5d kB\n", $statusArray[1];
> > >
> > > __END__
> > >
> > >
> > >
> > >
> > > On Mon, 2006-07-17 at 20:41 +0100, Tielman de Villiers wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: Ephraim Dan [mailto:[EMAIL PROTECTED]
> > > > > Sent: 17 July 2006 18:39
> > > > > To: Ephraim Dan; Tim Bunce
> > > > > Cc: dbi-users@perl.org
> > > > > Subject: RE: memory leak in DBI ...
> > > > >
> > > > >
> > > > > Tim,
> > > > >
> > > > > Any chance you've had a chance to look at this?
> > > > >
> > > > > Can someone else try to reproduce a memory leak in a simple
> > > > > connect/prepare/execute/disconnect loop using DBI 1.51 and
> > > > > any DBD driver?
> > > > >
> > > > > Thanks...
> > > > >
> > > > > --edan
> > > > >
> > > > > ________________________________
> > > > >
> > > > > From: Ephraim Dan [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thu 7/13/2006 11:02
> > > > > To: Tim Bunce
> > > > > Cc: dbi-users@perl.org
> > > > > Subject: RE: memory leak in DBI XS bootstrap code
> > > > >
> > > > >
> > > > >
> > > > > > I've just noticed that you're using 5.8.0. Try the latest 5.8.x.
> > > > >
> > > > > [edan] We can't upgrade perl very easily in our production
> > > > > environment, but I tested on another box running perl 5.8.8,
> > > > > DBI 1.50, and I get the same leak of 4 per loop.
> > > > >
> > > > > Any chance you could find the time to attempt to reproduce
> > > > > this yourself?
> > > > >
> > > > > Thanks,
> > > > > edan
> > > > >
> > > > >
> > > > >
> > >
> > >
> > > **********************************************************************
> > > This email and any files transmitted with it are confidential and
> > > intended solely for the use of the individual or entity to whom they
> > > are addressed. If you have received this email in error please notify
> > > the system manager.
> > >
> > > This footnote also confirms that this email message has been swept by
> > > MIMEsweeper for the presence of computer viruses.
> > >
> > > www.mimesweeper.com
> > > **********************************************************************

Reply via email to