From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: gnutls error handling Date: Sun, 17 Oct 2010 15:55:24 +0200 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287323756 23379 80.91.229.12 (17 Oct 2010 13:55:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 17 Oct 2010 13:55:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 17 15:55:55 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P7TiH-0001wc-1E for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2010 15:55:53 +0200 Original-Received: from localhost ([127.0.0.1]:52968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7TiF-0006hw-Nt for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2010 09:55:47 -0400 Original-Received: from [140.186.70.92] (port=41698 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7Ti8-0006h4-JL for emacs-devel@gnu.org; Sun, 17 Oct 2010 09:55:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7Ti3-0003xj-QV for emacs-devel@gnu.org; Sun, 17 Oct 2010 09:55:40 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:38934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7Ti3-0003x7-Gv for emacs-devel@gnu.org; Sun, 17 Oct 2010 09:55:35 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P7Ti0-0001rS-3f for emacs-devel@gnu.org; Sun, 17 Oct 2010 15:55:32 +0200 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Oct 2010 15:55:32 +0200 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Oct 2010 15:55:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 26 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXb2to5NDJMR0QYFBSX k5D8/P3///9dWFUaf9iTAAACX0lEQVQ4jaXUO4/jIBAAYFbKJe0NY4l2AZ+ogUhuHYdd2hRx6hRr b7tg6/j7B068j3tUN5Eieb6AzWTGZLxHn2P8FGT8R/wPnJxryeUPGHaHxBtePf0Gg3csoo2dePoC wwF5FQwLCszTZziDzeGsnBvZbD/g2jWA1hoUHT6G7x+wy1kEsLMLao5xu8I15zVwgAYZeibaFc5o AYOWVk+WWnPs8mmGAp3maJxkHCjqYNFvbyuGTljZzCmviAkVn6r2Bi9gJTaR2xQpcGubxt3gQZsq RK55EJMxaDXy7QJHDZTmPRzZeCrBswmeFzho3VFu3gghmwRMScMWGI5aBSZrUmIDICvQPwpckXJs 9BtxzhGSAmiPbwVedJQIpt3k37fEpwjVHRpmMdTElZ3ILgjQ01zg1dSIoSLtDUAwOLr7CkT5Dipx PdULVEGjbO6wOewxP1gp4ouSFia6rkDIn7rAVUhtgOYkyei1sGgfCwx8yjWp29xV2YJQdsIFxpiL FVLrl72CE03QPxfwQVMWa7dpT6Tj3O1585zhMp65QZ20a5fyHtFIelngKijNJ9l3StVkNwmFqfzn /TiIBMJMOJc6oUVmHm8wdogUUFOnsOkSWP18h1fNc/8gm7tkvOskW9tnwFrl84rIovF+15S2XmB8 SBVTIvdiBOOxvixQvq8pGhWF4FZzyXJXDWN/G66z94Iy2iXF9T5nLhkKj+Nm0pbqGCSbyiONQ7+O 2m6WeXRorb7drk/vc7oDWx2queQvC7y/J06b3D7rxScYPk//0J/+/mboP2C9VX/5umLo11i3+gVi EzcJgi9QRQAAAABJRU5ErkJggg== Mail-Copies-To: never X-Now-Playing: Otomo Yoshihide + Ozeki Mikito + Mats Gustafsson's _with records_: "(untitled)" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Nb86quRrL8deHIP4U57dq3vNrB0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131775 Archived-At: I've been using the built-in gnutls stuff exclusively for all the tls connections for a while now, and it seems to work fine, except for certain situations that I'm not able to reproduce reliably. Sometimes, Emacs starts using 100% CPU. When I strace, I see that it's in a poll loop, so the strace always looks like this: poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 (Timeout) select(15, [3 4 8 10 13], [], NULL, {0, 15591}) = 2 (in [8 10], left {0, 15589}) read(3, 0xec9b94, 4096) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 (Timeout) select(15, [3 4 8 10 13], [], NULL, {0, 15532}) = 2 (in [8 10], left {0, 15530}) read(3, 0xec9b94, 4096) = -1 EAGAIN (Resource temporarily unavailable) There's always a gnutls socket involved in the select call -- in this instance it was fd 10. lsof showed the socket to be in the CLOSE_WAIT state. So my suspicion is that the we're somehow now communicating back to Emacs that a gnutls socket has closed. I'm not familiar enough with Emacs internals to know how that's supposed to be done, and I'm not familiar enough with the gnutls library to know how it reports this, so... er... help? -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen