buggrep - Bugs: bug #9886, 'memory exhausted' error on very...


You are not allowed to post comments on this tracker with your current authentication level.

bug #9886: 'memory exhausted' error on very long lines

Submitted by:  None
Submitted on:  Wed 04 Aug 2004 06:10:43 PM UTC  
Votes:  150  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Fri 04 Dec 2009 07:46:35 PM UTC, comment #2:

grep is really a line-based tool, cannot fix this.

Paolo Bonzini <bonzini>
  Spam posted by dimon1
  Spam posted by scuko
  Spam posted by dayatakoy
Fri 23 May 2008 09:35:57 AM UTC, comment #1:

I've just tested this example. I've not got any error, but the memory usage was about 84% during execution. It seems to me that bug was fixed.
mp3 download store

-Deleted Account- <scuko>
Wed 04 Aug 2004 06:10:43 PM UTC, original submission:

I've seen discussions and various patches on the web for this problem, but I'm wondering why it hasn't been fixed within the main source tree. I'm trying search the output of strings run on a hard drive image (dd). The output from strings includes several very long lines. It seems that when grep hits these lines, it is unable to load the entire line into memory and dies.

This can be tested as follows:
dd bs=1 seek=1000000000 of=bigFile < /dev/null
cat bigFile | grep "test"

It seems to me that grep needs to be smarter with it's memory allocation instead of assuming that it can always simply read up to a newline into memory.

Is any work being done on this or is there an alternative to grep that I should use instead?



No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bonzini (Posted a comment)
  • -email is unavailable- added by dimon1 (Posted a comment)
  • -email is unavailable- added by dayatakoy (Posted a comment)
  • -email is unavailable- added by scuko (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 150 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Fri 04 Dec 2009 07:46:35 PM UTC bonzini StatusNone => Wont Fix
        Open/ClosedOpen => Closed
    Fri 18 May 2007 01:33:51 PM UTC loisch Carbon-Copy- => Added loisch
    Wed 22 Nov 2006 02:42:36 PM UTC twaugh Carbon-Copy- => Added twaugh
    Mon 11 Apr 2005 10:43:58 PM UTC julianfoad Summary'memory exhasted' error on very long lines => 'memory exhausted' error on very long lines

    Back to the top

    Powered by Savane 3.3