NetBSD Problem Report #57741

From www@netbsd.org  Fri Dec  1 20:43:55 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9F8C21A9238
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  1 Dec 2023 20:43:55 +0000 (UTC)
Message-Id: <20231201204354.AFCE71A9239@mollari.NetBSD.org>
Date: Fri,  1 Dec 2023 20:43:54 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: sshd fails to open a PTY on NetBSD/sun3
X-Send-Pr-Version: www-1.0

>Number:         57741
>Category:       port-sun3
>Synopsis:       sshd fails to open a PTY on NetBSD/sun3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    thorpej
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 01 20:45:00 +0000 2023
>Closed-Date:    
>Last-Modified:  Mon Dec 04 01:53:35 +0000 2023
>Originator:     Jason Thorpe
>Release:        10.0_RC1
>Organization:
CISCy Business
>Environment:
NetBSD sun3-160 10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #0: Wed Nov 29 12:36:24 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sun3/compile/GENERIC sun3

(Running in TME.)
>Description:
sshd fails to open a PTY:

Dec  1 12:34:59 sun3-160 sshd[793]: error: openpty: No such file or directory
Dec  1 12:35:00 sun3-160 sshd[814]: error: session_pty_req: session 0 alloc failed

sun3-160$ ls -l /dev/ptm*
crw-rw-rw-  1 root  wheel  165, 1 Dec  1 10:44 /dev/ptm
crw-rw-rw-  1 root  wheel  165, 0 Dec  1 10:44 /dev/ptmx
sun3-160$ 

Sure enough:

sun3-160$ cat /dev/ptmx 
cat: /dev/ptmx: No such file or directory
sun3-160$ 

the-ripe-vessel:thorpej 29$ cat /dev/ptmx
^C
the-ripe-vessel:thorpej 30$ 

>How-To-Repeat:
See above.
>Fix:
Not provided.

>Release-Note:

>Audit-Trail:
From: Jason Thorpe <thorpej@me.com>
To: gnats-bugs@netbsd.org
Cc: port-sun3@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: port-sun3/57741: sshd fails to open a PTY on NetBSD/sun3
Date: Fri, 1 Dec 2023 12:49:42 -0800

 >=20
 >> Category:       port-sun3
 >> Responsible:    port-sun3-maintainer
 >> Synopsis:       sshd fails to open a PTY on NetBSD/sun3
 >> Arrival-Date:   Fri Dec 01 20:45:00 +0000 2023
 >=20

 Right, so the problem is that the install script that sun3 uses =
 doesn=E2=80=99t add an fstab entry for ptyfs, which is required in order =
 for openpty() to work.

 -- thorpej

From: Jason Thorpe <thorpej@me.com>
To: gnats-bugs@netbsd.org
Cc: port-sun3@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: port-sun3/57741: sshd fails to open a PTY on NetBSD/sun3
Date: Fri, 1 Dec 2023 14:35:07 -0800

 > On Dec 1, 2023, at 12:49 PM, Jason Thorpe <thorpej@me.com> wrote:
 >=20
 >>=20
 >>> Category:       port-sun3
 >>> Responsible:    port-sun3-maintainer
 >>> Synopsis:       sshd fails to open a PTY on NetBSD/sun3
 >>> Arrival-Date:   Fri Dec 01 20:45:00 +0000 2023
 >>=20
 >=20
 > Right, so the problem is that the install script that sun3 uses =
 doesn=E2=80=99t add an fstab entry for ptyfs, which is required in order =
 for openpty() to work.

 Ok, well, more like:

 - openpty() will still use legacy pty devices, if they exist, but will =
 prefer /dev/ptm.
 - posix_openpt() only works with /dev/ptm.
 - The new MAKEDEV that's installed by the install script does not make =
 legacy pty devices for "MAKEDEV all".

 Seems like the best course of action is to have the install script put a =
 ptyfs entry in the generated /etc/fstab.

 -- thorpej

Responsible-Changed-From-To: port-sun3-maintainer->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Mon, 04 Dec 2023 01:53:35 +0000
Responsible-Changed-Why:
Take.


State-Changed-From-To: open->analyzed
State-Changed-By: thorpej@NetBSD.org
State-Changed-When: Mon, 04 Dec 2023 01:53:35 +0000
State-Changed-Why:
Issue understood.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.