Re: BUG #1294: Random errors (failed connection)

Lists: pgsql-bugs
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
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>>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Stefanos Harhalakis" <v13(at)it(dot)teithe(dot)gr>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1294: Random errors (failed connection)
Date: 2004-10-26 02:08:11
Message-ID: 3433.1098756491@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> Please consider changing the default for IRIX systems to select() instead of
> poll().

Can you suggest a test for configure to determine that poll() is broken?
I'm not particularly excited about assuming that every past and future
IRIX version has this bug.

regards, tom lane


From: Stefanos Harhalakis <v13(at)it(dot)teithe(dot)gr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1294: Random errors (failed connection)
Date: 2004-10-26 10:01:19
Message-ID: 200410261301.24944.v13@it.teithe.gr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Tuesday 26 October 2004 05:08, Tom Lane wrote:
> "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> > Please consider changing the default for IRIX systems to select() instead
> > of poll().
>
> Can you suggest a test for configure to determine that poll() is broken?
> I'm not particularly excited about assuming that every past and future
> IRIX version has this bug.

I'm sorry but nope. The errors are almost random. I'll try to investigate it a
little more during this week and see if I can find something more specific.

<<V13>>