Debian Bug report logs - #298551
xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1

version graph

Package: xterm; Maintainer for xterm is Debian X Strike Force <debian-x@lists.debian.org>; Source for xterm is src:xterm.

Reported by: Jochen Voss <voss@debian.org>

Date: Tue, 8 Mar 2005 13:03:13 UTC

Severity: important

Tags: help

Merged with 229566

Found in versions 4.3.0-0pre1v1, 4.3.0.dfsg.1-12

Fixed in version 6.8.2.dfsg.1-1

Done: David Martínez Moreno <ender@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#298551; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Jochen Voss <voss@debian.org>:
New Bug report received and forwarded. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jochen Voss <voss@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1
Date: Tue, 08 Mar 2005 12:50:49 +0000
Package: xterm
Version: 4.3.0.dfsg.1-12
Severity: normal

Hello,

on my shiny new Apple Powerbook G4 I encounter the problem described
in (closed) bug #105874.  The problem is the following:

When I try to start xterm with eightBitInput set to false, I opens a
window for a fraction of a second but then dies with the error message

    xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1

The problem goes away when I set eightBitInput to true.  The problem
did not occur when a virtually identical configuration was used on an i386
based system.

My feeble debugging attempts could narrow down the source of the problem
a little bit: the error message is caused by the following lines of
code (xterm/main.c, lines 3547-3548):

		if (ioctl(ttyfd, TCSETA, &tio) == -1)
		    HsSysError(cp_pipe[1], ERROR_TIOCSETP);

This is executed in the child process after the fork, and the error
condition is reported back to the parent process via a pipe in an a
little bit convoluted manner.

Some information about my laptop can be found on my home page at
http://seehuhn.de/comp/powerbook/ .  If you need any further information
please ask.

I hope this helps,
Jochen

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.11
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

Versions of packages xterm depends on:
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libexpat1                1.95.8-1        XML parsing C library - runtime li
ii  libfontconfig1           2.2.3-4         generic font configuration library
ii  libfreetype6             2.1.7-2.3       FreeType 2 font engine, shared lib
ii  libice6                  4.3.0.dfsg.1-12 Inter-Client Exchange library
ii  libncurses5              5.4-4           Shared libraries for terminal hand
ii  libsm6                   4.3.0.dfsg.1-12 X Window System Session Management
ii  libxaw7                  4.3.0.dfsg.1-12 X Athena widget set library
ii  libxext6                 4.3.0.dfsg.1-12 X Window System miscellaneous exte
ii  libxft2                  2.1.2-6         FreeType-based font drawing librar
ii  libxmu6                  4.3.0.dfsg.1-12 X Window System miscellaneous util
ii  libxpm4                  4.3.0.dfsg.1-12 X pixmap library
ii  libxrender1              0.8.3-7         X Rendering Extension client libra
ii  libxt6                   4.3.0.dfsg.1-12 X Toolkit Intrinsics
ii  xlibs                    4.3.0.dfsg.1-12 X Keyboard Extension (XKB) configu
ii  xlibs-data               4.3.0.dfsg.1-12 X Window System client data

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#298551; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@radix.net>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 298551@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@radix.net>
To: Jochen Voss <voss@debian.org>, 298551@bugs.debian.org
Subject: Re: Bug#298551: xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1
Date: Tue, 8 Mar 2005 08:46:40 -0500
[Message part 1 (text/plain, inline)]
This is the same as #229566

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

