Re: BUG #2260: PGCrypto Memory Problem

From: Daniel Blaisdell <lunk(dot)djedi(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2260: PGCrypto Memory Problem
Date: 2006-02-15 19:37:51
Message-ID: f2af156d0602151137y7850c75m17d78431e3b1d9c8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.7eto
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="-O3 -march=pentium4 -pipe"
MAKEOPTS="-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(at)fuhr(dot)org> wrote:
>
> On Wed, Feb 15, 2006 at 01:43:18PM -0500, Tom Lane wrote:
> > Michael Fuhr <mike(at)fuhr(dot)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
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Fuhr 2006-02-15 19:41:23 Re: BUG #2260: PGCrypto Memory Problem
Previous Message Tom Lane 2006-02-15 19:28:33 Re: BUG #2260: PGCrypto Memory Problem