Re: BUG #17391: While using --with-ssl=openssl and PG_TEST_EXTRA='ssl' options, SSL tests fail on OpenBSD 7.0

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@gmail.com>, Andres Freund <andres@anarazel.de>, byavuz81@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Heikki Linnakangas <heikki.linnakangas@iki.fi>, Michael Paquier <michael@paquier.xyz>
Date: 2022-02-04T14:12:47Z
Lists: pgsql-bugs

Attachments

> On 3 Feb 2022, at 15:25, Daniel Gustafsson <daniel@yesql.se> wrote:

> The remaining tests are both CRL tests, but I haven't had time yet to dig into
> why those are failing (the logs weren't terribly helpful on a quick glance).

Looking at these remaining failures today left me a bit confused.  It seems to
be some form of timing or synchronization issue as delaying shutdown with a
sleep(1) in the be_tls_open_server errorpath makes the tests pass.  With the
attached diff I get all tests passing on OpenBSD 7.  Following the bouncing
ball into differences between OpenSSL and LibreSSL in the revocation and
shutdown paths didn't lead to anything.

Does anyone have any ideas what this could be?

Thomas: Does the attached reproduce these results for you?

--
Daniel Gustafsson		https://vmware.com/

Commits

  1. Move libpq's write_failed mechanism down to pqsecure_raw_write().

  2. Fix thinko in PQisBusy().

  3. Set SNI ClientHello extension to localhost in tests

  4. Improve worst-case performance of text_position_get_match_pos()