Your message dated Thu, 14 Aug 2014 11:41:29 -0700
with message-id <[email protected]>
and subject line Re: /bin/fgrep: Huge memory consumption
has caused the Debian Bug report #520446,
regarding /bin/fgrep: Huge memory consumption
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
520446: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520446
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: grep
Version: 2.5.4-2
Severity: important
File: /bin/fgrep


Hello. I have two files, foo and bar. Both files contains only digits 
and newlines. I tried to find those lines from bar, which doesnt match 
any lines from foo.

Some characteristics:

$ ls -l foo bar
-rw-r--r-- 1 rekcahx rekcahx 132M 2009-03-19 15:21 bar
-rw-r--r-- 1 rekcahx rekcahx 122M 2009-03-19 15:19 foo

$ wc -l foo bar
   253362 bar
     2604 foo
   255966 total

$ fgrep -v -f foo bar >output

My system crashed when fgrep ate all memory (8 GB) and swap (16 GB). 

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26 (SMP w/4 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages grep depends on:
ii  libc6                         2.9-4      GNU C Library: Shared libraries

grep recommends no packages.

grep suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message --- I can't reproduce the bug with grep 2.16 as installed on Ubuntu 14.04 (see below) and expect that the bug, whatever it was, was fixed long ago in grep. So let's close the bug.

$ shuf -i 0-999999 -n 2604 >foo
$ shuf -i 0-999999 -n 253362 >bar
$ valgrind fgrep -v -f foo bar >output
==18590== Memcheck, a memory error detector
==18590== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==18590== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==18590== Command: fgrep -v -f foo bar
==18590==
==18590==
==18590== HEAP SUMMARY:
==18590==     in use at exit: 835,849 bytes in 198 blocks
==18590==   total heap usage: 255 allocs, 57 frees, 895,125 bytes allocated
==18590==
==18590== LEAK SUMMARY:
==18590==    definitely lost: 0 bytes in 0 blocks
==18590==    indirectly lost: 0 bytes in 0 blocks
==18590==      possibly lost: 0 bytes in 0 blocks
==18590==    still reachable: 835,849 bytes in 198 blocks
==18590==         suppressed: 0 bytes in 0 blocks
==18590== Rerun with --leak-check=full to see details of leaked memory
==18590==
==18590== For counts of detected and suppressed errors, rerun with: -v
==18590== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
$ wc -l foo bar output
   2604 foo
 253362 bar
 246822 output
 502788 total
$ fgrep --version
fgrep (GNU grep) 2.16
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
--- End Message ---

Reply via email to