From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62216: Narrowed the issue to one line Date: Sun, 20 Aug 2023 18:26:33 +0300 Message-ID: <83jztpwx92.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30271"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62216@debbugs.gnu.org To: Jonathon McKitrick , Po Lu , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 20 17:27:15 2023 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 1qXkKg-0007fP-Th for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Aug 2023 17:27:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXkKT-0000Kn-Vw; Sun, 20 Aug 2023 11:27:02 -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 1qXkKS-0000Kd-Op for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 11:27:00 -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 1qXkKS-0001Re-H0 for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 11:27:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXkKT-0001hQ-Pe for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 11: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: Sun, 20 Aug 2023 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62216 X-GNU-PR-Package: emacs Original-Received: via spool by 62216-submit@debbugs.gnu.org id=B62216.16925451896491 (code B ref 62216); Sun, 20 Aug 2023 15:27:01 +0000 Original-Received: (at 62216) by debbugs.gnu.org; 20 Aug 2023 15:26:29 +0000 Original-Received: from localhost ([127.0.0.1]:54617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXkJw-0001gd-Ob for submit@debbugs.gnu.org; Sun, 20 Aug 2023 11:26:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXkJu-0001gP-Jh for 62216@debbugs.gnu.org; Sun, 20 Aug 2023 11:26:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXkJm-0001NB-Ha; Sun, 20 Aug 2023 11:26:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=F31Id6fmiy75GnjmcpGj1+tQHmrXFmHjXyVesinWsMI=; b=EE6vA5uK0PnL Khhq7/kuW3y0GjnrDJb8N+4HJJNBPR5YNUK/OmO01+6+WxkD8nK5IgUXgRlKQRpZxeLI/Sollwyoa QR6EYruJ+WfuPx/Zdp6DS0NHw2J3kQdiebKDFmSzxLvacB8BRb+pVbEv3xDktD2zqnVbLdzdz1ZSi u3u9n8/e32i7W8SLfVYJYh69sSmM2urHv5k2V0SwkRkhsrmOn1qcX5LeN2k5UMw48+xP98y3KIvks l4co+6gbBLQtLJL5d03MjP+hsZDpQyhfCoQrFWZIQKAu7/Vty+bYYrdQaJbLOFVH7VIvpdHgMQYNm 0rlESlTe1h5g/+8gS1lRow==; In-Reply-To: (bug-gnu-emacs@gnu.org) 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:268002 Archived-At: > Date: Sun, 20 Aug 2023 13:38:26 +0000 > From: Jonathon McKitrick via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Progress! > > This line is the culprit, around 4807: > > ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE); > > When I replace it with this, from an older version: > > ptrdiff_t trytry = min (total - inserted, READ_BUF_SIZE); > > The problem disappears. > > This change was made to address bug #9800, when inserting large files from /proc. > > I don't understand the code well enough to understand why this change is causing the issue I'm seeing, > or if my 'fix' will break something else. I just know it's working for me and doesn't seem to cause issues otherwise. > However, it ignores 'gap_size', so I'm pretty sure that's not the correct way to fix this code. > Maybe it should be used 2 lines below? Again, I don't have the context to do anything but guess. > > I'll keep testing locally, but I'd be interested in feedback on this change. Po Lu, Paul: any idea why that could be the case in the OP's scenario? The only thing that comes to my mind is some weirdness of the OP's filesystem.