Bug 202282

Summary: grep error aborts when scanning large files
Product: [Fedora] Fedora Reporter: David Chambers <davidc>
Component: grepAssignee: Stepan Kasal <kasal>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6CC: mattdm, rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-09 19:49:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 207681    

Description David Chambers 2006-08-12 00:16:48 UTC
Description of problem:

grep error aborts when scanning large files

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

grep-2.5.1-54.1
glibc-2.4.90-19
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: =========
/lib/libc.so.6[0xc89327]
/lib/libc.so.6(cfree+0x85)[0xc8c829]
/lib/libc.so.6[0xccc049]
/lib/libc.so.6[0xcce47d]
/lib/libc.so.6(re_search+0x34)[0xcce8aa]
grep[0x8054d36]
grep[0x804a964]
grep[0x804b072]
grep[0x804c2a2]
/lib/libc.so.6(__libc_start_main+0xdc)[0xc3b214]
grep[0x80497f1]
======= 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]
Aborted


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 10:03:57 UTC
Think this is the FC6 version of bug #198167.

Comment 2 Vic 2006-11-28 16:25:27 UTC
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
mentioned.

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

Vic.


Comment 3 Tim Waugh 2006-11-28 16:55:00 UTC
Thanks.  FWIW, my comment #1 was incorrect -- bug #198167 is altogether different.

Comment 4 Matthew Miller 2007-04-06 16:53:55 UTC
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 19:49:31 UTC
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!