From unknown Wed Jun 18 23:08:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21527 <21527@debbugs.gnu.org> To: bug#21527 <21527@debbugs.gnu.org> Subject: Status: avoiding "memory exhausted" in 2.5.4? Reply-To: bug#21527 <21527@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:08:35 +0000 retitle 21527 avoiding "memory exhausted" in 2.5.4? reassign 21527 grep submitter 21527 Aaron Davies severity 21527 normal tag 21527 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 20 17:47:36 2015 Received: (at submit) by debbugs.gnu.org; 20 Sep 2015 21:47:36 +0000 Received: from localhost ([127.0.0.1]:39272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdmSN-000550-RE for submit@debbugs.gnu.org; Sun, 20 Sep 2015 17:47:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40416) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdmSL-00054s-6U for submit@debbugs.gnu.org; Sun, 20 Sep 2015 17:47:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdmSJ-0006AA-UI for submit@debbugs.gnu.org; Sun, 20 Sep 2015 17:47:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdmSJ-0006A5-Jh for submit@debbugs.gnu.org; Sun, 20 Sep 2015 17:47:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdmSI-0004QQ-PA for bug-grep@gnu.org; Sun, 20 Sep 2015 17:47:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdmSF-00068m-SE for bug-grep@gnu.org; Sun, 20 Sep 2015 17:47:30 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:34620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdmSF-00068a-On for bug-grep@gnu.org; Sun, 20 Sep 2015 17:47:27 -0400 Received: by qgez77 with SMTP id z77so77006802qge.1 for ; Sun, 20 Sep 2015 14:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=yIdcIk2F4mOJP40WlLsZ0ApUb5Ai1sl49454zqIvXng=; b=CeDPOfxFwmMe0CmxwqZgb3z1sZfN2lVtrdNjkKJcROg2uvOzx1i/S8iTktXBRr/3dQ Wcd33g8F8CX/xU8O352swvANylSImyF+O2rexnFVVd8N3wcjuv88q+rEkxV8mQDUkRRh T4z8ew28Blctp1ydOn3PCwkWfaIwSZ+5Nu0dL0spL/XsR7jewgrX4gYiv55RmwZHOmjR 8cbl3RPpS+YRcc9SumOaumUkr94DpG95fJLBBAuD8hRokq705oTQvnNxYcaTLmfun88G 7SjCX6LxJvePwJ9n7nUFuPMrO8hH2cDNoNbcOcSNeM+NmMLGxOpCTmc/mTWhC81P1+E8 K2eA== X-Received: by 10.140.108.202 with SMTP id j68mr18551253qgf.101.1442785647373; Sun, 20 Sep 2015 14:47:27 -0700 (PDT) Received: from [192.168.1.151] (pool-108-35-5-101.nwrknj.fios.verizon.net. [108.35.5.101]) by smtp.gmail.com with ESMTPSA id k32sm8644859qkh.39.2015.09.20.14.47.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Sep 2015 14:47:26 -0700 (PDT) From: Aaron Davies Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: avoiding "memory exhausted" in 2.5.4? Message-Id: Date: Sun, 20 Sep 2015 17:47:24 -0400 To: bug-grep@gnu.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) i'm trying to grep an entire volume for a short, fixed string, but no = matter what i do, i keep getting "grep: memory exhausted" errors the only versions i have immediately available to me are 2.5.4 and and = earlier; i can probably get an upgrade to the current one installed = eventually, but it will take some time since the string is fixed, i'm using -F i've tried both with and without --mmap i've tried both a -r recursive grep and separate runs using find = -print0|xargs -r0 grep since i'm really only interested in finding the file containing the = string and if might be a binary file, i've also tried with and without = -z on the theory that the problem was binaries without newlines, and NUL = was more likely to occur than newline in such files (a suggestion i = found online) none of it's helped -- they all fail with "memory exhausted" at some = point does anyone have any other suggestions as to how to solve this? is it = something fixed in a more recent grep? is there some other set of tools = i could be using instead? i'm currently working on getting some statistics on the line lengths = (whether delimited by \n or \0) of the files involved, but that may take = a bit of time --=20 Aaron Davies aaron.davies@gmail.com= From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 02:16:27 2015 Received: (at 21527) by debbugs.gnu.org; 21 Sep 2015 06:16:27 +0000 Received: from localhost ([127.0.0.1]:39403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZduOo-0008Lp-Uk for submit@debbugs.gnu.org; Mon, 21 Sep 2015 02:16:27 -0400 Received: from mail-qg0-f54.google.com ([209.85.192.54]:35748) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZduOm-0008Lh-NA for 21527@debbugs.gnu.org; Mon, 21 Sep 2015 02:16:25 -0400 Received: by qgt47 with SMTP id 47so81696372qgt.2 for <21527@debbugs.gnu.org>; Sun, 20 Sep 2015 23:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=yj6p2nxaunJH/NJdIt0P6IRyHGNgWbLKQHVEARVH1Lk=; b=zZnUUoAFlcf5cOzUAF88FU3MEKclzMcarsBAx0t1VxgsNP6z4SuDEAGyeV74M/GGc9 Ie6egOROk43vmDeeXwIBFanp3d7I0fcFUm2Qxm2yYS64DjgtpLS8bEwJ5/CxaYSArPM3 YL4PWv6qkIA9NQU99aS1yWHqagXwtshO018Vm9bSS9+Q4DIDYkJnnaySb1yRFg61noIN 23CfAhooTej2YAd5fYsNb+APJorErrDX+coWKIm8oAAgVrZ5xCoBs4cjfx96p9+vqDdr AsiJ9R5BXTr0kUfHmm/i/6NB33nqayJD4rad+2JPXgE+uxypRMVEv6XXgFlkRrB7YHQ1 gREw== X-Received: by 10.140.235.216 with SMTP id g207mr21357909qhc.98.1442816184066; Sun, 20 Sep 2015 23:16:24 -0700 (PDT) Received: from [192.168.1.151] (pool-108-35-5-101.nwrknj.fios.verizon.net. [108.35.5.101]) by smtp.gmail.com with ESMTPSA id 65sm9258778qhu.11.2015.09.20.23.16.22 for <21527@debbugs.gnu.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Sep 2015 23:16:23 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: bug#21527: avoiding "memory exhausted" in 2.5.4? From: Aaron Davies In-Reply-To: Date: Mon, 21 Sep 2015 02:16:21 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <353D67E8-0987-4311-B273-E889DBB4A54F@gmail.com> References: To: "21527@debbugs.gnu.org" <21527@debbugs.gnu.org> X-Mailer: Apple Mail (2.2104) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21527 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sep 20, 2015, at 5:47 PM, Aaron Davies = wrote: > i'm trying to grep an entire volume for a short, fixed string, but no = matter what i do, i keep getting "grep: memory exhausted" errors >=20 > the only versions i have immediately available to me are 2.5.4 and and = earlier; i can probably get an upgrade to the current one installed = eventually, but it will take some time >=20 > since the string is fixed, i'm using -F >=20 > i've tried both with and without --mmap >=20 > i've tried both a -r recursive grep and separate runs using find = -print0|xargs -r0 grep >=20 > since i'm really only interested in finding the file containing the = string and if might be a binary file, i've also tried with and without = -z on the theory that the problem was binaries without newlines, and NUL = was more likely to occur than newline in such files (a suggestion i = found online) >=20 > none of it's helped -- they all fail with "memory exhausted" at some = point >=20 > does anyone have any other suggestions as to how to solve this? is it = something fixed in a more recent grep? is there some other set of tools = i could be using instead? >=20 > i'm currently working on getting some statistics on the line lengths = (whether delimited by \n or \0) of the files involved, but that may take = a bit of time i forgot to mention, i'm also using -l on all these--i don't care about = the line the string is found in (which may not even be a meaningful = concept with binary files), only the file --=20 Aaron Davies aaron.davies@gmail.com= From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 04:03:07 2015 Received: (at 21527) by debbugs.gnu.org; 21 Sep 2015 08:03:07 +0000 Received: from localhost ([127.0.0.1]:39473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zdw43-0002Oo-9R for submit@debbugs.gnu.org; Mon, 21 Sep 2015 04:03:07 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:33702) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zdw41-0002Og-Kq for 21527@debbugs.gnu.org; Mon, 21 Sep 2015 04:03:06 -0400 Received: by iofh134 with SMTP id h134so111537119iof.0 for <21527@debbugs.gnu.org>; Mon, 21 Sep 2015 01:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=QWGU7UL243qzjVxCAxkX21jsTWKJeWaBmIBRHfCWVC0=; b=jkISYrNJLbvvlFyt09CmR4yvqJo2XeVfyIgDEnjjMSUEdZ0lFKrzp6yQ95ZmfAjJuv Ig8pGRlcetiAeBnH7lLNur6daiOhl6+fFo+d9MYMRY2gFH9hOj02BlRS4kyPO9rpgERj En0XiX0FYxbSFkgyUNJRt4Y+BffvUB97NfVB6arcaJ+KPnl3WqeXNSpPGruU4mTwSQfO pICgTsC1uqeXXvQDLJ+8r7vDF21L3NHMCeTGKjK2JqiPWeuvwEbDS3Mdndajt9Bb35Hv EOpB3Tk6UgSeTo/Oh2N93ijbDaNYWqtYKrgmnYT3IHrKGqHyIoByq51oa/zw2DmAQvnW EuuA== X-Received: by 10.107.9.79 with SMTP id j76mr25051796ioi.40.1442822585072; Mon, 21 Sep 2015 01:03:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.137.136 with HTTP; Mon, 21 Sep 2015 01:02:45 -0700 (PDT) In-Reply-To: <353D67E8-0987-4311-B273-E889DBB4A54F@gmail.com> References: <353D67E8-0987-4311-B273-E889DBB4A54F@gmail.com> From: Jim Meyering Date: Mon, 21 Sep 2015 09:02:45 +0100 X-Google-Sender-Auth: iBS0LULbv0ZawVvOmRKKU-4PDkM Message-ID: Subject: Re: bug#21527: avoiding "memory exhausted" in 2.5.4? To: Aaron Davies Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21527 Cc: "21527@debbugs.gnu.org" <21527@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Sep 21, 2015 at 7:16 AM, Aaron Davies wrot= e: > On Sep 20, 2015, at 5:47 PM, Aaron Davies wrote: > >> i'm trying to grep an entire volume for a short, fixed string, but no ma= tter what i do, i keep getting "grep: memory exhausted" errors >> >> the only versions i have immediately available to me are 2.5.4 and and e= arlier; i can probably get an upgrade to the current one installed eventual= ly, but it will take some time >> >> since the string is fixed, i'm using -F >> >> i've tried both with and without --mmap >> >> i've tried both a -r recursive grep and separate runs using find -print0= |xargs -r0 grep >> >> since i'm really only interested in finding the file containing the stri= ng and if might be a binary file, i've also tried with and without -z on th= e theory that the problem was binaries without newlines, and NUL was more l= ikely to occur than newline in such files (a suggestion i found online) >> >> none of it's helped -- they all fail with "memory exhausted" at some poi= nt >> >> does anyone have any other suggestions as to how to solve this? is it so= mething fixed in a more recent grep? is there some other set of tools i cou= ld be using instead? 2.5.4 is more than 6 years old. Please try the latest release, grep-2.21. There have been many improvements (at least 16 stable releases) since 2.5.4= . From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 31 03:55:23 2015 Received: (at control) by debbugs.gnu.org; 31 Dec 2015 08:55:23 +0000 Received: from localhost ([127.0.0.1]:50938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEZ11-0005OJ-J5 for submit@debbugs.gnu.org; Thu, 31 Dec 2015 03:55:23 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41868) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEZ0z-0005O1-Ht for control@debbugs.gnu.org; Thu, 31 Dec 2015 03:55:21 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2C836160ED6 for ; Thu, 31 Dec 2015 00:55:16 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Dsi6TvFEL1b3 for ; Thu, 31 Dec 2015 00:55:15 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4FFD0160ED7 for ; Thu, 31 Dec 2015 00:55:15 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EnJ9ehm4awCT for ; Thu, 31 Dec 2015 00:55:15 -0800 (PST) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3587F160ED6 for ; Thu, 31 Dec 2015 00:55:15 -0800 (PST) To: control@debbugs.gnu.org From: Paul Eggert Subject: grep bug maintenance Organization: UCLA Computer Science Department Message-ID: <5684ED73.6060403@cs.ucla.edu> Date: Thu, 31 Dec 2015 00:55:15 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) severity 22059 wishlist severity 21865 wishlist close 22278 close 22279 close 21755 close 21700 tags 21554 wontfix tags 21527 moreinfo From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 17:40:31 2016 Received: (at 21527-done) by debbugs.gnu.org; 24 Sep 2016 21:40:32 +0000 Received: from localhost ([127.0.0.1]:34837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnugR-00046o-Pf for submit@debbugs.gnu.org; Sat, 24 Sep 2016 17:40:31 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnugQ-00046Z-98 for 21527-done@debbugs.gnu.org; Sat, 24 Sep 2016 17:40:30 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id EA52D1607DC; Sat, 24 Sep 2016 14:40:24 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id UZLXdhO8ELme; Sat, 24 Sep 2016 14:40:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 42B1916111F; Sat, 24 Sep 2016 14:40:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gXb4O7JdAnoj; Sat, 24 Sep 2016 14:40:24 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.191.53]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2541C1607DC; Sat, 24 Sep 2016 14:40:24 -0700 (PDT) To: Aaron Davies From: Paul Eggert Subject: Re: avoiding "memory exhausted" in 2.5.4? Organization: UCLA Computer Science Department Message-ID: <9dec6501-52df-8eb6-8c0d-88aaf9369acf@cs.ucla.edu> Date: Sat, 24 Sep 2016 14:40:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 21527-done Cc: 21527-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.1 (---) No further comment and it has been about a year. Closing the bug report. From unknown Wed Jun 18 23:08:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Oct 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator