BUG #1294: Random errors (failed connection)

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1294: Random errors (failed connection)
Date: 2004-10-25 20:56:13
Message-ID: 20041025205613.7BB275A1010@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1294
Logged by: Stefanos Harhalakis

Email address: v13(at)it(dot)teithe(dot)gr

PostgreSQL version: 7.4.5

Operating system: IRIX 6.5.17

Description: Random errors (failed connection)

Details:

This bug is tested against pgsql 7.4.1 and 7.4.6 using openssl 0.9.7c and
0.9.7d.

It took me about 6 hours and a lot of compiles and step-by-step tracing to
figure it out.

Every postgresql client that runs under IRIX 6.5 seems to fail to connect to
remote clients either when using openssl or not(without ssl there are some
(random) successfull connections). The error indicates that no connection is
done at all.

The test case was:
psql or a custom client running on Irix 6.5
postmaster running on Linux 2.6.8

Trying to connect from psql(at)Linux -> postmaster(at)Irix was always successfull.
Trying to connect from psql(at)Other_Linux -> psql(at)Linux was always successfull
too, so it seemed that this was a problem with clients under Irix only.

You will know for sure that this is the case when:
You try: psql -h X.X.X.X -U xxxx yyyy
from the Irix box and it fails giving nothing more than "LOG: incomplete
startup packet" in the server log, but if you try: strace psql -h X.X.X.X -U
xxxx yyyy then it connects (!!).

It seems that something goes wrong when postgresql is compiled to use the
poll() system call. I changed the #define HAVE_POLL to #undef HAVE_POLL and
it worked (!).

Please consider changing the default for IRIX systems to select() instead of
poll().

TIA and keep up the good work...

<<V13>>

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kris Jurka 2004-10-25 21:25:15 aggregates other than count accpet *
Previous Message Tom Lane 2004-10-25 02:39:45 Re: BUG #1293: INSERT INTO test (f1.f2) VALUES (1, 2) - wrong diagnostic