From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74899 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: Emacs hangs with concurrent TLS connections Date: Fri, 10 Dec 2010 13:24:48 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87ipz12zy7.fsf@lifelogs.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1292009127 20149 80.91.229.12 (10 Dec 2010 19:25:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 19:25:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: ding@gnus.org Original-X-From: ding-owner+M23255@lists.math.uh.edu Fri Dec 10 20:25:23 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PR8ao-0000z3-HE for ding-account@gmane.org; Fri, 10 Dec 2010 20:25:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PR8ab-00076c-LJ; Fri, 10 Dec 2010 13:25:09 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PR8aZ-00076J-Oa for ding@lists.math.uh.edu; Fri, 10 Dec 2010 13:25:07 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PR8aV-0002m5-Bq for ding@lists.math.uh.edu; Fri, 10 Dec 2010 13:25:07 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PR8aU-0000Z6-00 for ; Fri, 10 Dec 2010 20:25:02 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PR8aU-0000nB-Ao for ding@gnus.org; Fri, 10 Dec 2010 20:25:02 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Dec 2010 20:25:02 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Dec 2010 20:25:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:33qI3CrBlXNSzeF9D024Tn1K2pw= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74899 gmane.emacs.devel:133583 Archived-At: On Sun, 28 Nov 2010 15:20:50 +0100 Lars Magne Ingebrigtsen 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