Subject: package.el hangs until window is resized
From: Zack Piper <[email-masked]>
To: [email-masked]
Date: Tue, 23 Feb 2016 18:17:43 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

OS: GNU/Linux; openSUSE 42.1

Emacs version affected: somewhen within revision ef52e66efd78aac4c4e5bd5e11870e5ba3b37a1e
and revision 1ba50a0d8cbef6686ecf752583832e7bbb9137ef

Problem:

When I run emacs after nuking `~/.emacs.d/elpa' (to force all the packages to be redownloaded)
Emacs hangs on "Contacting host: melpa.org:443" along with other hosts such at elpa.gnu.org:80, 
it seems to stay like this indefinently, until I resize the window, such as when resizing a pane 
in tmux, Emacs then refreshes the package index, and continues loading everything.

strace from a few seconds before this happens, until it happens:

stat("/home/zack/ins/share/emacs/25.1.50/lisp/net/nsm.elc", {st_mode=S_IFREG|0644, st_size=13718, ...}) = 0
stat("/home/zack/ins/share/emacs/25.1.50/lisp/net/nsm.el", 0x7ffd2b82cde0) = -1 ENOENT (No such file or directory)
fcntl(9, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(9, {st_mode=S_IFREG|0644, st_size=13718, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb3b7ad9000
lseek(9, 0, SEEK_CUR)                   = 0
read(9, ";ELC\27\0\0\0\n;;; Compiled\n;;; in Ema"..., 4096) = 4096
readlinkat(AT_FDCWD, "/home", 0x7ffd2b82a660, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack", 0x7ffd2b82b990, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack/ins", 0x7ffd2b82bb50, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack/ins/share", 0x7ffd2b82bd10, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack/ins/share/emacs", 0x7ffd2b82bed0, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack/ins/share/emacs/25.1.50", 0x7ffd2b82c090, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack/ins/share/emacs/25.1.50/lisp", 0x7ffd2b82c250, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack/ins/share/emacs/25.1.50/lisp/net", 0x7ffd2b82c410, 1024) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/home/zack/ins/share/emacs/25.1.50/lisp/net/nsm.elc", 0x7ffd2b82c5d0, 1024) = -1 EINVAL (Invalid argument)
lseek(9, 4096, SEEK_SET)                = 4096
lseek(9, 4096, SEEK_SET)                = 4096
read(9, "tus warnings network-security-le"..., 4096) = 4096
read(9, "help-window-old-frame get-buffer"..., 4096) = 4096
read(9, "l \"\\301\10!\\205\t\0\\302\10!\\207\" [#1# "..., 4096) = 1430
lseek(9, 13718, SEEK_SET)               = 13718
read(9, "", 4096)                       = 0
close(9)                                = 0
munmap(0x7fb3b7ad9000, 4096)            = 0
lseek(8, 4096, SEEK_SET)                = 4096
read(8, "tunistic\nSTARTTLS upgrades even "..., 4096) = 4096
read(8, "ring plist-get :type starttls :s"..., 4096) = 2968
read(8, "", 4096)                       = 0
close(8)                                = 0
munmap(0x7fb3b7ada000, 4096)            = 0
faccessat(AT_FDCWD, "/etc/ssl/certs/ca-certificates.crt", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/etc/pki/tls/certs/ca-bundle.crt", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/etc/ssl/ca-bundle.pem", F_OK) = 0
faccessat(AT_FDCWD, "/usr/ssl/certs/ca-bundle.crt", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/local/share/certs/ca-root-nss.crt", F_OK) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_BLOCK, [INT ALRM], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 95104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb3a854b000
mprotect(0x7fb3a854b000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fb3a8560ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb3a8561d50, tls=0x7fb3a8561a80, child_tidptr=0x7fb3a8561d50) = 27687
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
pselect6(8, [7], [], NULL, {3599, 875299610}, {NULL, 8}

-- 
Zack Piper <[email-masked]> http://apertron.net