Bug 21808 - bash uses too much memory when processing big "hereis" documents
bash uses too much memory when processing big "hereis" documents
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-12-06 11:51 EST by Need Real Name
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-18 13:18:34 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 Need Real Name 2000-12-06 11:51:19 EST
I need to use "shar" to archive a 20MB binary. 
When I unshar the resulting archive on my RedHat 6.0 box,
using "sh filename" it seemingly hangs. It is not really hanging but
rather it is consuming more and more memory and getting slower and slower
and usually when "top" reports it used 160MB and still increasing I kill
the process. On another machine when we let it continue for longer,
lazy-swap starting killing processes and eventually we had to reboot the
machine to recover.
  
Note : no problem with zsh on Linux, or AIX/Solaris or HPUX posix shells.
  
The problem appears to be that the shar archive contains a 40MB "hereis"
document (a uuencoded version of my 20MB binary) which is input to the
"unpacker" program. The shell appears to be trying to read it all into
memory. 
  
I can work around the problem if I manually edit the shar archive to
avoid the use of the "hereis" document (using awk to pipe every line
between the beginning and end markers directly into the unpacker program
seems to use the least amount of memory). But I do not want to do this
every time I generate such a shar file.
  
I am using RedHat 6.0, bash 1.14.7 (but I also reproduced it on 2.03), on
a Pentium III PC with 128MB of Memory.
Comment 1 Bill Nottingham 2006-08-07 15:59:31 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.
Comment 2 Bill Nottingham 2006-10-18 13:18:34 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.

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