Bug 202282 - grep error aborts when scanning large files
grep error aborts when scanning large files
Product: Fedora
Classification: Fedora
Component: grep (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Stepan Kasal
Depends On:
Blocks: FC6Update
  Show dependency treegraph
Reported: 2006-08-11 20:16 EDT by David Chambers
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-09 15:49:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Chambers 2006-08-11 20:16:48 EDT
Description of problem:

grep error aborts when scanning large files

Version-Release number of selected component (if applicable):

kernel-2.6.17-1.2548.fc6   (i386 smp)

How reproducible:
every time

Steps to Reproduce:
1. grep -i a_word a_very_large_iso_file (e.g. FC6 iso file)

Actual results:
*** glibc detected *** grep: free(): invalid next size (fast): 0x08c57240 ***
======= Backtrace: =========
======= Memory map: ========
0095a000-00973000 r-xp 00000000 03:02 5898256    /lib/ld-2.4.90.so
00973000-00974000 r-xp 00018000 03:02 5898256    /lib/ld-2.4.90.so
00974000-00975000 rwxp 00019000 03:02 5898256    /lib/ld-2.4.90.so
00c22000-00d53000 r-xp 00000000 03:02 5898263    /lib/libc-2.4.90.so
00d53000-00d55000 r-xp 00131000 03:02 5898263    /lib/libc-2.4.90.so
00d55000-00d56000 rwxp 00133000 03:02 5898263    /lib/libc-2.4.90.so
00d56000-00d59000 rwxp 00d56000 00:00 0
07773000-0777e000 r-xp 00000000 03:02 5898291    /lib/libgcc_s-4.1.1-20060802.so.1
0777e000-0777f000 rwxp 0000a000 03:02 5898291    /lib/libgcc_s-4.1.1-20060802.so.1
07f8b000-07fa7000 r-xp 00000000 03:02 5898404    /lib/libpcre.so.0.0.1
07fa7000-07fa8000 rwxp 0001b000 03:02 5898404    /lib/libpcre.so.0.0.1
08048000-0805b000 r-xp 00000000 03:02 6185021    /bin/grep
0805b000-0805d000 rwxp 00013000 03:02 6185021    /bin/grep
08c56000-08c77000 rwxp 08c56000 00:00 0
b7800000-b7821000 rwxp b7800000 00:00 0
b7821000-b7900000 --xp b7821000 00:00 0
b7902000-b7b04000 rwxp b7902000 00:00 0
b7cec000-b7eec000 r-xp 00000000 03:02 5861377    /usr/lib/locale/locale-archive
b7eec000-b7eed000 rwxp b7eec000 00:00 0
b7eff000-b7f06000 r-xs 00000000 03:02 30488816   /usr/lib/gconv/gconv-modules.cache
b7f06000-b7f07000 rwxp b7f06000 00:00 0
b7f07000-b7f08000 r-xp b7f07000 00:00 0          [vdso]
bfb21000-bfb36000 rw-p bfb21000 00:00 0          [stack]

Expected results:
Either finds a match or doesn't.  Should not error out - makes it impossible to
"grep -ir" an entire directory of mixed files.

Additional info:
Could be a glibc bug?  please reassign if you think it is!
Comment 1 Tim Waugh 2006-08-15 06:03:57 EDT
Think this is the FC6 version of bug #198167.
Comment 2 Vic 2006-11-28 11:25:27 EST
I'm investigating this bug in the RHEL4 code tree.

It is caused by the grep-2.5.1-dfa-optional.patch changes; removing this patch
from the spec file leads to something that works properly.

Alternatively, setting GREP_USE_DFA=1 in the environment makes dfa functional,
and everything is fine. Setting GREP_USE_DFA=0 or undefined causes the abort

I haven't yet found out exactly what's happening - I'll update this ticket if I
discover anything new.

Comment 3 Tim Waugh 2006-11-28 11:55:00 EST
Thanks.  FWIW, my comment #1 was incorrect -- bug #198167 is altogether different.
Comment 4 Matthew Miller 2007-04-06 12:53:55 EDT
Fedora Core 5 and Fedora Core 6 are, as we're sure you've noticed, no longer
test releases. We're cleaning up the bug database and making sure important bug
reports filed against these test releases don't get lost. It would be helpful if
you could test this issue with a released version of Fedora or with the latest
development / test release. Thanks for your help and for your patience.

[This is a bulk message for all open FC5/FC6 test release bugs. I'm adding
myself to the CC list for each bug, so I'll see any comments you make after this
and do my best to make sure every issue gets proper attention.]
Comment 5 David Chambers 2007-04-09 15:49:31 EDT
Bug seems to be gone :-)

I Tested grep-2.5.1-54.1.2.fc6 running on fully updated FC6.  I ran grep against
several large ISO files, and also ran it recursively agains the entire hard disk
contents.  It worked flawlessly!

Note You need to log in before you can comment on or make changes to this bug.