vte use causes /tmp file writing during text scrolling

Bug #778872 reported by Kees Cook
86
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Gnome Virtual Terminal Emulator
Unknown
Unknown
vte (Ubuntu)
Fix Released
Undecided
Unassigned
vte2.91 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: terminator

If you open gnome-terminal, and run:

inotifywait -mr /tmp

You can watch files in /tmp. If you cause a terminator window to scroll (ls -la /usr) you'll see many temp files being created and deleted. This doesn't happen with gnome-terminal, and I do not have "infinite scrollback" selected in terminator.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: terminator 0.95-1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Sat May 7 07:18:15 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100406)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: terminator
UpgradeStatus: Upgraded to natty on 2011-01-11 (115 days ago)

Revision history for this message
Kees Cook (kees) wrote :
Revision history for this message
Kees Cook (kees) wrote :

I take it back, this happens with gnome-terminal too.

affects: terminator (Ubuntu) → vte (Ubuntu)
Revision history for this message
Andrew Pollock (apollock) wrote :

Vaguely related, and probably worthy of a separate bug: if you do have infinite scrolling enabled in Terminator, it'll fill up your /tmp with deleted files that it holds open. Nothing more fun than trying to track down where all your disk space went when du doesn't help.

Revision history for this message
Andrew Pollock (apollock) wrote :
Revision history for this message
Kees Cook (kees) wrote :

Here is an insane patch that fixes the problem. I just did a behavioral replacement of file operations with memory operations. This patch could be seriously improved if I could understand the interaction of "offset" and "newpage" better, and just make this a sensible moving window of memory instead. I ran out of time last night, though.

Changed in vte (Ubuntu):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
tags: added: patch
Changed in vte:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vte - 1:0.28.2-3ubuntu2

---------------
vte (1:0.28.2-3ubuntu2) precise; urgency=low

  * Add debian/patches/backscroll-stream-mem.patch: provide a memory-based
    scrollback stream backend to avoid hitting disk with terminal contents
    (LP: #778872).
 -- Kees Cook <email address hidden> Wed, 21 Mar 2012 13:36:14 -0700

Changed in vte (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
周成瑞 (e93b5ae3) wrote : Re: [Bug 778872] Re: vte use causes /tmp file writing during text scrolling

Will this patch be applied to upstream Debian and GNOME vte code?

On Thu, Mar 22, 2012 at 5:00 AM, Launchpad Bug Tracker <
<email address hidden>> wrote:

> This bug was fixed in the package vte - 1:0.28.2-3ubuntu2
>
> ---------------
> vte (1:0.28.2-3ubuntu2) precise; urgency=low
>
> * Add debian/patches/backscroll-stream-mem.patch: provide a memory-based
> scrollback stream backend to avoid hitting disk with terminal contents
> (LP: #778872).
> -- Kees Cook <email address hidden> Wed, 21 Mar 2012 13:36:14 -0700
>
> ** Changed in: vte (Ubuntu)
> Status: Confirmed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/778872
>
> Title:
> vte use causes /tmp file writing during text scrolling
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/vte/+bug/778872/+subscriptions
>

Revision history for this message
Jon Dowland (jond) wrote :

Hi, sorry for the noise. I can't see this patch applied to the vte3 package. Should it be? Is there a separate bug to track for that package?

Revision history for this message
nh2 (nh2) wrote :

Any update?

Revision history for this message
rojer (rojer9) wrote :

up to date VTE:

$ dpkg -l | grep libvte
ii libvte-2.90-9 1:0.32.1-0ubuntu1 Terminal emulator widget for GTK+ 3.0 - runtime files
ii libvte-2.90-common 1:0.32.1-0ubuntu1 Terminal emulator widget for GTK+ 3.0 - common files
ii libvte-common 1:0.28.2-3ubuntu2 Terminal emulator widget for GTK+ 2.x - common files
ii libvte9 1:0.28.2-3ubuntu2 Terminal emulator widget for GTK+ 2.0 - runtime files

but gnome-terminal still has files open in tmp:

$ lsof -p 4528 | grep tmp
gnome-ter 4528 rojer 22u REG 8,1 405615 5636167 /tmp/vteK48ALW (deleted)
gnome-ter 4528 rojer 23u REG 8,1 32000 5636319 /tmp/vte25BKLW (deleted)
gnome-ter 4528 rojer 24u REG 8,1 658384 5636417 /tmp/vteEKABLW (deleted)
gnome-ter 4528 rojer 25u REG 8,1 28752 5636520 /tmp/vteKM0PLW (deleted)
gnome-ter 4528 rojer 26u REG 8,1 7504 5636554 /tmp/vteAGVQLW (deleted)
...

Changed in vte:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vte2.91 (Ubuntu):
status: New → Confirmed
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Some interesting relatively recent discussion at LP: #1430620

Although Ubuntu patched vte years ago, vte2.91 was never patched.

Changed in vte:
importance: Medium → Unknown
status: Fix Released → Unknown
Changed in vte2.91 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
MasterCATZ (mastercatz) wrote :

While looking @ Ubuntu 19.10's system monitor
to find what process just hogged 60 gig of ram I noticed
During the 1 week since last reboot
gnome-terminal-server 30mb Memory, Disk Read Total 40.9Tb, Disk Write Total 1.8Tb

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.