Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1273513

Summary: tcsh memory leak with source command
Product: Red Hat Enterprise Linux 7 Reporter: David Kaferad // Dee'Kej <deekej>
Component: tcshAssignee: David Kaferad // Dee'Kej <deekej>
Status: CLOSED ERRATA QA Contact: Iveta Wiedermann <isenfeld>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: angelotech, bnater, isenfeld, ovasik, praiskup, qe-baseos-apps, rda
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tcsh-6.18.01-9.el7 Doc Type: Bug Fix
Doc Text:
NO_DOCS
Story Points: ---
Clone Of: 1134132 Environment:
Last Closed: 2016-11-04 01:46:30 UTC Type: Bug
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: 1134132    
Bug Blocks: 1289025, 1295829, 1313485    

Description David Kaferad // Dee'Kej 2015-10-20 15:29:32 UTC
+++ This bug was initially created as a clone of Bug #1134132 +++

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.18.01-8.el7.x86_64


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.

--- Additional comment from Angelo Bonet on 2014-09-08 15:26:58 EDT ---

FYI:  

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

--- Additional comment from FridolĂ­n PokornĂ˝ on 2014-09-09 05:11:24 EDT ---

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).

--- Additional comment from David Kaspar [Dee'Kej] on 2015-10-19 13:47:52 EDT ---

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 7 errata-xmlrpc 2016-11-04 01:46:30 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-2260.html