From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32452: 26.1; gnutls_try_handshake maxes out cpu retrying when server is a bit busy Date: Fri, 17 Aug 2018 15:25:31 +0300 Message-ID: <83d0uhgoxw.fsf@gnu.org> References: <87wosqwlu3.fsf@gmail.com> <83d0uiig3j.fsf@gnu.org> <83zhxmgqrh.fsf@gnu.org> <87r2ixx0t6.fsf@gmail.com> <83pnyhh6ta.fsf@gnu.org> <87o9e1w6kf.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1534508852 13689 195.159.176.226 (17 Aug 2018 12:27:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2018 12:27:32 +0000 (UTC) Cc: 32452@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 17 14:27:28 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fqdqh-0003Qb-TU for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2018 14:27:28 +0200 Original-Received: from localhost ([::1]:33537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqdso-0002Ps-Dv for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2018 08:29:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqdqN-00087U-H7 for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2018 08:27:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqdqI-0000rV-AH for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2018 08:27:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fqdqI-0000rN-6i for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2018 08:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fqdqH-0007dD-Tl for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2018 08:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Aug 2018 12:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32452-submit@debbugs.gnu.org id=B32452.153450876329253 (code B ref 32452); Fri, 17 Aug 2018 12:27:01 +0000 Original-Received: (at 32452) by debbugs.gnu.org; 17 Aug 2018 12:26:03 +0000 Original-Received: from localhost ([127.0.0.1]:53319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fqdpK-0007bl-TP for submit@debbugs.gnu.org; Fri, 17 Aug 2018 08:26:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fqdpI-0007bH-Ri for 32452@debbugs.gnu.org; Fri, 17 Aug 2018 08:26:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqdp5-0007yx-IU for 32452@debbugs.gnu.org; Fri, 17 Aug 2018 08:25:53 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqdp0-0007vY-Cq; Fri, 17 Aug 2018 08:25:44 -0400 Original-Received: from [176.228.60.248] (port=2749 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fqdoz-0005zS-L5; Fri, 17 Aug 2018 08:25:42 -0400 In-reply-to: <87o9e1w6kf.fsf@gmail.com> (message from Noam Postavsky on Fri, 17 Aug 2018 07:55:44 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149555 Archived-At: > From: Noam Postavsky > Cc: 32452@debbugs.gnu.org > Date: Fri, 17 Aug 2018 07:55:44 -0400 > > Eli Zaretskii writes: > > > OK, so do you understand the sequence of the events well enough to > > describe what happens, and explain why we get so many EAGAIN errors? > > I'm not yet sure this is bug, maybe it's just how things are in this > > case (modulo exerting less CPU load, something that we certainly > > should try). > > I haven't really traced things through properly, but my current > understanding/guess is that we're using non-blocking sockets even though > we actually want blocking behaviour. So to get the blocking behaviour > we just spin in a loop. In which case it's fine, we just need to do something in the loop to yield the CPU, like some nanosleep, perhaps? And maybe enlarge the sleep period as time goes on? > > Also, does this happen with every server, or just with some? > > debbugs.gnu.org seems to be the most extreme case (at the moment), with > other servers I see only about a hundred "Resource temporarily > unavailable" messages (I'm noticing this now because I switched on > gnutls-log-level, but it's not enough to cause a noticable CPU spike). debbugs is terribly slow in a browser as well, right now. But hundreds of attempts sounds excessive to me.