RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1134132 - tcsh memory leak with source command
Summary: tcsh memory leak with source command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tcsh
Version: 6.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: Iveta Wiedermann
URL:
Whiteboard:
Depends On:
Blocks: 1254457 1273513
TreeView+ depends on / blocked
 
Reported: 2014-08-26 23:12 UTC by Angelo Bonet
Modified: 2021-01-11 10:17 UTC (History)
6 users (show)

Fixed In Version: tcsh-6.17-31.el6
Doc Type: Bug Fix
Doc Text:
NO_DOCS
Clone Of:
: 1273513 (view as bug list)
Environment:
Last Closed: 2016-05-11 00:55:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0938 0 normal SHIPPED_LIVE tcsh bug fix update 2016-05-10 22:54:56 UTC

Description Angelo Bonet 2014-08-26 23:12:51 UTC
Description of problem:

tcsh appears to leak some memory during every invocation of its 'source' command


Version-Release number of selected component (if applicable):
tcsh-6.17-24.el6.i686
(also observed on RHEL4, RHEL5 and Fedora 20's tcsh packages)


How reproducible:
Always


Steps to Reproduce:
1. Create a script to source:
% touch noop.csh

2.Sit in a loop, continuously invoking 'source':
% while (1)
while? source noop.csh
while? end

3. Watch memory grow on the tcsh process

Actual results:
Memory growth (without any apparent limit) on the tcsh process

Expected results:
No memory growth

Additional info:
The leak appears to be rather small and would require a lot of source invocations to consume any significant amount of memory.  But this can still be an issue for long-running tcsh environments.

Comment 2 Angelo Bonet 2014-09-08 19:26:58 UTC
FYI:  

Upstream bug report:  http://bugs.gw.com/view.php?id=377

Comment 3 Fridolín Pokorný 2014-09-09 09:11:24 UTC
Thanks! I was going to upload the patch, but you were faster. The upstream fix is only partial; I still get memory leaks. The problem is that variable "paraml" is overwritten and allocated memory is lost (there should be freelex() called).

To merge upstream changes, our file file locking patch has to be adjusted (tcsh-6.18.00-history-file-locking.patch).

Comment 4 David Kaspar // Dee'Kej 2015-10-19 17:47:52 UTC
This problem was already fixed by upstream in tcsh version 6.19.00. It is a simple "one-liner" fix:
https://github.com/tcsh-org/tcsh/commit/b73f3a4dbd4892bc796087022f6907b20c773f69

Extracting the patch and creating the reproducer shouldn't be any problem.

Comment 9 errata-xmlrpc 2016-05-11 00:55:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0938.html


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