Ubuntu

vte use causes /tmp file writing during text scrolling

Reported by Kees Cook on 2011-05-07
72
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Gnome Virtual Terminal Emulator
Confirmed
Medium
vte (Ubuntu)
Undecided
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)

Kees Cook (kees) wrote :
Kees Cook (kees) wrote :

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

affects: terminator (Ubuntu) → vte (Ubuntu)
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.

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
tags: added: patch
Changed in vte:
importance: Unknown → Medium
status: Unknown → Confirmed
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

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
>

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?

nh2 (nh2) wrote :

Any update?

rojer (myself-rojer) 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)
...

To post a comment you must log in.
This report contains Public information  Edit
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.