From owner-freebsd-current@FreeBSD.ORG Thu Feb 26 18:36:07 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B313816A4CE for ; Thu, 26 Feb 2004 18:36:07 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BCDF43D39 for ; Thu, 26 Feb 2004 18:36:07 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.11/8.12.11) with ESMTP id i1R2a5AW097730 for ; Fri, 27 Feb 2004 05:36:05 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.11/8.12.11/Submit) id i1R2a5rY097728 for current@freebsd.org; Fri, 27 Feb 2004 05:36:05 +0300 (MSK) (envelope-from ache) Date: Fri, 27 Feb 2004 05:36:04 +0300 From: Andrey Chernov To: current@freebsd.org Message-ID: <20040227023602.GA96917@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.24.0.5; VDF 6.24.0.20 Subject: Very strange tty-related bug in recent -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2004 02:36:07 -0000 Since too many components involved here (ssh, pty driver, tty driver), I can't trace it down well yet. Symptoms are: After some time (say, 30mins) of normal working ncurses-based programs (such as less, mutt, lynx) "go mad", i.e. redisplay screen wrongly or start to eat input, etc. Restarting program helps only for small (say 1min) time. Restarting ssh helps permanently or for 30mins, as above. I trace down one particular situation with mutt and found that stdin descriptor flags are changed after poll() with timeout syscall: O_NONBLOCK is added there! It sounds almost impossible and I can't find obvious places in the kernel code, where it may occurse, but it is so. It explains why characters are eated in the mutt: read returns -1 and EAGAIN but curses expect waiting for char. Does somebody else seeng something similar too? -- Andrey Chernov | http://ache.pp.ru/