Gentoo Archives: gentoo-user

From: Mike Edenfield <kutulu@××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] openpty() failing with UNIX98 ptys
Date: Sun, 27 Jan 2013 04:46:47
Message-Id: 002401cdfc49$41e0dc00$c5a29400$
1 At some point recently, one of my systems has begun having problems
2 allocating pseudo-terminals via the UNIX98 pty scheme. I am using the same
3 kernel configuration I've had for years, and running the latest ~amd64
4 version of all the relevant packages. The problem manifests itself on any
5 program that attempts to allocate a pseudo-terminal, including portage and
6 openssh. I first noticed the problem when I could no longer ssh into the
7 server because it would not allocate a pty.
9 I have the latest udev installed, and udev-mount is running on boot. Both
10 /dev and /dev/pts are mounted, and /dev/ptmx exists and is world-readable:
12 basement package.use # mount | grep /dev
13 /dev/root on / type ext3
14 (rw,seclabel,noatime,errors=continue,barrier=1,data=writeback)
15 devpts on /dev/pts type devpts
16 (rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
17 shm on /dev/shm type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime)
18 udev on /dev type devtmpfs
19 (rw,seclabel,nosuid,relatime,size=10240k,nr_inodes=248584,mode=755)
21 basement package.use # ls -alF /dev/ptmx /dev/pts
22 crw-rw-rw-. 1 root tty 5, 2 Jan 26 13:18 /dev/ptmx
24 /dev/pts:
25 total 0
26 drwxr-xr-x. 2 root root 40 Jan 26 13:18 ./
27 drwxr-xr-x. 10 root root 13300 Jan 26 13:18 ../
29 When I trace sshd's attempt to open a new pty, I see it doing this:
31 * open /dev/ptmx
32 * stat /dev/pts
33 * stat /dev
34 * try (and fail) to open /dev/ptyp0
36 Since I know that last bit is openssh trying to open an old-style BSD pty, I
37 can only assume that something is going wrong trying to allocate the pty the
38 correct way.
40 For the time being I've added BSD pty support into my kernel and everything
41 seems to be working now, but I'm at a loss as to what I did to break things
42 in the first place.


Subject Author
[gentoo-user] Re: openpty() failing with UNIX98 ptys walt <w41ter@×××××.com>
Re: [gentoo-user] openpty() failing with UNIX98 ptys Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] openpty() failing with UNIX98 ptys Peter Humphrey <peter@××××××××××××××.org>