GNU bug report logs - #76291
BUG: grep sometimes spits out random garbage in the moddle of results

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: grep; Reported by: php fan <php4fan@HIDDEN>; dated Fri, 14 Feb 2025 17:01:02 UTC; Maintainer for grep is bug-grep@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Feb 2025 17:00:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 12:00:04 2025
Received: from localhost ([127.0.0.1]:51441 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tiz2q-0001oN-8g
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2025 12:00:04 -0500
Received: from lists.gnu.org ([2001:470:142::17]:36474)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <php4fan@HIDDEN>) id 1tiyYu-0000MW-I7
 for submit <at> debbugs.gnu.org; Fri, 14 Feb 2025 11:29:09 -0500
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 <php4fan@HIDDEN>) id 1tiyYe-0005OF-5c
 for bug-grep@HIDDEN; Fri, 14 Feb 2025 11:28:52 -0500
Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <php4fan@HIDDEN>) id 1tiyYc-00022l-9v
 for bug-grep@HIDDEN; Fri, 14 Feb 2025 11:28:51 -0500
Received: by mail-lf1-x12c.google.com with SMTP id
 2adb3069b0e04-545284eac3bso900896e87.0
 for <bug-grep@HIDDEN>; Fri, 14 Feb 2025 08:28:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739550527; x=1740155327; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=AOauQOk+YLQBupHbVSf2ALAHOw8Md5bclxt8ePDMpyM=;
 b=Ix3LrnLad95yIwTMIo0CdkwxcsRfHLRof+/zZWE2HNmXZLSrus3Dk5AZh779XEOMH/
 Hn4GbaxpaDxvoMSmu66Kn1Ugldnf503ZU66qePWQ0gGfjKdosZXxnYrfrSl0nTtp4o0a
 ogCKSAkdMdRuUTmbyLT3ftBdaNwvRYY9tVjJtpTt6A8AwweGpST/qkd54dCB/gEjGVpD
 g/oAAUf65q3qH0qRsnZ8BdyuPg7+GOBcSTokVaffkWcMI3TGaHW3RnBSO6jLuqT/Dtdt
 Dw1vYdcapdN+T89u0U77/ZsKBxZkNfpY8RTGvROXXiK5FBY59k2+p+FSE8GPA1uhZNiT
 HiQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739550527; x=1740155327;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=AOauQOk+YLQBupHbVSf2ALAHOw8Md5bclxt8ePDMpyM=;
 b=Mcjpx0yepvUzit3Ud1VPkABES8vXX9unygOec8Rup0/+AehVscGLnfmkvHcMCOQCYh
 JvgaMxeppg4hINukLoszLyAaecw07nGYf4vIQyzZ90lPvYsDFvy69zQWUYtnkJbaNTT5
 v1gYDgR79HnmbpKLxs+BBuP9yIVX+3gXQCTu6VgfXaGgOLHIVOhYyq/L99nvgTbdXLXI
 HLmQWQjIYFxVRY4GYOk/6rEn8Y2wdIGoc+CNyjmhXvizyfu49NIyYm4BH3BbAgV3MJ+L
 VhN13utrWB1mnaNUjBL9yPtMelBIy6uqwO5RiEJO8ChFOHdvis4i+/H4xGG26UpPRcH5
 Gh/Q==
X-Gm-Message-State: AOJu0YwQ5sQV+4vL1fTAsxVRtEMoEhpY8V/RwLQYvPenlrn4w6Z16so4
 fRp40TObKH59+HA/Pa503XzOfN4NKxn++reH7QuLKlnsFdmAiXsHy43+TKqcpuegppcHKU09Sjb
 yWPnntlEHAoviz1jiAMowhbVjGPUlRQ==
X-Gm-Gg: ASbGncs7LcLFufTfUptuc9JPjSnoWm1y13dw6FNKYjkV5omnsLm5OakfOiFSuWrtfJd
 gqF0wLnAqlzobLEuRyiUy2UZp6UNWpG860CNUQe5fm0LQNITJR7ukn/MGhOzKMhxBCR8Xhq5GWQ
 ==
X-Google-Smtp-Source: AGHT+IE0GWorKgyduDDF6m4ENMiMc1pMffco/Q6JFMSISVkk2xA6Td93AcqV4YP+ndkkV7kg/4Ekp08pkwRDuwwKmc0=
X-Received: by 2002:a05:6512:3d01:b0:545:285f:cd7f with SMTP id
 2adb3069b0e04-545285fce62mr1011872e87.14.1739550526865; Fri, 14 Feb 2025
 08:28:46 -0800 (PST)
MIME-Version: 1.0
From: php fan <php4fan@HIDDEN>
Date: Fri, 14 Feb 2025 17:28:35 +0100
X-Gm-Features: AWEUYZlLJHq1gAW41rwAqoe9IWJ5ZdKusF9aZGv7miD3fxOjBoVv-GiRxjT3A-c
Message-ID: <CAPxO=jv6vUTpVOc_ezr_nxsbdgtAYnT+uujqvCwCpGw1uwBKuA@HIDDEN>
Subject: BUG: grep sometimes spits out random garbage in the moddle of results
To: bug-grep@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::12c;
 envelope-from=php4fan@HIDDEN; helo=mail-lf1-x12c.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 14 Feb 2025 11:59:58 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

I have no idea what triggers this, so I haven't been able to produce a
minimal reproducing example; and I can't share the actual folder with
which this happens to me all the time.

Sometimes I use "grep -R" on a folder with several repositories, and
after a few legitimate results, I get a blob of dozens of lines of
text, coming from several files, with no indication of the file they
belong to, and which often don't match the pattern.

For example:

```
$ grep -R foo
path/to/file1.txt: lorem ipsum foo bar
path/to/file2.txt: lalalalala foo lalalala
   and here's a blob of totally unrelated text
   that doen't contain the string
   who knows where this comes from
   lalalallaal lorem ipsum dolor sit amet
```

I am NOT talking about the case where you have a file that is one very
long line that matches, so you get basically the whole file in the
output and it gets wrapped. In that case, it will still start with the
path of the file followed by a colon. Not in this case.




Acknowledgement sent to php fan <php4fan@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-grep@HIDDEN. Full text available.
Report forwarded to bug-grep@HIDDEN:
bug#76291; Package grep. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 14 Feb 2025 17:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.