Bug 1420873

Summary: /tmp is filling up due to log files by gnome-terminal which are /tmp/vte*
Product: Red Hat Enterprise Linux 6 Reporter: ptoshniw
Component: vteAssignee: Debarshi Ray <debarshir>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: egmont
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-13 18:41:21 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:

Description ptoshniw 2017-02-09 17:28:49 UTC
Description of problem:

when using gnome-terminal log files are stored in /tmp/vte* however these files are unseen to the general user because they are in a deleted state. If you do an lsof | grep gnome-ter you will get something similar to the following out put: 
gnome-ter 24040     hward   25u      REG               0,19     1283   26129698 /tmp/vteXAA8UY (deleted)
gnome-ter 24040     hward   26u      REG               0,19     1056   26129699 /tmp/vteMBB8UY (deleted)
gnome-ter 24040     hward   27u      REG               0,19      512   26129700 /tmp/vteXJC8UY (deleted)

Version-Release number of selected component (if applicable):
vte-0.25.1-9.el6.x86_64.rpm 
gnome-terminal-2.31.3-11.el6_6.x86_64

How reproducible:
After performing operations from the gnome-terminal, in lsof | grep gnome-ter, you will find files /tmp/vte* (deleted).


Actual results:
/tmp is getting filled up

Expected results:
/tmp shouldn't get filled up

Additional info:
It seems as if these log files get opened then deleted then written to and only closed once the terminal has been exited, these files are normally not a big deal unless  a lot of command line work or keep your terminal open for about a week or more. The correct order of operations for these log files should be to create them, open them, write to them, then close and delete them.

Comment 1 Egmont Koblinger 2017-02-09 18:49:35 UTC
These files contain the scrollback buffer (at most 12 files per terminal – this has been significantly improved since then), and they are closed whenever you close the corresponding terminal. In order to limit the amount of data written to them, choose a proper number of scrollback lines in your profile prefs.

Comment 3 Debarshi Ray 2017-03-08 19:49:23 UTC
(In reply to Egmont Koblinger from comment #1)
> These files contain the scrollback buffer (at most 12 files per terminal –
> this has been significantly improved since then), and they are closed
> whenever you close the corresponding terminal. In order to limit the amount
> of data written to them, choose a proper number of scrollback lines in your
> profile prefs.

More specifically, since 0.40.x vte does compress the scrollback buffer with zlib:

commit ab8b3a3465625e08e4aa5657d13d54b6818a231a
Author: Egmont Koblinger <egmont>
Date:   Sun Dec 14 23:14:30 2014 +0100

    stream: Compress data with zlib
    
    Compression is implemented in "boa", a new layer between the "snake" storing
    64kB units and the buffering layer. Each 64kB unit is compressed separately,
    and we rely on the file system leaving sparse blocks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738121
    https://bugzilla.gnome.org/show_bug.cgi?id=738601

Comment 4 Debarshi Ray 2017-03-08 19:50:09 UTC
See bug for the RHEL 7.x counterpart of this.

Comment 5 Debarshi Ray 2017-03-08 19:50:24 UTC
(In reply to Debarshi Ray from comment #4)
> See bug for the RHEL 7.x counterpart of this.

bug 1295340

Comment 6 Chris Williams 2017-06-13 18:41:21 UTC
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017.  During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.
 
The official life cycle policy can be reviewed here:
 
http://redhat.com/rhel/lifecycle
 
This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification.  Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:
 
https://access.redhat.com