GDB: Failed to set controlling terminal

Bug #469005 reported by ferrazrafael on 2009-11-01
This bug affects 27 people
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)

Bug Description

Binary package hint: netbeans

Im using Ubuntu 9.10 and Netbeans 6.7 and gdb 7.0, and it keeps complaining that gdb couldnt get control of the terminal, it seems tht gdb used in ubuntu 9.10 is newer than netbeans can accept. Maybe keep a special gdb 6.8 like a dependency for netbeans would solve this problem.

ProblemType: Bug
Architecture: i386
Date: Sun Nov 1 14:57:52 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: netbeans 6.7.1-0ubuntu1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: netbeans
Uname: Linux 2.6.31-14-generic i686

ferrazrafael (ferrazrafael) wrote :
ferrazrafael (ferrazrafael) wrote :

I copy the file from gdb 6.8 that come with ubuntu 9.04, coping the /usr/bin files that come in the .deb file, in the /usr/bin/gdb-6.8
manually, and changed the gdb to be used in the configurations on netbeans. Problem solved. So it is a good ideia to create a older gdb to be installed together with netbeans.

Du (duwei-1987) wrote :

I encountered the same problem within Code::Blocks !

Bartłomiej Żogała (nusch) wrote :

I confirm this problem with code::blocks:

root@novopad:~# LANG="en" sudo apt-cache policy codeblocks gdb
  Installed: 8.02-0ubuntu4
  Candidate: 8.02-0ubuntu4
  Version table:
 *** 8.02-0ubuntu4 0
        500 lucid/universe Packages
        100 /var/lib/dpkg/status
  Installed: 7.1-1ubuntu2
  Candidate: 7.1-1ubuntu2
  Version table:
 *** 7.1-1ubuntu2 0
        500 lucid/main Packages
        100 /var/lib/dpkg/status

Oleg Kostyuchenko (c4eater) wrote :

This is a gdb issue, it is not IDE-specific.

Here is a way to reproduce it using only console output:

- Get any console app compiled with -g option , let's assume it is ~/helloworld.out
- Launch 2 independent terminals, e.g. xterm
- Get tty for the first of them (tty command), let's assume it is /dev/pts/1
- Launch gdb in the second terminal, then redirect i/o to the 1st terminal: gdb -tty /dev/pts/1 ~/helloworld.out
- Tell gdb (2nd terminal) to run the program: (gdb) r

The output terminal will print "failed to set..." etc.

Launchpad Janitor (janitor) wrote :

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

Changed in netbeans (Ubuntu):
status: New → Confirmed
Elthommo (elthommo) wrote :


hami (zr-zz-alp) wrote :

same on Code::Blocks r7955 and Ubuntu 12.04

Ilya Shaisultanov (diversario) wrote :

Same, Code::Blocks 10.05, Ubuntu Desktop 12.04 x64 with all current updates.

Jeff Genovy (jeffgenovy) wrote :

I can confirm this bug on Ubuntu 12.04 LTS 32-bit (x86) using Code::Blocks 10.05 (build May 1 2011) with all current updates as well.

caj411 (cajones) wrote :

I am confirming this bug as well (its really pi$$ing me off) on Ubuntu 12.04 32-bit (x86) with Code::Blocks 10.05. Everything is current and up-to-date. Anyone think this will get corrected in our lifetime?

Spindizzy (spindizzy-wizard) wrote :

Seen in Ubuntu 12.04 32-bit using GDB (Ubuntu/Linaro 7.4-2012.04-0ubuntu2). Running gdb inside Emacs, using the 'tty' command to set the inferior tty to /dev/pts/1, I get the "warning: GDB: Failed to set controlling terminal: Operation not permitted" message on the target terminal.

Alan Boudreault (aboudreault) wrote :

I confirm the issue on Ubuntu precise 64bits running inside Emacs.

affects: netbeans (Ubuntu) → gdb (Ubuntu)

reassigning agains gdb.
I think this bug should be reported upstream, this is a general issue, not an ubuntu specific one

Alexandre Viau (aviau) wrote :

Same Issue. On ubuntu raring and netbeans 7.3

Alexandre Viau (aviau) wrote :

I should add that running netbeans as sudo fixes the issue.

Matthias Klose (doko) wrote :

closing this issue; please recheck with gdb in 14.04 LTS and 14.10. Feel free to re-open the issue if the problem persists.

Changed in gdb (Ubuntu):
status: Confirmed → Invalid
Shawn (wyx-100) wrote :

Confirmed on Ubuntu 14.04LTS with Code::Blocks

Changed in gdb (Ubuntu):
status: Invalid → Confirmed
Shawn (wyx-100) wrote :

My apologizes, fixed by updating gdb. warning still persists tho

Changed in gdb (Ubuntu):
status: Confirmed → Invalid

Same, Code::Blocks 16.01, Ubuntu Desktop 16.04 x64 with all current updates.

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

Other bug subscribers