Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Re: Emacs hangs with concurrent TLS connections
Date: Fri, 10 Dec 2010 13:24:48 -0600	[thread overview]
Message-ID: <87ipz12zy7.fsf@lifelogs.com> (raw)
In-Reply-To: <m3k4jxjzr1.fsf@quimbies.gnus.org>

On Sun, 28 Nov 2010 15:20:50 +0100 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

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

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

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

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

LMI> I get an infinite loop like this:

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

LMI> where fd 3 is

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

LMI> which is

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

LMI> which is the ssh-tunnelled X connection.

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

Have you looked at a verbose log with gnutls-log-level set high?

Ted




  reply	other threads:[~2010-12-10 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28 14:20 Lars Magne Ingebrigtsen
2010-12-10 19:24 ` Ted Zlatanov [this message]
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=87ipz12zy7.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --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).