unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: 25060@debbugs.gnu.org
Subject: bug#25060: gnutls: asynchronous spurious "fatal error"
Date: Tue, 29 Nov 2016 11:10:17 +0100	[thread overview]
Message-ID: <871sxuy4ty.fsf@igalia.com> (raw)

Using Emacs 25.1.1 and GnuTLS 3.5.4, consider this interaction:

    (url-retrieve "https://www.gnu.org/"
                  #'(lambda (status)
                      (message "success")))

If I evaluate this a few times in a row directly in my scratch buffer, I
get messages like this:

    Contacting host: www.gnu.org:443
    #<buffer  *http www.gnu.org:443*-960341>
    success
    Contacting host: www.gnu.org:443
    #<buffer  *http www.gnu.org:443*-228158>
    success
    Contacting host: www.gnu.org:443
    #<buffer  *http www.gnu.org:443*-76553>
    success
    Contacting host: www.gnu.org:443
    #<buffer  *http www.gnu.org:443*-944613>
    success
    Contacting host: www.gnu.org:443
    #<buffer  *http www.gnu.org:443*-171378>
    success

And then, after a couple seconds:

    gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.

Indeed if I wait a couple seconds after a single fetch, I always get the
above message after some timeout of inactivity.  Here is a log with
gnutls-log-level set to 2:

    Contacting host: www.gnu.org:443
    gnutls.c: [1] (Emacs) allocating credentials
    gnutls.c: [2] (Emacs) allocating x509 credentials
    gnutls.c: [2] (Emacs) using default verification flags
    gnutls.c: [1] (Emacs) setting the trustfile:  /etc/ssl/certs/ca-certificates.crt
    gnutls.c: [1] (Emacs) setting the trustfile:  /etc/pki/tls/certs/ca-bundle.crt
    gnutls.c: [1] (Emacs) gnutls callbacks
    gnutls.c: [1] (Emacs) gnutls_init
    gnutls.c: [1] (Emacs) got non-default priority string: NORMAL
    gnutls.c: [1] (Emacs) setting the priority string
    gnutls.c: [audit] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data
    gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable, try again. [3088 times]
    gnutls.c: [2] received curve SECP256R1
    gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable, try again. [2816 times]
    #<buffer  *http www.gnu.org:443*-346477>
    gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable, try again. [5 times]
    success

Then after a couple seconds:

    gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
    gnutls.c: [2] (Emacs) Deallocating x509 credentials

No idea what that non-fatal error appearing thousands of times is, I
suspect Emacs is polling on a non-blocking file descriptor or
something.  Anyway this error appears to not affect anything as it's
asynchronous and it is not handleable by anything, and just makes people
think they have problems :)  Can you make it go away?

Regards,

Andy





             reply	other threads:[~2016-11-29 10:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 10:10 Andy Wingo [this message]
2016-12-01 18:35 ` bug#25060: gnutls: asynchronous spurious "fatal error" Ted Zlatanov
2017-01-24 23:17 ` Lars Ingebrigtsen
2017-01-30 20:10   ` bug#25059: " Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871sxuy4ty.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=25060@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).