Subject: bug#20207: 25.0.50; url-retrieve-synchronously hangs

From: Eli Zaretskii <[email-masked]>
Date: Thu, 26 Mar 2015 20:38:48 +0200

To reproduce:

 emacs -Q

Type into the scratch buffer:

 (url-retrieve-synchronously "http://localhost:1/") C-j

Emacs hangs until you type C-g.  I believe it hangs in
accept-process-output that is called by url-retrieve-synchronously.

Turning on url-debug produces the following *URL-DEBUG* buffer;

  http -> Contacting host: localhost:2
  http -> Marking connection as busy: localhost:2 #<process localhost<1>>
  retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http local host:2*>)
  http -> Marking connection as free: localhost:2 #<process localhost<1>>
  http -> Activating callback in buffer ( *http localhost:2*): #[128 "\302\303\30\4p#\210\300\305\240\210\301p\240\207" [(nil) (#<buffer  *http localhost:2*>) ur\l-debug retrieval "Synchronous fetching done (%S)" t] 5 "

  (fn &rest IGNORED)"] ((:error (error connection-failed "failed with code 111
  " :host "localhost" :service 2)))
  retrieval -> Synchronous fetching done (#<buffer  *http localhost:2*>)

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/e/eliz/git/emacs/trunk/etc/DEBUG.

In GNU Emacs 25.0.50.15 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2015-03-17 on fencepost.gnu.org
Repository revision: e70a1f9b42857fa1315302b9c140a6d40ea15f1d
System Description:     Trisquel 4.1 LTS

Configured using:
 `configure --prefix=/home/e/eliz --enable-checking=yes,glyphs
 --with-gif=no --with-tiff=no 'CFLAGS=-O0 -g3''

Configured features:
XPM JPEG PNG SOUND GPM NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE
M17N_FLT LIBOTF XFT ZLIB

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

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-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
  line-number-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Contacting host: localhost:1
Quit
Contacting host: localhost:2
Quit
Mark set
Scanning for dabbrevs...done

Load-path shadows:
None found.

Features:
(shadow sort mail-extr dabbrev emacsbug message dired format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader sendmail mail-utils cus-edit easymenu cus-start cus-load
wid-edit network-stream nsm starttls url-cache url-http tls mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-auth url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source cl-macs eieio eieio-core cl-generic
byte-opt gv bytecomp byte-compile cl-extra seq cconv pcase cl-loaddefs
cl-lib gnus-util mm-util help-fns mail-prsvr password-cache url-vars
mailcap xterm time-date tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer 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 make-network-process
gfilenotify dynamic-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)

Memory information:
((conses 16 117483 6859)
 (symbols 48 21842 0)
 (miscs 40 45 130)
 (strings 32 22726 6972)
 (string-bytes 1 623691)
 (vectors 16 12115)
 (vector-slots 8 390120 1904)
 (floats 8 129 169)
 (intervals 56 197 0)
 (buffers 976 14)
 (heap 1024 35413 908))