After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710767 - gnome-terminal freezes randomly, requires user input
gnome-terminal freezes randomly, requires user input
Status: RESOLVED INCOMPLETE
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-23 23:04 UTC by Shannon
Modified: 2015-09-17 12:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Shows how the terminal truly freezes (44.00 KB, image/png)
2013-10-23 23:04 UTC, Shannon
Details

Description Shannon 2013-10-23 23:04:23 UTC
Created attachment 257982 [details]
Shows how the terminal truly freezes

What Was Expected:
gnome-terminal would simply display output until program terminated or ended.

What Happens:
When running an application in terminal, either as a launcher or simply opening a terminal directly , the screen output randomly freezes and the generating / running application freezes. To resume, one must double-click the open terminal window and/or use terminal reset & clear. Some type of user input seems to resume. The problem makes running almost any application with terminal screen output unusable and unstable--for example, running a machine learning algorithm. Note, by freeze I mean the terminal output itself freezes--the terminal window remains active (buttons and menus work) as do all other applications. The screen output simply freezes.

The problem affects both mate-terminal and gnome-terminal. The bug does not affect a simple x-terminal instance. xterm and uxterm are not affected and are a temporary kludge to get around the issue.

Affected Applications:
gnome-terminal
mate-terminal
but not xterm or uxterm.

Because of the random character, this is a real problem. For example, running a machine learning algorithm or modelling system becomes impossible to run reliably using gnome-terminal or mate-terminal. (For example, you set a batch to run over night and return to find the terminal output frozen only ten minutes after you left for the evening.) The only workaround I have found, using a desktop, is using xterm or uxterm instead.

Test Code:
The following simple Python3 code demonstrates the issue.

----BEGIN CODE----
import time
starttime = time.time()
i = 0
while(True):
    i = i + 1
    print("Still working " , i, " " , time.time() - starttime)
---END CODE---
When running this code in a mate-terminal or gnome-terminal instance, the code displays a simple message along with the time. After a random period, sometimes seconds, sometimes minutes, sometimes hours the bug arises and the terminal instance screen simply freezes. That is, display output just stops in mid-stream. You can resume but only by double-clicking or using reset & clear. apparently, some type of user input is required to continue running. after user input, the application resumes as if nothing happened.

Bug can arise at any time. I have seen the bug arise after a few seconds, about ten minutes, or after six hours. NOTE: I have extensively tested this over a period of several weeks. The freezing /stopping is truly random. 

The bug affects at least Python and Java applications that display output  to the terminal.

Approximate Number of Tests:
Well over 50 and narrowed the issue to the terminal instances.

Hardware:
i7 4770
32GB RAM
(new) Nvidia 760 Video (note: the problems occurs with Nouveau or any proprietary Nvidia driver versions 3.04 through 3.25, that is, all were tested to see if this was just a video driver issue and none resolved the issue)

OS:
Ubuntu 13.04 (with all updates)
Ubuntu 13.10 (with all updates)

Desktops:
Confirmed the bug occurs under Ubuntu Default/Unity, GNOME3, and MATE desktops. Same odd error in all.

13.04
apt-cache policy gnome-terminal
gnome-terminal:
  Installed: 3.6.1-0ubuntu4
  Candidate: 3.6.1-0ubuntu4
  Version table:
 *** 3.6.1-0ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status

apt-cache policy mate-terminal
mate-terminal:
  Installed: 1.6.1-1.1+raring
  Candidate: 1.6.1-1.1+raring
  Version table:
 *** 1.6.1-1.1+raring 0
        500 http://packages.mate-desktop.org/repo/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status

13.10
apt-cache policy gnome-terminal
gnome-terminal:
  Installed: 3.6.1-0ubuntu6
  Candidate: 3.6.1-0ubuntu6
  Version table:
 *** 3.6.1-0ubuntu6 0
        500 http://us.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
        100 /var/lib/dpkg/status

apt-cache policy mate-terminal
mate-terminal:
  Installed: 1.6.1-1.1+raring
  Candidate: 1.6.1-1.1+raring
  Version table:
 *** 1.6.1-1.1+raring 0
        100 /var/lib/dpkg/status

Also Reported:
Originally, I thought there was sme type of buffer being filled. See http://forums.mate-desktop.org/viewtopic.php?f=2&t=2005&p=6899#p6899 and especially notation that at least one other app exhibiting similar behaviour. Quote: "Terminator (fork of Gnome-Terminal) under another user account where htop would freeze and only resume when user input was encountered (clicking the tasks)." 

Originally, I thought this was a Ubuntu-specific issue and reported at https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1234453 .

I also heavily tested video card options (thinking this might be a video issue but I am less inclined to think that is the source due to testing.
Comment 1 Christian Persch 2013-10-24 08:50:16 UTC
3.6 is a really old version; please test with gnome-terminal 3.10, under gnome-shell. See https://live.gnome.org/Apps/Terminal/ReportingBugs for more things to check.
Comment 2 Shannon 2013-11-07 02:29:04 UTC
I have been searching for over a week to see how I might just install gnome-terminal from Gnome 3.10--because this is a production machine, I don't want to experiment with the full Gnome-shell. 
I cannot find a way to just install gnome-terminal and attempts to build gnome-terminal failed with error:
checking which gtk+ version to compile against... 3.0
checking for GDK target... 
configure: error: unknown gdk target

I run the above with:
sudo ./configure --prefix=/usr --disable-static --disable-migration --with-nautilus-extension --libexecdir=/usr/lib/gnome-terminal310 &&  make
Comment 3 Christian Persch 2013-11-07 09:14:59 UTC
You need to install the build dependencies first, which I'm not sure your distro version possesses. Try "apt-get build-dep gnome-terminal".

There's also a 3.10 package in this PPA: https://launchpad.net/~gnome3-team/+archive/gnome3-staging/ although I think it's not for your distro version.

(You shouldn't install to /usr btw, use /usr/local or /opt/something-or-else .)
Comment 4 ekinakoglu 2015-03-27 14:05:32 UTC
This does not happen randomly unlike reported by Shannon. I can confirm this bug on Debian Wheezy 7.8 using Gnome Classic.

You can reproduce this bug by clicking another window button from the gnome panel when the gnome-terminal (3.4.1.1) is the active window and running the process. The trick here is that before switching to another window using window buttons, you should do it without minimising the gnome-terminal first. Almost always, it freezes the terminal screen and stops the running process.