Severity set to `important'. Request was from Jochen Voss <voss@seehuhn.de> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 229566 298551. Request was from Jochen Voss <voss@seehuhn.de> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#298551; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Jochen Voss <voss@seehuhn.de>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #19 received at 298551@bugs.debian.org (full text, mbox):

From: Jochen Voss <voss@seehuhn.de>
To: Thomas Dickey <dickey@radix.net>
Cc: 298551@bugs.debian.org
Subject: Re: Bug#298551: xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1
Date: Tue, 8 Mar 2005 15:46:56 +0000
[Message part 1 (text/plain, inline)]
Hello Thomas,

On Tue, Mar 08, 2005 at 10:20:14AM -0500, Thomas Dickey wrote:
> thanks.  Actually I had forgotten the TCSETA detail, but noticed the
> hardware platform which seems to be relevant as well.
Is the TCSETA ioctl documented in some publicly accessible place?

Just for reference: In the failure case (eigthBitInput: false) the ioctl
argument is as follows.

    (gdb) p tio
    $1 = {c_iflag = 768, c_oflag = 3, c_cflag = 2575, c_lflag = 1487, 
      c_line = 0 '\0', 
      c_cc = "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\017", '\0' <repeats 14 times>, c_ispeed = 0, c_ospeed = 0}

The call returns -1 in this case and HsSysError is called.

If I set "eigthBitInput: true", then the argument to ioctl is

    (gdb) p tio
    $1 = {c_iflag = 768, c_oflag = 3, c_cflag = 2831, c_lflag = 1487, 
      c_line = 0 '\0', 
      c_cc = "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\017", '\0' <repeats 14 times>, c_ispeed = 0, c_ospeed = 0}

(only difference: the c_cflag member has bit 9 set, which looks like
the switch from CS7 to CS8).  This time the call succeeds.

Maybe its a kernel or libc bug after all?

All the best,
Jochen


PS.: I was unsure which bug report entry I should forward this
information to.  I choose "my" copy of the bug report.  Hope that this
is ok.
-- 
http://seehuhn.de/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#298551; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@radix.net>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #24 received at 298551@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@radix.net>
To: Jochen Voss <voss@seehuhn.de>
Cc: Thomas Dickey <dickey@radix.net>, 298551@bugs.debian.org
Subject: Re: Bug#298551: xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1
Date: Tue, 8 Mar 2005 11:06:03 -0500
[Message part 1 (text/plain, inline)]
On Tue, Mar 08, 2005 at 03:46:56PM +0000, Jochen Voss wrote:
> Hello Thomas,
> 
> On Tue, Mar 08, 2005 at 10:20:14AM -0500, Thomas Dickey wrote:
> > thanks.  Actually I had forgotten the TCSETA detail, but noticed the
> > hardware platform which seems to be relevant as well.
> Is the TCSETA ioctl documented in some publicly accessible place?

For instance Solaris' termio manpage says this:

     TCSETA
           The argument is a  pointer  to  a   termio  structure.
           Those terminal parameters that can be stored in a ter-
           mio structure are set from the values stored  in  that
           structure. The change is immediate.

Changing it to TCSETAF might change the behavior (mentioning this not to fix
the problem, but to get more information about it).

     TCSETAF
           The argument is a pointer to a termio structure.
            Those terminal parameters that can  be  stored  in  a
           termio  structure  are  set  from the values stored in
           that structure. The change occurs after all characters
           queued  for  output have been transmitted; all charac-
           ters queued for  input  are  discarded  and  then  the
           change occurs.

I have a hunch that TCSETAF is used in more applications, so a bug in
the former might be overlooked.

> Maybe its a kernel or libc bug after all?

I suspect that, but don't have an easy way to prove it.  There are a couple of
things that are related:

Some time ago there were comments to the effect that the PowerPC port had
changed some of the I/O structs incompatibly, causing some isolated failures. 
I mentioned that to Brandon when this bug came up, but his opinion was that
those problems had been dealt with.

The other is whether the connection is remote or local (I don't have the other
report at hand, but seem to recall that this problem happens on local
connections).
 
> All the best,
> Jochen
> 
> 
> PS.: I was unsure which bug report entry I should forward this
> information to.  I choose "my" copy of the bug report.  Hope that this
> is ok.

that's fine (Brandon may merge them as he needs to).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#298551; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Jochen Voss <voss@seehuhn.de>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #29 received at 298551@bugs.debian.org (full text, mbox):

From: Jochen Voss <voss@seehuhn.de>
To: Thomas Dickey <dickey@radix.net>
Cc: 298551@bugs.debian.org
Subject: Re: Bug#298551: xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1
Date: Sat, 12 Mar 2005 15:42:33 +0000
[Message part 1 (text/plain, inline)]
Hello Thomas,

On Tue, Mar 08, 2005 at 11:06:03AM -0500, Thomas Dickey wrote:
> On Tue, Mar 08, 2005 at 03:46:56PM +0000, Jochen Voss wrote:
> > Hello Thomas,
> > 
> > On Tue, Mar 08, 2005 at 10:20:14AM -0500, Thomas Dickey wrote:
> > > thanks.  Actually I had forgotten the TCSETA detail, but noticed the
> > > hardware platform which seems to be relevant as well.
> > Is the TCSETA ioctl documented in some publicly accessible place?
> 
> For instance Solaris' termio manpage says this:
> 
>      TCSETA
>            The argument is a  pointer  to  a   termio  structure.
>            Those terminal parameters that can be stored in a ter-
>            mio structure are set from the values stored  in  that
>            structure. The change is immediate.
And do you know what it means to set the CS7 flag in c_cflags?
The libc manual just sais "This specifies seven bits per byte",
which sounds like it should never be set on todays hardware?
Maybe the call is perfectly right to return an error code for
this setting?

All the best,
Jochen
-- 
http://seehuhn.de/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#298551; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@radix.net>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #34 received at 298551@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@radix.net>
To: Jochen Voss <voss@seehuhn.de>
Cc: Thomas Dickey <dickey@radix.net>, 298551@bugs.debian.org
Subject: Re: Bug#298551: xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1
Date: Sat, 12 Mar 2005 11:28:21 -0500
[Message part 1 (text/plain, inline)]
On Sat, Mar 12, 2005 at 03:42:33PM +0000, Jochen Voss wrote:
> Hello Thomas,
> 
> On Tue, Mar 08, 2005 at 11:06:03AM -0500, Thomas Dickey wrote:
> > On Tue, Mar 08, 2005 at 03:46:56PM +0000, Jochen Voss wrote:
> > > Hello Thomas,
> > > 
> > > On Tue, Mar 08, 2005 at 10:20:14AM -0500, Thomas Dickey wrote:
> > > > thanks.  Actually I had forgotten the TCSETA detail, but noticed the
> > > > hardware platform which seems to be relevant as well.
> > > Is the TCSETA ioctl documented in some publicly accessible place?
> > 
> > For instance Solaris' termio manpage says this:
> > 
> >      TCSETA
> >            The argument is a  pointer  to  a   termio  structure.
> >            Those terminal parameters that can be stored in a ter-
> >            mio structure are set from the values stored  in  that
> >            structure. The change is immediate.
> And do you know what it means to set the CS7 flag in c_cflags?

The 8th bit can be ignored in that case.  By itself, that doesn't make it
zero.  Checking the termio manpage on Solaris (which is more complete than
Linux's), we see

     If  ISTRIP is set, valid input characters are first stripped
     to seven bits, otherwise all eight bits are processed.

> The libc manual just sais "This specifies seven bits per byte",
> which sounds like it should never be set on todays hardware?
> Maybe the call is perfectly right to return an error code for
> this setting?

Not exactly:  it is redundant for xterm to set it in this case, but since the
header files define it, it should be supported by the terminal driver (which is
independent of the hardware).

It's been a while since I noticed, but it used to be the case that 8-bit paths
for telnet weren't guaranteed.  For instance SunOS 4.x's telnet didn't do that.

However, that's not the reason why I didn't change it.   It was because the
single resource setting eightBitInput does two functions (adding an ESC versus
mapping meta+key to 128+key), so changing the CS7/CS8 setting wouldn't have
affected the result.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#298551; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #39 received at 298551@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: 298551@bugs.debian.org
Subject: #298551 - xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1
Date: Tue, 2 Aug 2005 19:16:11 -0400
[Message part 1 (text/plain, inline)]
This is fixed in patch #201

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Reply sent to David Martínez Moreno <ender@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Jochen Voss <voss@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #44 received at 298551-done@bugs.debian.org (full text, mbox):

From: David Martínez Moreno <ender@debian.org>
To: 298551-done@bugs.debian.org
Cc: dickey@his.com
Subject: Re: Bug#298551: xterm: fatal pty error 23 (errno=22) on tty /dev/pts/1.
Date: Wed, 3 Aug 2005 02:03:58 +0200
[Message part 1 (text/plain, inline)]
Version: 6.8.2.dfsg.1-1

El Miércoles, 3 de Agosto de 2005 01:16, Thomas Dickey escribió:
> This is fixed in patch #201

        Many thanks again, Thomas. Closing this bug report, as patchset #201 
is included in 6.8.2.dfsg.1-1 and later.

        Regards,


                Ender.
-- 
Network engineer
Debian Developer
[Message part 2 (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 Jun 2007 19:47:40 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 13:36:11 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.