From owner-freebsd-bugs@FreeBSD.ORG Fri Oct 7 00:40:13 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48EC316A423 for ; Fri, 7 Oct 2005 00:40:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC69943D4C for ; Fri, 7 Oct 2005 00:40:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j970eCVV055932 for ; Fri, 7 Oct 2005 00:40:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j970eCcm055931; Fri, 7 Oct 2005 00:40:12 GMT (envelope-from gnats) Resent-Date: Fri, 7 Oct 2005 00:40:12 GMT Resent-Message-Id: <200510070040.j970eCcm055931@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, kapil Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2213016A41F for ; Fri, 7 Oct 2005 00:36:41 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id D917943D46 for ; Fri, 7 Oct 2005 00:36:40 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j970aerZ039762 for ; Fri, 7 Oct 2005 00:36:40 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j970aedW039761; Fri, 7 Oct 2005 00:36:40 GMT (envelope-from nobody) Message-Id: <200510070036.j970aedW039761@www.freebsd.org> Date: Fri, 7 Oct 2005 00:36:40 GMT From: kapil To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: misc/87022: telnet hang in ptcout X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2005 00:40:13 -0000 >Number: 87022 >Category: misc >Synopsis: telnet hang in ptcout >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 07 00:40:12 GMT 2005 >Closed-Date: >Last-Modified: >Originator: kapil >Release: 4.11 >Organization: >Environment: 4.11-RELEASE-p10 >Description: If some characters and a cntrl C is entered on a telnet session before the child for slave tty is forked, the ptyflush will hang on write call, since slave tty is not open and will just wait there. >How-To-Repeat: An easy way to reproduce this problem is: set connection limit on telnet to 1 (using inetd.conf). Connect the 1st and 2nd session. 2nd session will not show the login prompt. Here enter one or more characters and then ctrl C. Now exit the 1st session. The second sessions telentd is spawned but hangs on ptcout. Even if you exit the session, no more telnet sessions are allowed (unless connection limit is increased or telentd is killed) >Fix: One fix is to not call interrupt/ptyflush unless the slave tty has been opened. In the kernel, probably there should be a way to awaken the sleeping process once the connection goes away. It doesn't seem to be. >Release-Note: >Audit-Trail: >Unformatted: