GNU bug report logs - #40665
28.0.50; tls hang on local ssl

Previous Next

Package: emacs;

Reported by: Derek Zhou <derek <at> 3qin.us>

Date: Thu, 16 Apr 2020 16:01:02 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Derek Zhou <derek <at> 3qin.us>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 40665 <at> debbugs.gnu.org
Subject: bug#40665: 28.0.50; tls hang on local ssl
Date: Sat, 18 Apr 2020 02:44:05 +0000 (UTC)
[Message part 1 (text/plain, inline)]
Derek Zhou writes:

> When this thing happens, the tls handshakes are done properly. However,
> emacs did not write anything into gnutls before starting to read and
> obviously cannot get anything out at all. It is not really a hang, but
> write never happen and the display buffer stays empty.
>
> Derek

Took my nearly the whole day to debug, but this one-line patch fixed my
problem.
My server finishes tls handshake within the gnutls_boot itself, and if the
sentinel is not called right after, it will never be called so write
will not happen. Someone should review this carefully.

[tls_fast_boot_bug.patch (text/x-diff, inline)]
diff --git a/src/process.c b/src/process.c
index 91d426103d..6d497ef854 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5937,8 +5937,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 		  /* If we have an incompletely set up TLS connection,
 		     then defer the sentinel signaling until
 		     later. */
-		  if (NILP (p->gnutls_boot_parameters)
-		      && !p->gnutls_p)
+		  if (NILP (p->gnutls_boot_parameters))
 #endif
 		    {
 		      pset_status (p, Qrun);

This bug report was last modified 4 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.