From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: gnutls infloop possibly fixed Date: Sat, 11 Feb 2012 18:10:23 +0100 Organization: Programmerer Ingebrigtsen Message-ID: <87hayx8feo.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328980242 1800 80.91.229.3 (11 Feb 2012 17:10:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2012 17:10:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 11 18:10:42 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RwGTB-0005Bz-TB for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2012 18:10:42 +0100 Original-Received: from localhost ([::1]:50154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwGTB-0004QG-2G for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2012 12:10:41 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:47320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwGT8-0004Q9-TB for emacs-devel@gnu.org; Sat, 11 Feb 2012 12:10:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwGT7-0006RB-Ny for emacs-devel@gnu.org; Sat, 11 Feb 2012 12:10:38 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:57682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwGT7-0006R0-BL for emacs-devel@gnu.org; Sat, 11 Feb 2012 12:10:37 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RwGT2-000590-Oc for emacs-devel@gnu.org; Sat, 11 Feb 2012 18:10:32 +0100 Original-Received: from 93-41-188-50.ip82.fastwebnet.it ([93.41.188.50]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Feb 2012 18:10:32 +0100 Original-Received: from larsi by 93-41-188-50.ip82.fastwebnet.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Feb 2012 18:10:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 19 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 93-41-188-50.ip82.fastwebnet.it Mail-Copies-To: never User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:ctAsKYoCl77+tA1mo61n1GvPRbs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148476 Archived-At: I finally took a hard look at the GnuTLS-related Emacs hangs. It turned out to be pretty easy to reproduce for me. If I switch off the wifi on this laptop and then presses `g' in Gnus, Emacs would reliably use 100% CPU, and `C-g' or anything wouldn't work. So a totally dead Emacs. I chased this down to emacs_gnutls_write, which would just, well, infloop if libgnutls returned EAGAIN. I've now removed that, and just leaves the normal Emacs process loop to retry if we get an EAGAIN. This seems to work for me -- `C-g' reliably works for me if I drop the network, or I get a new IP address. There may be other side-effects, though. Slower throughput? I don't know. Please give it a whirl and report back whether things stop working or not. -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Sent from my Rome