From owner-freebsd-bugs@FreeBSD.ORG Tue May 23 00:20:11 2006 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 29E8B16A651 for ; Tue, 23 May 2006 00:20:11 +0000 (UTC) (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 165D143D53 for ; Tue, 23 May 2006 00:20:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4N0K9Bb088193 for ; Tue, 23 May 2006 00:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4N0K9Ga088187; Tue, 23 May 2006 00:20:09 GMT (envelope-from gnats) Resent-Date: Tue, 23 May 2006 00:20:09 GMT Resent-Message-Id: <200605230020.k4N0K9Ga088187@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, Miles Nordin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7071916AABB for ; Tue, 23 May 2006 00:11:30 +0000 (UTC) (envelope-from carton@Ivy.NET) Received: from sakima.Ivy.NET (sakima.Ivy.NET [69.31.131.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF86443D60 for ; Tue, 23 May 2006 00:11:28 +0000 (GMT) (envelope-from carton@Ivy.NET) Received: from castrovalva.Ivy.NET (castrovalva.Ivy.NET [IPv6:2001:4830:2150:c0::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sakima.Ivy.NET (Postfix) with ESMTP id AB5752FF59 for ; Mon, 22 May 2006 20:11:27 -0400 (EDT) Received: by castrovalva.Ivy.NET (Postfix, from userid 405) id DAC0E12FB03; Mon, 22 May 2006 20:11:24 -0400 (EDT) Message-Id: Date: Mon, 22 May 2006 20:11:24 -0400 From: Miles Nordin To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: kern/97665: hang in sio driver 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: Tue, 23 May 2006 00:20:12 -0000 >Number: 97665 >Category: kern >Synopsis: hang in sio driver >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 23 00:20:09 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Miles Nordin >Release: FreeBSD 6.0-RELEASE i386 >Organization: Ivy Ministries >Environment: System: FreeBSD pizarro 6.0-RELEASE FreeBSD 6.0-RELEASE #1: Tue Nov 8 20:23:54 UTC 2005 carton@cortez:/usr/src/sys/i386/compile/CORTEZ i386 >Description: >How-To-Repeat: freebsd's serial driver seems to hang up a lot. processes get stuck in uninterruptible sleep (don't respond to 'kill -9'), and i can release them by, say, power-cycling a modem. try this: first, get a serial device that holds CTS low. # stty crtscts < /dev/ttyd0.lock # stty crtscts < /dev/ttyd0.init # cu -l ttyd0 -s 9600 Connected. asdfasd;ljk;bouns;douahf ~. [EOT] ^T load: 0.00 cmd: cu 42104 [ttywai] 0.00u 0.03s 0% 752k now, open another window, and try 'kill -9 42104'. doesn't work. now for real fun try this: # ls -l /dev/cuad0 provided you type that command for the first time while the serial port is hung, you will hang devfs which will pretty soon hang the whole goddamned machine. once cuad0 node is instantiated, that vulnerability no longer exists. after some very long timeout on the order of minutes, the system may recover itself. Fix: IMHO, a process should always respond to 'kill -9' no matter _what_ SIO is doing, waiting for carrier, with data in the output buffer waiting for CTS to assert itself, whatever, period. I shouldn't have the process table cluttered with anything that can be removed only by changing the logic state of some serial port pin. serial is not a SCSI port---it's highly public. definitely sio activity should not be able to hang devfs. >Fix: >Release-Note: >Audit-Trail: >Unformatted: