Subject: bug#40665: 28.0.50; tls hang on local ssl

From: Derek Zhou <[email-masked]>
Date: Thu, 16 Apr 2020 14:06:30 +0000 (UTC)

I have a vps that have ssl cert from let's encrypt. If I run emacs on
that machine and use eww to open the local url through proper DNS name,
it hangs. This only happen with gnutls 3.6+ I believe. w3m works.

recipe:
emacs -q
M-x eww
https://u15789687.ct.sendgrid.net/ls/click?upn=5u6PACFCQRlPqbnHSU4z2cQ21VoDRd3GIiP45VZkVss-3DZL1J_BeaubjMha5v6Ct1PCBdNXS7c-2B4F-2FiYml2FeMaPqPFw6mlPCBFCAdA-2BJhSopciFrXarTStvJH7F2cC8M4I5-2BSIuHrtbPlXdAWJ2PCGsvuTDU6kkpVZ5JAYurFBfbu8uG6PzR-2BqkNWc1EoW8kPIdIY9NymfSyaiKNcH-2F4DHCP9GFBvbUhtpcMZmq3z0U-2FWPsThxiaP-2BlzG2O8BI46NDehudn-2FKUS7g-2FjrNI0N1zBKjqzV6MI7ge8846jUqXY-2FUQ3jE

This only happens when running on mail.3qin.us itself; from across the
network it is ok. I believe it is timing related and worsen by very
short network latency and small files.

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu)
 of 2020-04-16 built on mail.3qin.us
Repository revision: d5a7df8c02f04102d50a5cd2290262f59f2b1415
Repository branch: master
System Description: Debian GNU/Linux 9 (stretch)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Contacting host: mail.3qin.us:443
Quit
Making completion list... [2 times]

Configured using:
 'configure --prefix=/usr/local/stow/emacs-git'

Configured features:
SOUND NOTIFY INOTIFY GNUTLS LIBXML2 ZLIB MODULES THREADS PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: eww

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired dired-loaddefs rfc822 mml
mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader sendmail gnutls network-stream url-http
mail-parse rfc2231 url-gw nsm rmc url-cache url-auth regexp-opt eww
easymenu mm-url gnus nnheader gnus-util rmail tool-bar rmail-loaddefs
rfc2047 rfc2045 ietf-drums time-date mail-utils wid-edit mm-util
mail-prsvr thingatpt url-queue url url-proxy url-privacy url-expand
url-methods url-history mailcap shr text-property-search url-cookie
url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars puny
image svg xml seq dom browse-url format-spec cl-loaddefs cl-lib
term/xterm xterm byte-opt gv bytecomp byte-compile cconv tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list
replace newcomment text-mode elisp-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch timer select mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame minibuffer
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese composite
charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev
obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads inotify
multi-tty make-network-process emacs)

Memory information:
((conses 16 80381 6214)
 (symbols 48 9811 1)
 (strings 32 28375 1106)
 (string-bytes 1 862248)
 (vectors 16 12526)
 (vector-slots 8 146194 6312)
 (floats 8 58 333)
 (intervals 56 186 0)
 (buffers 992 13))