From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#34763: 27.0.50; url-retrieve-synchronously misbehaves inside eldoc-documentation-function Date: Tue, 9 Apr 2019 03:48:17 +0300 Message-ID: References: <83a7i15vrk.fsf@gnu.org> <787f765a-42f4-40d0-3b78-e751f546fe6c@yandex.ru> <831s3c3ta8.fsf@gnu.org> <8f7ae869-2e94-5535-f16f-476348036dc2@yandex.ru> <83r2bc2csd.fsf@gnu.org> <83h8c63ek1.fsf@gnu.org> <7240d82b-5919-cee8-e3bc-81be8d996400@yandex.ru> <83pnqsyw68.fsf@gnu.org> <83pnq1diqk.fsf@gnu.org> <83lg0pdehd.fsf@gnu.org> <19dad181-7933-52b5-548f-08dfa48334bf@yandex.ru> <83h8bdc726.fsf@gnu.org> <5110bc00-c1e3-0fd3-2a4d-8f1293c80ca5@yandex.ru> <837ec48qxj.fsf@gnu.org> <8336ms8lo1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="256014"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: 34763@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 09 02:49:52 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDexU-0014Vk-KC for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Apr 2019 02:49:52 +0200 Original-Received: from localhost ([127.0.0.1]:33014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDexT-0000lI-Gx for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Apr 2019 20:49:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDewn-000072-J8 for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 20:49:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDewl-0007K5-Bl for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 20:49:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36824) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hDewg-0007G1-Tv for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 20:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hDewg-0001A4-Qn for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 20:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Apr 2019 00:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34763 X-GNU-PR-Package: emacs Original-Received: via spool by 34763-submit@debbugs.gnu.org id=B34763.15547709114412 (code B ref 34763); Tue, 09 Apr 2019 00:49:01 +0000 Original-Received: (at 34763) by debbugs.gnu.org; 9 Apr 2019 00:48:31 +0000 Original-Received: from localhost ([127.0.0.1]:50365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDewA-000195-L1 for submit@debbugs.gnu.org; Mon, 08 Apr 2019 20:48:31 -0400 Original-Received: from mail-lj1-f193.google.com ([209.85.208.193]:46421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDew7-00018q-58 for 34763@debbugs.gnu.org; Mon, 08 Apr 2019 20:48:29 -0400 Original-Received: by mail-lj1-f193.google.com with SMTP id h21so1152008ljk.13 for <34763@debbugs.gnu.org>; Mon, 08 Apr 2019 17:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uwFas2M2FZn2hEKKt2W0X9CiJoEsoIxOUM6kRDUZNuI=; b=LEYFSNkScx3Ay1s1Qb9UEZeaCAUyip12Rrmj7+04eE/hHozdxCbLoEkK+4KDceUbSk zUrQhXbh8j3Z/xEgHG2Pvq8/BV0lE6VX3HA0Q9IowJXCONlMpONeFMuvde7D6rltL+Ea EuVnLYPMXJRwphaYqPCH5bqjjQ6lTmTEDjJmYcYWxbBvqzafdz4+cHYLjiyqim7eKqtM 5f5bcjh7DhQZSvvq1oMzXorh+0lzEwbBO8WfFi53dR4KnBYjwItjqw0V74n/0aBQeTS5 +LjjaRubPEeJ4/BGCeMe3oat8vgOq2PV3T6smsw8XehBOiEXzWKlwLmienpdL/db2XZi qZMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uwFas2M2FZn2hEKKt2W0X9CiJoEsoIxOUM6kRDUZNuI=; b=iReHW1sPUMY43oZrrCNw4JRs8swiOCUjtcWkhmGow9O0oJpTldjSicqyi2NvuTcb+P b1hi75gO2hI1uUXUusaNEQs00yR0ScKaMjPa/UXPFtgTtGfAYku0UXhbWF1YQv/3J6/d U4ZqkCtCmVL/bXPxc/vAGE/zHgesFsAlqnIi4i/ngKjZkjPKy/1zrm2cSK1oZsw+NZBH rdVXqH0UGC0OUD1ppGm9SIKsCZd6+RB533CD4ozig/uK4o33GgNkomkkgC2w9DbjAIzb gJeq+ooD5nGTRb7TrXKF5dhYdZ63+FjvQ0fmOfEZeLml1tYJRG10oEZdkXYql/Ob5Q61 mf/g== X-Gm-Message-State: APjAAAWEu1EFUcnxbI5YXLp98ZnR0p0PLblF94sX6EIA4d9q6QHr8tEG YPZR9RppEMVseBdFhPVuMC012UbE X-Google-Smtp-Source: APXvYqwPO9cotXuap7IFCglo9MvK2yu5TcdMpBrtFDsKXRlnAYyO2khpA0P5KOnAq9LpHZhdDug1cg== X-Received: by 2002:a2e:5d94:: with SMTP id v20mr17458115lje.138.1554770900649; Mon, 08 Apr 2019 17:48:20 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id r2sm6588777ljd.16.2019.04.08.17.48.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 17:48:19 -0700 (PDT) In-Reply-To: <8336ms8lo1.fsf@gnu.org> Content-Language: en-US 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: 209.51.188.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:157381 Archived-At: On 08.04.2019 20:13, Eli Zaretskii wrote: >> url-retrieve-synchronously doesn't bother to reset them, just kills the >> process. Speaking of, shouldn't that be enough for our scenario? > > I think so, yes. So I guess the first step would be to figure out why url-retrieve-synchronously does that isn't enough. >> Well, if url-http-debug is never entered, its cleanup logic will never >> be executed. Shouldn't we consider that a problem as well? > > Depends on how the cleanup code will be written. It can be written > such that it works regardless where the interruption happens. Do you have a "good" approach in mind that would still use url-http-debug? >> I mean, like, interrupted by a different kind of error. Not a signal >> that's cleanly handled in Emacs's internals. > > A bug, then? Possibly. Or I imagine something like a response timeout (in an already-established connection) could also signal some kind of error. > That'd also be a bug, IMO. We can expect bugs to behave abnormally. Sometimes it's useful to perform cleanup properly anyway. If feasible. >> And as for "bug of the code", I'm saying that there must be some code >> that can hog the CPU (the comment refers to it), and we might want to >> handle that carefully. > > A simple C-g should theoretically take handle that carefully. That also speaks for removing the cleanup code from url-http-debug, I think. >> Simply waiting for a some amount of time tends to get the problem >> "unstuck", though the improvement is gradual and fairly unpredictable. > > Is it related in any way with the outstanding connections being > completed/closed? What does netstat show? Feel free to suggest a particular invocation, but here's some results. I'm calling it while filtering out some irrelevant programs: netstat -tp --wide | grep -v qbittorrent | grep -v ... Output at the beginning, when everything seems okay: Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 300 zappa:53781 cust-138-33-109-94.dyn.as47377.net:23048 FIN_WAIT1 - tcp 0 0 zappa:54612 mrs08s03-in-f10.1e100.net:https TIME_WAIT - tcp 0 1 zappa:33575 ec2-3-83-213-10.compute-1.amazonaws.com:49839 FIN_WAIT1 - tcp 0 1 zappa:55515 svaio-12.dyn.pool1.garodo.net:6881 SYN_SENT - tcp 0 69 zappa:48829 cust-138-33-109-94.dyn.as47377.net:20142 FIN_WAIT1 - Here's the output right after I repro'd the problem: (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 69 zappa:44551 cust-138-33-109-94.dyn.as47377.net:20142 FIN_WAIT1 - tcp 0 0 zappa:50064 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50066 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55858 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55930 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50076 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55928 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 1 zappa:48910 ns345059.ip-176-31-225.eu:http LAST_ACK - tcp 0 0 zappa:55926 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55856 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:38389 nz184l178.bb122100.ctm.net:32766 TIME_WAIT - tcp 0 516 zappa:46189 S0106f0f249850973.wp.shawcable.net:62318 LAST_ACK - tcp 0 0 zappa:50062 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55920 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50068 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50070 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55922 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55832 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55924 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:34997 ec2-3-83-213-10.compute-1.amazonaws.com:49839 FIN_WAIT2 - tcp 0 0 zappa:50074 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50072 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs Here it is after a few minutes has passed: (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 69 zappa:44551 cust-138-33-109-94.dyn.as47377.net:20142 FIN_WAIT1 - tcp 0 0 zappa:50064 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50066 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55858 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55930 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50076 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55928 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:54792 mrs08s03-in-f10.1e100.net:https TIME_WAIT - tcp 0 0 zappa:55926 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55856 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50062 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55920 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50068 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50070 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55922 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55832 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:55924 mrs08s04-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50074 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs tcp 0 0 zappa:50072 mrs08s02-in-f4.1e100.net:http ESTABLISHED 4594/src/emacs The list gets shorter over time.