From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Emacs hangs with concurrent TLS connections
Date: Sun, 28 Nov 2010 15:20:50 +0100 [thread overview]
Message-ID: <m3k4jxjzr1.fsf@quimbies.gnus.org> (raw)
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
next reply other threads:[~2010-11-28 14:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-28 14:20 Lars Magne Ingebrigtsen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3k4jxjzr1.fsf@quimbies.gnus.org \
--to=larsi@gnus.org \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).