Bug 1222897 - Warning: no access to tty (Inappropriate ioctl for device). When opening a shell
Summary: Warning: no access to tty (Inappropriate ioctl for device). When opening a shell
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xemacs
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1260785
TreeView+ depends on / blocked
 
Reported: 2015-05-19 12:08 UTC by Joshua Rosen
Modified: 2016-06-03 22:04 UTC (History)
3 users (show)

Fixed In Version: xemacs-21.5.34-16.20160507hgd5b51c618ef8.fc24 xemacs-21.5.34-13.20160507hgd5b51c618ef8.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-30 21:18:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
.xemacs directory (79.79 KB, application/x-gzip)
2015-05-20 03:56 UTC, Joshua Rosen
no flags Details
RPM list (173.82 KB, text/plain)
2015-05-20 14:02 UTC, Joshua Rosen
no flags Details

Description Joshua Rosen 2015-05-19 12:08:51 UTC
Description of problem:
When opening a shell in Xemacs on Fedora 22 I get

Version-Release number of selected component (if applicable):


How reproducible: 100%


Steps to Reproduce:
1.esc-X shell
2.
3.

Actual results: Get the message 
Warning: no access to tty (Inappropriate ioctl for device).

Ctrl-Cs don't work in the shell

Expected results: Never seen this before on any version of Fedora or EL


Additional info:

Comment 1 Jerry James 2015-05-20 03:14:41 UTC
My initial attempts at reproducing this problem have been ineffective.  M-x shell works normally for me on a Fedora 22 x86_64 box.  Do you get the same result if you start xemacs with -vanilla?  If not, tell me more about your environment.  Which xemacs package provides the binary you are using: xemacs, xemacs-nox, or xemacs-xft?  Are you running on a bare TTY, a GNOME desktop, a KDE desktop, etc.?

Comment 2 Joshua Rosen 2015-05-20 03:55:20 UTC
-vanillia doesn't fix anything. I'm using Mate with a tcsh shell. The installed xemacs packages are,

emacs.x86_64                          21.5.34-10.20150420hg23178aa71f8b.fc22
                                                                 @System       
xemacs-common.x86_64                   21.5.34-10.20150420hg23178aa71f8b.fc22
                                                                 @System       
xemacs-filesystem.noarch               21.5.34-10.20150420hg23178aa71f8b.fc22
                                                                 @System       
xemacs-packages-base.noarch            20150413-1.fc22           @System       
xemacs-packages-extra.noarch           20150413-1.fc22           @System

Comment 3 Joshua Rosen 2015-05-20 03:56:27 UTC
Created attachment 1027486 [details]
.xemacs directory

Comment 4 Joshua Rosen 2015-05-20 14:02:36 UTC
Created attachment 1027753 [details]
RPM list

I've attached a complete list of my installed RPMS

Comment 5 Jerry James 2015-05-20 15:28:23 UTC
The problem appears to be tcsh-specific.  I see it for M-x gdb as well as M-x shell when running under tcsh.  Running strace -ff -o xemacs xemacs, I see that tcsh is started up with three open file descriptors, 0, 1, and 2, all pipes connected back to the parent XEmacs process.  Then tcsh does this:

dup2(0, 16)                             = 16
fcntl(16, F_SETFD, FD_CLOEXEC)          = 0
dup2(1, 17)                             = 17
fcntl(17, F_SETFD, FD_CLOEXEC)          = 0
dup2(2, 18)                             = 18
fcntl(18, F_SETFD, FD_CLOEXEC)          = 0
dup2(16, 19)                            = 19
fcntl(19, F_SETFD, FD_CLOEXEC)          = 0
ioctl(18, TCGETS, 0x7ffca0f332b0)       = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(17, TCGETS, 0x7ffca0f332b0)       = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(16, TCGETS, 0x7ffca0f33150)       = -1 ENOTTY (Inappropriate ioctl for device)

and it is those ENOTTY responses that prompt the warnings and misbehavior.

Incidentally, M-x eshell seems to work, so the problem appears to be specific to the M-x shell code.  I think I'll need some upstream help for this one.

Comment 6 Jerry James 2015-05-26 03:43:00 UTC
Joshua, does this help at all?

(setq process-connection-type nil)

Comment 7 Joshua Rosen 2015-05-26 12:26:26 UTC
Putting (setq process-connection-type nil) into my init.el file not only doesn't help the problem in tcsh, it also causes sh to break in the same way. Specifically if I change 

(setq explicit-shell-file-name "tcsh")

to 

(setq explicit-shell-file-name "sh") 

it doesn't display the problem, however if I add the process-connection-type nil then sh behaves the same way

(setq explicit-shell-file-name "sh")
(setq process-connection-type nil)

sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
sh-4.3$

Comment 8 Joshua Rosen 2015-08-31 18:59:20 UTC
Is anything happening here? I rolled back to Fedora 21 for a few months because of this bug but now I've updated one of my systems to F22 with the hopes that this would have been addressed (It's now Aug 31, I file this bug in May). It appears that it's still broken.

Comment 9 Jerry James 2015-08-31 19:10:55 UTC
Sorry, Joshua, but 2015 has not been kind to me in terms of spare time.  Multiple Real Life factors have converged to severely reduce the time I have to spend on Fedora issues over previous years.  If you want more timely help, I think this is a case where talking directly to upstream could be effective.  Try sending an email to xemacs-beta with all of the details.  If someone there comes up with a solution, I will apply it to the Fedora package.

Comment 10 Fedora Update System 2016-05-29 03:19:15 UTC
xemacs-21.5.34-13.20160507hgd5b51c618ef8.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-61b5826385

Comment 11 Fedora Update System 2016-05-29 03:19:29 UTC
xemacs-21.5.34-16.20160507hgd5b51c618ef8.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d104d3608c

Comment 12 Jerry James 2016-05-29 03:20:59 UTC
I think I finally figured out the nature of the problem.  Please try the updates listed in comment 10 and comment 11 and leave karma if they fix the problem for you.

Comment 13 Fedora Update System 2016-05-29 23:23:26 UTC
xemacs-21.5.34-13.20160507hgd5b51c618ef8.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-61b5826385

Comment 14 Fedora Update System 2016-05-29 23:25:58 UTC
xemacs-21.5.34-16.20160507hgd5b51c618ef8.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d104d3608c

Comment 15 Fedora Update System 2016-05-30 21:18:13 UTC
xemacs-21.5.34-16.20160507hgd5b51c618ef8.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-06-03 21:53:48 UTC
xemacs-21.5.34-13.20160507hgd5b51c618ef8.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Joshua Rosen 2016-06-03 21:58:58 UTC
Looks good, it's working for me on all of my machines.

Comment 18 Jerry James 2016-06-03 22:04:45 UTC
I'm glad to hear it.  Sorry it took me so long to figure out the problem.  In other news, the latest NSS update breaks xemacs due to bug 1342158.  It looks like another NSS update is on its way to fix the problem, but I'm going to push an xemacs-side fix as well to avoid future problems.


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