Re: MSVC SSL test failure

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Lars Kanis <lars@greiz-reinsdorf.de>
Date: 2021-12-07T18:22:07Z
Lists: pgsql-hackers
Alexander Lakhin <exclusion@gmail.com> writes:
> 07.12.2021 19:25, Tom Lane wrote:
>> Hmm. I wonder whether using SD_BOTH behaves any differently. 

> With shutdown(MyProcPort->sock, SD_BOTH) the test failed for me on
> iterations 1, 2, 3, 16 (just as without shutdown() at all).
> So shutdown with the SD_SEND flag definitely behaves much better (I've
> seen over 200 successful iterations).

Fun.  Well, I'll put in shutdown with SD_SEND for the moment,
and we'll have to see whether we can improve further than that.
It does sound like we may be running into OpenSSL bugs/oddities,
not only kernel issues, so it may be impossible to do better
on our side.

			regards, tom lane



Commits

  1. On Windows, also call shutdown() while closing the client socket.

  2. On Windows, close the client socket explicitly during backend shutdown.