Re: Linking legacy PHP stuff

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Brooke <simon(at)weft(dot)co(dot)uk>, Postgres General mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Linking legacy PHP stuff
Date: 2000-08-20 01:48:24
Message-ID: 00081921554502.00745@lorc.wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 19 Aug 2000, Tom Lane wrote:
> Lamar Owen <lamar(dot)owen(at)wgcr(dot)org> writes:
> > However, I _have_ seen memory leaks and other problems with a client
> > that was statically linked with a pre-6.4 libpq on post 6.4 that worked
> > perfectly with pre-6.4 server.

> Interesting --- this would imply some problem in the current backend's
> handling of the v1 protocol, I think. Is it worth your time to dig
> into it further and see where the leak is coming from? I'm not sure
> I care very much about pre-6.4 code myself, but am willing to look
> at the problem if you can provide specifics.

I'll see what can find -- and I mean that literally, as that client may or may
not still be available in that form on my disk (AOLserver 2.2.1 through
AOLserver 2.3b4 binary distribution's postgres.so -- the 2.3.2, 2.3.3, and 3.0
drivers don't exhibit the problem....) -- and the AOLserver site no longer
distributes the closed source versions -- only the open source AOLserver 3,
which is also available in binary form, but linked to a post-6.4 libpq.

The symptom was, on any database error whatsoever, the database connection
would blowup and cause a segmentation fault for the master thread in the
multithreaded AOLserver core -- which is _not_ supposed to happen. This would
lock up the entire server process, requireing kill -9 to recover. Recompiling
the postgres driver and linking against a post-6.4 libpq cleared the problem.

The problem did not happen if a pre-6.4 server was in use. I ran for two years
with the old postgres.so's and 6.2.1/6.3.2 with little to no incident -- then I
upgraded to 6.5, and had to recompile the driver to get things right.

I could have been the libpq.a that the postgres driver was linked against -- I
asked the developers at that time what version it was, and they replied that it
was so old that they had no idea. That's when I realized I should have been
recompiling and relinking all along! :-) I _do_ know the docs to the driver
mentioned Postgres95 1.0.1......

But, that's about the same age as PHP/FI 2, isnt' it?

Of course, you found Simon's problem -- for which I am glad. Much simpler than
I erroneously thought.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-08-20 02:31:22 Re: Linking legacy PHP stuff
Previous Message Lamar Owen 2000-08-20 00:56:01 Re: Linking legacy PHP stuff