Bug 103035 - sed can die needlessly with too many open files
sed can die needlessly with too many open files
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: sed (Show other bugs)
9
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-25 14:50 EDT by Anthony Papineau
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version: 4.0.7-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-09-08 05:22:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anthony Papineau 2003-08-25 14:50:40 EDT
Description of problem:

sed can die needlessly with too many open files

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

Red Hat 9, package sed-4.0.5-1

How to reproduce: Try a sed command line that would read more than
about 1024 files.  Here we create a directory with 1040 files and try
to sed them all at once.  Note that the sed command attempts to do
exactly the same thing as the grep command preceding it, but only
opens, in this case, the first 1021 files.

Script started on Fri Aug 22 20:35:49 2003
sh-2.05b$ ls
sh-2.05b$ for a in a b c d e f g h i j k l m

>>  do
>>    for b in a b c d e f g h i j
>>    do
>>      for c in a b c d e f g h
>>      do
>>        date >$a$b$c
>>      done
>>    done
>>  done

sh-2.05b$ cat * | wc -l
   1040
sh-2.05b$ ls | wc -l
   1040
sh-2.05b$ grep : * | wc -l
   1040
sh-2.05b$ sed -n /:/p * | wc -l
sed: can't read mhf: Too many open files
sed: can't read mhg: Too many open files
sed: can't read mhh: Too many open files
sed: can't read mia: Too many open files
sed: can't read mib: Too many open files
sed: can't read mic: Too many open files
sed: can't read mid: Too many open files
sed: can't read mie: Too many open files
sed: can't read mif: Too many open files
sed: can't read mig: Too many open files
sed: can't read mih: Too many open files
sed: can't read mja: Too many open files
sed: can't read mjb: Too many open files
sed: can't read mjc: Too many open files
sed: can't read mjd: Too many open files
sed: can't read mje: Too many open files
sed: can't read mjf: Too many open files
sed: can't read mjg: Too many open files
sed: can't read mjh: Too many open files
   1021
sh-2.05b$ exit

Script done on Fri Aug 22 20:37:28 2003
Comment 1 Jakub Jelinek 2003-09-08 05:22:56 EDT
Seems to be fixed in sed-4.0.7-{2,3}.

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