From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C6F341386CD for ; Sun, 27 Jan 2013 04:46:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEF0B21C056; Sun, 27 Jan 2013 04:46:32 +0000 (UTC) Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.120]) by pigeon.gentoo.org (Postfix) with ESMTP id 2742B21C009 for ; Sun, 27 Jan 2013 04:46:30 +0000 (UTC) X-Authority-Analysis: v=2.0 cv=K++g7lqI c=1 sm=0 a=YiB23sJcwfFEeGB7MePNFg==:17 a=HGOPLk93NxAA:10 a=QnwmS1cVhxwA:10 a=6WvLBrxrMboA:10 a=wPDyFdB5xvgA:10 a=LfqMiUf45yUA:10 a=kj9zAlcOel0A:10 a=I_vGZgfvAAAA:8 a=FGfrsgmRNDUA:10 a=LjmXqdWuFzw0c8anHzgA:9 a=CjuIK1q_8ugA:10 a=YiB23sJcwfFEeGB7MePNFg==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 142.196.222.217 Received: from [142.196.222.217] ([142.196.222.217:51804] helo=basement.kutulu.org) by cdptpa-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 94/67-25866-621B4015; Sun, 27 Jan 2013 04:46:30 +0000 Received: from localhost (basement.kutulu.org [127.0.0.1]) by basement.kutulu.org (Postfix) with ESMTP id 2B960112008 for ; Sat, 26 Jan 2013 23:46:30 -0500 (EST) X-Virus-Scanned: amavisd-new at kutulu.org Received: from basement.kutulu.org ([127.0.0.1]) by localhost (basement.kutulu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OWqnwCzcOVFw for ; Sat, 26 Jan 2013 23:46:29 -0500 (EST) Received: from PORPOISE (PORPOISE.kutulu.org [192.168.69.91]) by basement.kutulu.org (Postfix) with ESMTPSA id EA109112007 for ; Sat, 26 Jan 2013 23:46:28 -0500 (EST) From: "Mike Edenfield" To: Subject: [gentoo-user] openpty() failing with UNIX98 ptys Date: Sat, 26 Jan 2013 23:46:22 -0500 Message-ID: <002401cdfc49$41e0dc00$c5a29400$@kutulu.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 thread-index: Ac38RzsOwARqmQ0FSn+ZnLtoUVN9Kw== Content-Language: en-us X-Archives-Salt: 8d5e3540-665c-4442-9b56-9d258d1065b6 X-Archives-Hash: 8712b94d273fefe405f2cb09e1fc8f3a At some point recently, one of my systems has begun having problems allocating pseudo-terminals via the UNIX98 pty scheme. I am using the same kernel configuration I've had for years, and running the latest ~amd64 version of all the relevant packages. The problem manifests itself on any program that attempts to allocate a pseudo-terminal, including portage and openssh. I first noticed the problem when I could no longer ssh into the server because it would not allocate a pty. I have the latest udev installed, and udev-mount is running on boot. Both /dev and /dev/pts are mounted, and /dev/ptmx exists and is world-readable: basement package.use # mount | grep /dev /dev/root on / type ext3 (rw,seclabel,noatime,errors=continue,barrier=1,data=writeback) devpts on /dev/pts type devpts (rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) shm on /dev/shm type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,seclabel,nosuid,relatime,size=10240k,nr_inodes=248584,mode=755) basement package.use # ls -alF /dev/ptmx /dev/pts crw-rw-rw-. 1 root tty 5, 2 Jan 26 13:18 /dev/ptmx /dev/pts: total 0 drwxr-xr-x. 2 root root 40 Jan 26 13:18 ./ drwxr-xr-x. 10 root root 13300 Jan 26 13:18 ../ When I trace sshd's attempt to open a new pty, I see it doing this: * open /dev/ptmx * stat /dev/pts * stat /dev * try (and fail) to open /dev/ptyp0 Since I know that last bit is openssh trying to open an old-style BSD pty, I can only assume that something is going wrong trying to allocate the pty the correct way. For the time being I've added BSD pty support into my kernel and everything seems to be working now, but I'm at a loss as to what I did to break things in the first place.