1 |
On 01/26/2013 08:46 PM, Mike Edenfield wrote: |
2 |
> At some point recently, one of my systems has begun having problems |
3 |
> allocating pseudo-terminals via the UNIX98 pty scheme. I am using the same |
4 |
> kernel configuration I've had for years, and running the latest ~amd64 |
5 |
> version of all the relevant packages. The problem manifests itself on any |
6 |
> program that attempts to allocate a pseudo-terminal, including portage and |
7 |
> openssh. I first noticed the problem when I could no longer ssh into the |
8 |
> server because it would not allocate a pty. |
9 |
> |
10 |
> I have the latest udev installed, and udev-mount is running on boot. Both |
11 |
> /dev and /dev/pts are mounted, and /dev/ptmx exists and is world-readable: |
12 |
> |
13 |
> basement package.use # mount | grep /dev |
14 |
> /dev/root on / type ext3 |
15 |
> (rw,seclabel,noatime,errors=continue,barrier=1,data=writeback) |
16 |
> devpts on /dev/pts type devpts |
17 |
> (rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) |
18 |
> shm on /dev/shm type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime) |
19 |
> udev on /dev type devtmpfs |
20 |
> (rw,seclabel,nosuid,relatime,size=10240k,nr_inodes=248584,mode=755) |
21 |
> |
22 |
> basement package.use # ls -alF /dev/ptmx /dev/pts |
23 |
> crw-rw-rw-. 1 root tty 5, 2 Jan 26 13:18 /dev/ptmx |
24 |
> |
25 |
> /dev/pts: |
26 |
> total 0 |
27 |
> drwxr-xr-x. 2 root root 40 Jan 26 13:18 ./ |
28 |
> drwxr-xr-x. 10 root root 13300 Jan 26 13:18 ../ |
29 |
> |
30 |
> When I trace sshd's attempt to open a new pty, I see it doing this: |
31 |
> |
32 |
> * open /dev/ptmx |
33 |
> * stat /dev/pts |
34 |
> * stat /dev |
35 |
> * try (and fail) to open /dev/ptyp0 |
36 |
> |
37 |
> Since I know that last bit is openssh trying to open an old-style BSD pty, I |
38 |
> can only assume that something is going wrong trying to allocate the pty the |
39 |
> correct way. |
40 |
> |
41 |
> For the time being I've added BSD pty support into my kernel and everything |
42 |
> seems to be working now, but I'm at a loss as to what I did to break things |
43 |
> in the first place. |
44 |
|
45 |
Do you have any files left in /usr/lib/udev ? If so, try re-emerging the |
46 |
package that owns those files. |