Deadlock in _gnutls_epoch_get on mutex epoch_lock with msmtp and gnutls 3.6.7
Description of problem:
msmtp gets stuck in a deadlock on mutex session->internals.epoch_lock in function _gnutls_epoch_get with gnutls version 3.6.7. The mutex has been introduced in commit 2db896b7. I am not sure if this is a bug in gnutls or in msmtp. Maybe msmtp fails to initialize gnutls correctly, but it works with version 3.6.6 so I suspect, that the commit may assume a specific usage of the gnutls API that msmtp (and maybe other software) does not adhere.
Version of gnutls used:
Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Use msmtp with gnutls 3.6.7. It gets stuck trying to initiate a TLS connection to the SMTP server using STARTTLS.
msmtp successfully sending an e-mail over a TLS connection to an SMTP server.