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 640084 - pty file descriptor leak in gnome-terminal
pty file descriptor leak in gnome-terminal
Status: RESOLVED DUPLICATE of bug 632257
Product: gnome-terminal
Classification: Core
Component: general
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-20 17:11 UTC by Andrew Skalski
Modified: 2011-01-20 17:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrew Skalski 2011-01-20 17:11:18 UTC
gnome-terminal opens, but never closes, ptys for its windows.  I tagged this 2.32.x, which is the version I'm running, but I've verified by source code examination that the bug still exists in 2.33.4.


How to reproduce:

* Watch the contents of /dev/pts/ while doing the following:
* Start up gnome-terminal.
* Open several new tabs/windows (these new windows are managed by the original gnome-terminal process).  Watch as pty's are created in the /dev/pts/ directory.
* Close some of those tabs/windows.  Notice that the pty's never get freed.
* Close ALL tabs/windows, or kill the gnome-terminal process.  The pty's are finally freed up.

Examining the source code (grep for the string "pty_fd"), notice that it gets opened by vte_terminal_get_pty, but nowhere does it ever get passed to close().


How I noticed this (i.e. how it affected me):

This caused firefox to hang.  I had started firefox by entering the shell command "firefox & exit" in a gnome-terminal.  Firefox later tried to write some messages to stderr, and the write() blocked.  (Gnome-terminal was sitting on the leaked ptmx file descriptor, and the buffer filled up.)  Closing all of my gnome-terminal windows unfroze firefox.
Comment 1 Christian Persch 2011-01-20 17:14:10 UTC

*** This bug has been marked as a duplicate of bug 632257 ***