Thread: connection trouble

connection trouble

From
Vanessa Conchodon
Date:
Hi!

I've got this message in the log of one of my software
(message repeated every 3 minutes at least):
"could not receive server response to SSL negotiation packet:
Interrupted system call".
What does this message exactly mean and can I do something
to avoid it?

        Vanessa.
--
Vanessa Conchodon
SMIE
7 rue de la Chapelle
93160 Noisy le Grand
France
Tel: 01 55 85 90 40, poste 160


Re: connection trouble

From
Michael Fuhr
Date:
On Thu, Aug 11, 2005 at 12:09:56PM +0200, Vanessa Conchodon wrote:
> I've got this message in the log of one of my software
> (message repeated every 3 minutes at least):
> "could not receive server response to SSL negotiation packet:
> Interrupted system call".

What software are you using, what version of PostgreSQL, and on
what platform?  PostgreSQL 7.3 and later should handle EINTR
(interrupted system call) so that you don't see this exact error
message.

http://archives.postgresql.org/pgsql-committers/2002-04/msg00108.php

--
Michael Fuhr

Re: connection trouble

From
Vanessa Conchodon
Date:
Michael Fuhr wrote:
> On Thu, Aug 11, 2005 at 12:09:56PM +0200, Vanessa Conchodon wrote:
>
>>I've got this message in the log of one of my software
>>(message repeated every 3 minutes at least):
>>"could not receive server response to SSL negotiation packet:
>>Interrupted system call".
>
>
> What software are you using, what version of PostgreSQL, and on
> what platform?  PostgreSQL 7.3 and later should handle EINTR
> (interrupted system call) so that you don't see this exact error
> message.
>
> http://archives.postgresql.org/pgsql-committers/2002-04/msg00108.php

I'm using a 7.4.7-6sarge1 version on a debian sarge.
And the message is what I get for PQerrorMessage(DataBaseConnection)
after doing a PQsetdbLogin + PQstatus.

Perhaps it's normal but if I could understand why I got
this message so many times, perhaps I could avoid it.
Thanks for your help.

        Vanessa.
--
Vanessa Conchodon
SMIE
7 rue de la Chapelle
93160 Noisy le Grand
France
Tel: 01 55 85 90 40, poste 160


Re: connection trouble

From
Tom Lane
Date:
Vanessa Conchodon <v.conchodon@smie.com> writes:
> I've got this message in the log of one of my software
> (message repeated every 3 minutes at least):
> "could not receive server response to SSL negotiation packet:
> Interrupted system call".
> What does this message exactly mean and can I do something
> to avoid it?

Update to a newer version of libpq?  AFAICS this is not possible in any
release newer than 7.2.

            regards, tom lane

Re: connection trouble

From
Tom Lane
Date:
Vanessa Conchodon <v.conchodon@smie.com> writes:
> Michael Fuhr wrote:
>> On Thu, Aug 11, 2005 at 12:09:56PM +0200, Vanessa Conchodon wrote:
>>> I've got this message in the log of one of my software
>>> (message repeated every 3 minutes at least):
>>> "could not receive server response to SSL negotiation packet:
>>> Interrupted system call".
>>
>> What software are you using, what version of PostgreSQL, and on
>> what platform?  PostgreSQL 7.3 and later should handle EINTR
>> (interrupted system call) so that you don't see this exact error
>> message.

> I'm using a 7.4.7-6sarge1 version on a debian sarge.

It's really, really, really hard to believe that 7.4 libpq would emit
this.  The code looks like

            retry_ssl_read:
                    nread = recv(conn->sock, &SSLok, 1, 0);
                    if (nread < 0)
                    {
                        if (SOCK_ERRNO == EINTR)
                            /* Interrupted system call - just try again */
                            goto retry_ssl_read;

                        printfPQExpBuffer(&conn->errorMessage,
                                          libpq_gettext("could not receive server response to SSL negotiation packet:
%s\n"),
                        SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
                        goto error_return;
                    }

Are you sure your application isn't linked to an older (7.2) libpq?
The EINTR test wasn't there in 7.2.

            regards, tom lane

Re: connection trouble

From
Vanessa Conchodon
Date:
Heya Tom!

Tom Lane wrote:
> Are you sure your application isn't linked to an older (7.2) libpq?
> The EINTR test wasn't there in 7.2.

You were right: one part of my software had not been
recompiled on the test box (but all others had) and
it was still linked with libpq.2.so instead of libpq.3.so.
Error has now disappeared from my log file.
Thanks a lot to have shown me what was so obvious I could
not see it ;o)
Regards,
        Vanessa.
--
Vanessa Conchodon
SMIE
7 rue de la Chapelle
93160 Noisy le Grand
France
Tel: 01 55 85 90 40, poste 160