Gnus development mailing list
 help / color / mirror / Atom feed
* Emacs hangs with concurrent TLS connections
@ 2010-11-28 14:20 Lars Magne Ingebrigtsen
  2010-12-10 19:24 ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-28 14:20 UTC (permalink / raw)
  To: ding; +Cc: emacs-devel

This can be rather tricky to reproduce, but I seem to be able to
reproduce it kinda reliably with the following.

Don't eval it -- it might hang your Emacs completely.  Start a new one
and try it there:

(progn
  (require 'gnutls)
  (url-retrieve "https://www.google.no" #'ignore)
  (url-retrieve "https://www.google.no" #'ignore))

If it doesn't hang your Emacs, try some other URLs, and more of them.
  
Emacs becomes completely unresponsive, and the only thing that can be
done is to kill Emacs.

I get an infinite loop like this:

select(11, [3 4 6 8 9], [], NULL, {0, 19533}) = 1 (in [9], left {0, 19531})
getrusage(RUSAGE_SELF, {ru_utime={6, 424401}, ru_stime={1, 744109}, ...}) = 0
times({tms_utime=642, tms_stime=174, tms_cutime=0, tms_cstime=0}) = 1846926770
getrusage(RUSAGE_SELF, {ru_utime={6, 424401}, ru_stime={1, 744109}, ...}) = 0
times({tms_utime=642, tms_stime=174, tms_cutime=0, tms_cstime=0}) = 1846926770
read(3, 0xda6174, 4096)                 = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 (Timeout)
select(11, [3 4 6 8 9], [], NULL, {0, 19388}) = 1 (in [9], left {0, 19386})

where fd 3 is

lrwx------ 1 larsi larsi 64 Nov 28 15:14 3 -> socket:[5510547]

which is

emacs     20504       larsi    3u     IPv4            5510547       0t0        TCP localhost.localdomain:57459->localhost.localdomain:6010 (ESTABLISHED)

which is the ssh-tunnelled X connection.

So something is up when trying to initialise two gnutls connections at
the same time.  Or something.  A race condition?  Some state shared that
shouldn't be shared?  I don't know.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-05 11:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-28 14:20 Emacs hangs with concurrent TLS connections Lars Magne Ingebrigtsen
2010-12-10 19:24 ` Ted Zlatanov
2010-12-13  3:36   ` Lars Magne Ingebrigtsen
2011-02-25 22:24     ` Ted Zlatanov
2011-03-05 11:45       ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).