From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.bugs Subject: bug#25549: 25.1; eshell grep gives inconsistent output Date: Mon, 30 Jan 2017 15:29:59 +0000 Message-ID: <67846bdbfe1187275be95e9d7a5babff@10.12.2.250> References: <87tw8lzdaj.fsf@it-alanm.williamson-tn.org> <874m0hsrqb.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1485790281 16595 195.159.176.226 (30 Jan 2017 15:31:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2017 15:31:21 +0000 (UTC) User-Agent: RoundCube Webmail/0.3-stable Cc: 25549@debbugs.gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 30 16:31:12 2017 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 1cYDvD-0003wF-4r for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2017 16:31:11 +0100 Original-Received: from localhost ([::1]:33384 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYDvI-0002ub-Ge for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2017 10:31:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYDv8-0002tW-IA for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 10:31:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYDv4-0003Lm-9I for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 10:31:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53089) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYDv4-0003Lf-5W for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 10:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cYDv3-00018E-VI for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 10:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Jan 2017 15:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25549 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible moreinfo Original-Received: via spool by 25549-submit@debbugs.gnu.org id=B25549.14857902054235 (code B ref 25549); Mon, 30 Jan 2017 15:31:01 +0000 Original-Received: (at 25549) by debbugs.gnu.org; 30 Jan 2017 15:30:05 +0000 Original-Received: from localhost ([127.0.0.1]:51288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYDu9-00016F-79 for submit@debbugs.gnu.org; Mon, 30 Jan 2017 10:30:05 -0500 Original-Received: from ham1-4.dnslinks.net ([74.86.15.251]:34777 helo=ham1.dnslinks.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYDu6-00015f-CA for 25549@debbugs.gnu.org; Mon, 30 Jan 2017 10:30:03 -0500 Original-Received: (qmail 1129 invoked from network); 30 Jan 2017 15:29:51 -0000 Original-Received: from unknown (HELO 67.228.73.20) (10.13.148.196) by localhost with SMTP; 30 Jan 2017 15:29:51 -0000 Original-Received: from 72.237.174.2 [72.237.174.2] with HTTP/1.1 (POST); Mon, 30 Jan 2017 15:29:59 +0000 In-Reply-To: <874m0hsrqb.fsf@users.sourceforge.net> X-Sender: me@alandmoore.com 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:128788 Archived-At: On Sun, 29 Jan 2017 12:25:48 -0500, npostavs@users.sourceforge.net wrote: > tags 25549 moreinfo unreproducible > quit > > me@alandmoore.com writes: > >> When using grep on a large file in eshell, the output is sometimes >> inconsistent. For example, when grepping for a string in my >> server's apache2 access log (~5 MB) I got anywhere from around 200 to >> around 1300 results, just running the same grep command over and over >> (the file itself was not changing significantly). >> >> The bug cannot be consistently reproduced, but has happened in multiple >> situations and others have reportedly reproduced it per discussion on >> reddit >> (https://www.reddit.com/r/emacs/comments/5qbd70/trampeshellgrep_returning_wildly_different/). > > Could you give some hints on what is needed to reproduce this? Is it > the size of the grepped file? Number of matches? Are there some > non-ascii characters in the file? Is Tramp required (the first post in > the linked thread mentions it, but some other comments seem to suggest > it's not required)? You mention the file was not changing > "significantly", does this happen also when file stays *exactly* > identical? > > I tried doubling up xdisp.c until it was over 5 MB, but grepping for "int" > in eshell returned a consistent number of matches. It seems I and others were able to reproduce it locally, but it was much harder to do so. The problem seems much more pronounced when tramp is involved. It also seems to matter that the file is being written to. I discovered it when grepping a fairly active apache access log (being written to maybe 40-60 times a minute, on average). I am able to consistently reproduce the bug with this file, even when local to the server (though it's far less pronounced when local). I have not been successful reproducing it with a file that is not changing at all. I have asked the others who confirmed the bug on reddit to comment with their observations as well.