I think this may be the same, or a variant, of this issue:
which was previously discussed here: Certbot snap Error while renewing (OPENSSL_init_ssl)
In all situations, it's this configtest that is randomly failing on some platforms.