Re: BUG #2260: PGCrypto Memory Problem - Mailing list pgsql-bugs

From Daniel Blaisdell
Subject Re: BUG #2260: PGCrypto Memory Problem
Date
Msg-id f2af156d0602151137y7850c75m17d78431e3b1d9c8@mail.gmail.com
Whole thread Raw
In response to Re: BUG #2260: PGCrypto Memory Problem  (Michael Fuhr <mike@fuhr.org>)
List pgsql-bugs
I appreciate you guys looking at this bug. Taking Tom's suggestion that it
might be a system crypt implementation issue I upgraded OpenSSL from 0.9.7e=
to
0.9.7i. I also upgraded any other libraries that were installed with the
word crypt.

After running ldconfig I then recompiled Postgres 8.1.2 againt the newly
installed libraries and ended up with the same results.  Michael's
standalone testcase was blowing up the memory usage very quickly.

I did notice as I was doing more testing that if i disconnect my client
after running subsequent queries that the memory usage drops due to the
server process getting killed.

Other Possibly Useful info:
CFLAGS=3D"-O3 -march=3Dpentium4 -pipe"
MAKEOPTS=3D"-j3"

I'm going to try compiling with the -ssl USE flag set to avoid any external
libraries and attempt to duplicate this bug. I'll let you know what results
I find.

-Daniel


On 2/15/06, Michael Fuhr <mike@fuhr.org> wrote:
>
> On Wed, Feb 15, 2006 at 01:43:18PM -0500, Tom Lane wrote:
> > Michael Fuhr <mike@fuhr.org> writes:
> > > I can reproduce this in 8.1.3 on FreeBSD 6.0 and Solaris 9.  Here's
> > > a standalone test case:
> >
> > > SELECT crypt(x::text, '$1$salt') FROM generate_series(1, 500) AS g(x);
> >
> > Interesting, because I see no leak with this example on Fedora 4 or
> > HPUX.  Platform dependency is sounding more and more likely.
>
> Did you test OpenSSL builds?  Both of my systems are built with
> OpenSSL and that causes pgcrypto to use different code in some
> places (e.g., px_find_digest() in internal.c and openssl.c).  I'll
> build and test a non-OpenSSL version when I get a chance.
>
> --
> Michael Fuhr
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2260: PGCrypto Memory Problem
Next
From: Marko Kreen
Date:
Subject: Re: BUG #2260: PGCrypto Memory Problem