Re: Some 9.5beta2 backend processes not terminating properly? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some 9.5beta2 backend processes not terminating properly?
Date
Msg-id 20249.1451499994@sss.pgh.pa.us
Whole thread Raw
In response to Re: Some 9.5beta2 backend processes not terminating properly?  (Andres Freund <andres@anarazel.de>)
Responses Re: Some 9.5beta2 backend processes not terminating properly?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> There goes that theory. Amongst others. The aforementioned problem with
> waitfor doesn't seem to be actually armed because waitfor is only used
> if errno == EWOULDBLOCK || errno == EAGAIN.

Mumble.  It is clearly possible that we'd reach the Assert failure if
SSL_read were to return -1 and set errno to EWOULDBLOCK or EAGAIN.
I doubt that is what is happening here, because those errnos don't
seem sensible for an EOF condition, but I'd still feel more comfortable
if be_tls_read/be_tls_write handled SSL_ERROR_SYSCALL like this:
           if (n != -1)           {               errno = ECONNRESET;               n = -1;           }
+           else
+           {
+               /* just in case errno is EWOULDBLOCK/EAGAIN */
+               *waitfor = WL_SOCKET_READABLE | WL_SOCKET_WRITEABLE;
+           }
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Some 9.5beta2 backend processes not terminating properly?
Next
From: Joe Conway
Date:
Subject: custom parameters cannot be removed once set