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

BUG #1294: Random errors (failed connection)

From
"PostgreSQL Bugs List"
Date:
The following bug has been logged online:

Bug reference:      1294
Logged by:          Stefanos Harhalakis

Email address:      v13@it.teithe.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@Linux -> postmaster@Irix was always successfull.
Trying to connect from psql@Other_Linux -> psql@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>>

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

From
Tom Lane
Date:
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.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

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

From
Stefanos Harhalakis
Date:
On Tuesday 26 October 2004 05:08, Tom Lane wrote:
> "PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> > Please consider changing the default for IRIX systems to select() inste=
ad
> > 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 i=
t a=20
little more during this week and see if I can find something more specific.

<<V13>>