From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Bastos Newsgroups: gmane.emacs.bugs Subject: bug#71893: 27.1; Gnus pop3 download progress goes over 100% Date: Thu, 19 Sep 2024 16:13:30 -0300 Message-ID: References: <87o77geojf.fsf@DESKTOP-1FS65SF.i-did-not-set--mail-host-address--so-tickle-me> <87zfqz9zo2.fsf@jeremybryant.net> <86y15wcr6d.fsf@gnu.org> <86zfpssoyv.fsf@gnu.org> <86zfotcemg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31433"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jb@jeremybryant.net, 71893@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 19 21:16:08 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1srMdL-0007zx-Ew for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Sep 2024 21:16:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMd2-0000Mt-TE; Thu, 19 Sep 2024 15:15:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srMd0-0000Mf-Ux for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 15:15:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srMcz-0003XI-B9 for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 15:15:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=Put6p3dYksz3A8au7yIztyyNVv0T1XT0eF4T/wgpwIg=; b=aWg6gPG3ilVy8gma/VpLPuRGXjJA5f6VkpMAclDcHL/UtjiDwjhxDVJnohvn9GFzUw8OPNteqi03Js0UvoFpXLoucpOVG0DtzXdR32QkKsLAF1MSxDT1dFh5bogJpC9TAQhHOnT0ordJApnJ5rkxzvTQzxtLNFdV/X5ncjkTGq8vpbhAUQwXFCUDyzbXqe4bg/glxBhnYsdzHiMx7EaYS0A54FKVSu3+7ATcolknxNE8hzpwDXBUHXPLditPfgADB55kjtRH5s4NUDR/jnc0z2Vbl1SucrbObMrz1xg57gov+aUFohMGVCxgKX5cWO13kNNL7BRuVaVKS6FgwXlNeg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srMdG-0001Tv-HM for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 15:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Bastos Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 19:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71893 X-GNU-PR-Package: emacs Original-Received: via spool by 71893-submit@debbugs.gnu.org id=B71893.17267733455669 (code B ref 71893); Thu, 19 Sep 2024 19:16:02 +0000 Original-Received: (at 71893) by debbugs.gnu.org; 19 Sep 2024 19:15:45 +0000 Original-Received: from localhost ([127.0.0.1]:33514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srMcy-0001TN-SO for submit@debbugs.gnu.org; Thu, 19 Sep 2024 15:15:45 -0400 Original-Received: from mail-oa1-f50.google.com ([209.85.160.50]:58395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srMcv-0001T6-MK for 71893@debbugs.gnu.org; Thu, 19 Sep 2024 15:15:43 -0400 Original-Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-27cdb92376aso627158fac.0 for <71893@debbugs.gnu.org>; Thu, 19 Sep 2024 12:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ic.ufrj.br; s=google; t=1726773258; x=1727378058; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Put6p3dYksz3A8au7yIztyyNVv0T1XT0eF4T/wgpwIg=; b=QnxFlky1ET6vskPLGphGFAMVeKG4iNUabkTtM7dL9Y1uSPw44AapOAbP+IMH0/Sjj9 rEYAIakimZwXk8F634yiXakJmSQ96gahGZi5sRnLy7+lgz8L1+S6ITFaOWyHM+U+e53g 74puf+PCRsa01gP/KgCCVH6vyAwN5zzQOm1/8Jcn9fmd7a9IVfc4/rNlH/3A+nXD5YNK hKfy6AjbybS4FlwTQhT4IxGQRe/+pTURj1/+AWEWOOaQ5Olf5lNXtDWRk9UZ43op/GRC lG7VAXSQXX+3WBzO18mNWIGJFUgaAZjc41n/QzUO1klK0tILzesgUlcTclhEIDPI5O3p LbPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726773258; x=1727378058; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Put6p3dYksz3A8au7yIztyyNVv0T1XT0eF4T/wgpwIg=; b=OdVvvg0Ju/hPpWAfgFg5k6UJUlc+yDbnqWCqPzk3+3AfAubwEYgQKr1GDvDl1CJ7kr LOWEX27w2HyiCoendpIlyzE8fnnhmGHRAggF7zS5rdsvcdGXpFrQPjWrT+O5UGxTdDxw RrhsvTIXYMdpjLDWQ7je9LUej1RsyKijZYk/2tYthq98QhoDRxQ3wsVoK39IF1/HA3Al Qxl2TI0VqHiJj4pzGZr8sLEIzEPli/7TJQBCdT+B3TONBhwYTXcG8AxusUKtswLTWYzJ JxagYt/gxbItQ11o32SPdiVQj6GFDIR3arAx5KJvt/hZ9E+IFulriErOn6CTtjP4/cix OQfA== X-Forwarded-Encrypted: i=1; AJvYcCUQHzd18wQrSp1KLYjrEEpCBcPg+R7Mpq8EkNq0FZu57qfYOuUrpJYYphBsIJq4+5mVirq9pQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwyVXuxXbRXRkDLy1BQGF+j1NHsdMon/kSsazdCn6chFE2xiSwl Ie0MyqUghQO9UJz9xgxhA8SuVRPxvmlbqjrAfXGakvRhdTHqFfeFcpx2fnbsPfKtQlR0oCW8ROc oGBgqK+/EFQBR/JYXtprL1Jx18Sv9e98FxU5V X-Google-Smtp-Source: AGHT+IHwjGYwrCWnr+NWI+Tmk+9xC4eSMiC9XGu4NCKXSO+HMI7RIe07o2Raq/YomNk5idQRuIgpF4hYAwki2n/uWCY= X-Received: by 2002:a05:6871:6a1:b0:260:eae3:5ec2 with SMTP id 586e51a60fabf-2803cf6d2e7mr5534fac.26.1726773257998; Thu, 19 Sep 2024 12:14:17 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292073 Archived-At: On Mon, Sep 9, 2024 at 8:29=E2=80=AFPM Daniel Bastos w= rote: > > On Sat, Aug 31, 2024 at 4:53=E2=80=AFAM Eli Zaretskii wrot= e: > > Any progress there? > > I've the 29.3 set up and I have not yet managed to reproduce. Now I did. The problem happens in GNU Emacs 29.3 (build 2, x86_64-w64-mingw32) of 2024-03-24 too. Here's what I found in the POP3 before fetching my mail. +OK 69 messages (2041560 bytes) 1 1243 2 56203 3 5694 4 1858 5 8704 6 2264 7 1626 8 1626 9 1626 10 8704 11 15079 12 15079 13 15079 14 1858 15 6303 16 1303 17 1303 18 1858 19 8704 20 8704 21 8581 22 8704 23 8581 24 13969 25 13969 26 61517 27 9590 28 47193 29 61517 30 47193 31 13969 32 16591 33 1880 34 56203 35 16591 36 16591 37 61517 38 12830 39 56203 40 56203 41 13969 42 16591 43 16591 44 8581 45 1880 46 1880 47 56203 48 12830 49 8704 50 12830 51 61517 52 1880 53 6303 54 6303 55 61517 56 61517 57 61517 58 61517 59 61517 60 61517 61 9590 62 9590 63 237515 64 236784 65 56203 66 56203 67 56203 68 12830 69 17268 . +OK Farewell. If I sum the bytes of each message, I get %awk '{ sum +=3D $2; } END { print(sum) }' pop3-list.txt 2041560 which is exactly the advertised total at the top. The Gmail POP3 makes minimum sense. And here's the log after having Gnus fetch all the messages. (I couldn't keep the beginning lines because the *messages* buffer erased them, but the log shows that Gnus is going well beyond 100%.) pop3 retrieved 6945KB (340%) [...] pop3 retrieved 9992KB (489%) pop3 retrieved 10386KB (508%) Saving file ~/.pop3-uidl... Wrote c:/Users/x/AppData/Roaming/.pop3-uidl Wrote c:/Users/x/AppData/Roaming/Mail/mail/misc/118 Wrote c:/Users/x/AppData/Roaming/Mail/mail/misc/119 [...] Wrote c:/Users/x/AppData/Roaming/Mail/mail/misc/186 nnml: Reading incoming mail (69 new)...done Reading active file via nnml...done Checking new news...done Here's a check of how much data I get after having written each message to the file system. %ls -l | awk '$8 >=3D 118 && $8 <=3D 186 { total +=3D $5; print; } END { print(total) }' -rw-rw-rw- 1 x None 1472 2024-09-19 16:00 118 -rw-rw-rw- 1 x None 876549 2024-09-19 16:00 119 -rw-rw-rw- 1 x None 5925 2024-09-19 16:00 120 -rw-rw-rw- 1 x None 963 2024-09-19 16:00 121 -rw-rw-rw- 1 x None 7307 2024-09-19 16:00 122 -rw-rw-rw- 1 x None 2494 2024-09-19 16:00 123 -rw-rw-rw- 1 x None 1459 2024-09-19 16:00 124 -rw-rw-rw- 1 x None 7773 2024-09-19 16:00 125 -rw-rw-rw- 1 x None 1855 2024-09-19 16:00 126 -rw-rw-rw- 1 x None 2380 2024-09-19 16:00 127 -rw-rw-rw- 1 x None 573608 2024-09-19 16:00 128 -rw-rw-rw- 1 x None 13685 2024-09-19 16:00 129 -rw-rw-rw- 1 x None 15324 2024-09-19 16:00 130 -rw-rw-rw- 1 x None 7416 2024-09-19 16:00 131 -rw-rw-rw- 1 x None 6056691 2024-09-19 16:00 132 -rw-rw-rw- 1 x None 6596 2024-09-19 16:00 133 -rw-rw-rw- 1 x None 1532 2024-09-19 16:00 134 -rw-rw-rw- 1 x None 2088 2024-09-19 16:00 135 -rw-rw-rw- 1 x None 9087 2024-09-19 16:00 136 -rw-rw-rw- 1 x None 1398 2024-09-19 16:00 137 -rw-rw-rw- 1 x None 10892 2024-09-19 16:00 138 -rw-rw-rw- 1 x None 7740 2024-09-19 16:00 139 -rw-rw-rw- 1 x None 3172 2024-09-19 16:00 140 -rw-rw-rw- 1 x None 14922 2024-09-19 16:00 141 -rw-rw-rw- 1 x None 15983 2024-09-19 16:00 142 -rw-rw-rw- 1 x None 9209 2024-09-19 16:00 143 -rw-rw-rw- 1 x None 12690 2024-09-19 16:00 144 -rw-rw-rw- 1 x None 49851 2024-09-19 16:00 145 -rw-rw-rw- 1 x None 3123 2024-09-19 16:00 146 -rw-rw-rw- 1 x None 47433 2024-09-19 16:00 147 -rw-rw-rw- 1 x None 13070 2024-09-19 16:00 148 -rw-rw-rw- 1 x None 186296 2024-09-19 16:00 149 -rw-rw-rw- 1 x None 1108 2024-09-19 16:00 150 -rw-rw-rw- 1 x None 202280 2024-09-19 16:00 151 -rw-rw-rw- 1 x None 16064 2024-09-19 16:00 152 -rw-rw-rw- 1 x None 17431 2024-09-19 16:00 153 -rw-rw-rw- 1 x None 39122 2024-09-19 16:00 154 -rw-rw-rw- 1 x None 10617 2024-09-19 16:00 155 -rw-rw-rw- 1 x None 32890 2024-09-19 16:00 156 -rw-rw-rw- 1 x None 34388 2024-09-19 16:00 157 -rw-rw-rw- 1 x None 14204 2024-09-19 16:00 158 -rw-rw-rw- 1 x None 15540 2024-09-19 16:00 159 -rw-rw-rw- 1 x None 16822 2024-09-19 16:00 160 -rw-rw-rw- 1 x None 8825 2024-09-19 16:00 161 -rw-rw-rw- 1 x None 6727 2024-09-19 16:00 162 -rw-rw-rw- 1 x None 6521 2024-09-19 16:00 163 -rw-rw-rw- 1 x None 934797 2024-09-19 16:00 164 -rw-rw-rw- 1 x None 11879 2024-09-19 16:00 165 -rw-rw-rw- 1 x None 8935 2024-09-19 16:00 166 -rw-rw-rw- 1 x None 3363 2024-09-19 16:00 167 -rw-rw-rw- 1 x None 36427 2024-09-19 16:00 168 -rw-rw-rw- 1 x None 2109 2024-09-19 16:00 169 -rw-rw-rw- 1 x None 1886 2024-09-19 16:00 170 -rw-rw-rw- 1 x None 6534 2024-09-19 16:00 171 -rw-rw-rw- 1 x None 46503 2024-09-19 16:00 172 -rw-rw-rw- 1 x None 44079 2024-09-19 16:00 173 -rw-rw-rw- 1 x None 54344 2024-09-19 16:00 174 -rw-rw-rw- 1 x None 52465 2024-09-19 16:00 175 -rw-rw-rw- 1 x None 62311 2024-09-19 16:00 176 -rw-rw-rw- 1 x None 61752 2024-09-19 16:00 177 -rw-rw-rw- 1 x None 8929 2024-09-19 16:00 178 -rw-rw-rw- 1 x None 9823 2024-09-19 16:00 179 -rw-rw-rw- 1 x None 237754 2024-09-19 16:00 180 -rw-rw-rw- 1 x None 237022 2024-09-19 16:00 181 -rw-rw-rw- 1 x None 49595 2024-09-19 16:00 182 -rw-rw-rw- 1 x None 53055 2024-09-19 16:00 183 -rw-rw-rw- 1 x None 56433 2024-09-19 16:00 184 -rw-rw-rw- 1 x None 13062 2024-09-19 16:00 185 -rw-rw-rw- 1 x None 17499 2024-09-19 16:00 186 10403078 I get a lot more data---10,403,078 bytes. So it makes me feel that Gnus is not at fault here; that it's the POP3 server that sometimes advertises a total amount, but ends up providing a lot more than the advertised value. I wouldn't assume this is an obvious bug of any POP3 server, but it's what the evidence seems to suggest---that the Gmail POP3 server says one thing and does another. (*) How I generated the log in *messages* I added a (message "...") call to the procedure pop3-wait-for-messages. (defun pop3-wait-for-messages (process count total-size start-point) (while (> count 0) (goto-char start-point) (while (or (and (re-search-forward "^\\+OK" nil t) (or (not total-size) (re-search-forward "^\\.\r?\n" nil t))) (re-search-forward "^-ERR " nil t)) (cl-decf count) (setq start-point (point))) (unless (memq (process-status process) '(open run)) (error "pop3 process died")) (when total-size (let ((size 0)) (goto-char (point-min)) (while (re-search-forward "^\\+OK.*\n" nil t) (setq size (+ size (- (point)) (if (re-search-forward "^\\.\r?\n" nil 'move) (match-beginning 0) (point))))) (message "pop3 retrieved %dKB (%d%%)" (truncate (/ size 1000)) (truncate (* (/ (* size 1.0) total-size) 100))))) (pop3-accept-process-output process)) start-point)