Bug 681207 - 'tcsetpgrp failed in terminal_inferior' messages in gdb output in beaker environment
Summary: 'tcsetpgrp failed in terminal_inferior' messages in gdb output in beaker envi...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Beaker
Classification: Retired
Component: beah
Version: 0.7
Hardware: Unspecified
OS: Unspecified
medium
low vote
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact:
URL:
Whiteboard: SimpleHarness
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-01 13:13 UTC by Petr Muller
Modified: 2019-04-03 11:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-03 11:53:29 UTC


Attachments (Terms of Use)

Description Petr Muller 2011-03-01 13:13:15 UTC
Description of problem:
Not sure if this belongs to gdb or beaker, but it's an output of gdb, so I will start here. One of our tests runs gdb with '-x commands -batch' options. The 'commands' file sets logging to a file, and then some gdb commands are executed. When this test is running in beaker, there are some artifacts in the log: 

(...)
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
Hardware watchpoint 1: stopper
(...)

There are no such messages when the test is run manually.

Version-Release number of selected component (if applicable):
gdb-7.2-44.el6.i686

How reproducible:
always in Beaker, not manually

Steps to Reproduce:
1. bkr workflow-simple --task /tools/gdb/Regression/pretty-printers --distro=RHEL6.1-20110224.2
2.
3.
  
Actual results:
fails, because the output is different from what is expected (additional messages)

Expected results:
no fails (no additional messages)

Additional info:

Comment 2 Jan Kratochvil 2011-03-01 17:21:03 UTC
Could you run GDB there wrapped in
http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-orphanripper.c;hb=f15/master
like instead of
  gdb args...
to run
  orphanripper gdb args...

If it works then to run there:
  /usr/bin/tty
and I have no imagination which pty it can be but that pty seems to be broken.

GDB autodetects if it runs on a terminal, if it does not GDB does try to call tcsetpgrp at all.

Comment 3 Petr Muller 2011-03-07 13:13:50 UTC
I've modded the test so it uses orphanripper, and the messages do not appear in this case. /usr/bin/tty shows /dev/console there.

Comment 4 Jan Kratochvil 2011-03-07 14:11:02 UTC
This is unrelated to GDB.
While trying to reproduce it I guess bash would print in such case:
-bash: cannot set terminal process group (-1): Inappropriate ioctl for device
-bash: no job control in this shell

The tty is not properly setup, such as that its owner process is not set to gdb being run or that there are multiple owners etc., I do not understand this tty magic much.  It is about ioctl TIOCSPGRP.

Comment 5 Bill Peck 2011-03-07 15:06:22 UTC
Assigning to beah

Comment 6 Nick Coghlan 2012-10-17 04:39:14 UTC
Bulk reassignment of issues as Bill has moved to another team.

Comment 9 Tomas Klohna 🔧 2019-04-03 11:53:29 UTC
Closing the issue due inactivity and availability of newer test harness. If you still run into this issue, feel free to reopen.


Note You need to log in before you can comment on or make changes to this bug.