From owner-freebsd-bugs Tue Oct 20 10:30:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA10612 for freebsd-bugs-outgoing; Tue, 20 Oct 1998 10:30:05 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA10593 for ; Tue, 20 Oct 1998 10:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id KAA29972; Tue, 20 Oct 1998 10:30:01 -0700 (PDT) Date: Tue, 20 Oct 1998 10:30:01 -0700 (PDT) Message-Id: <199810201730.KAA29972@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Bruce Evans Subject: Re: kern/8324: failure to deliver SIGIO when fildes marked for async i/o Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/8324; it has been noted by GNATS. From: Bruce Evans To: archie@whistle.com Cc: Subject: Re: kern/8324: failure to deliver SIGIO when fildes marked for async i/o Date: Thu, 15 Oct 1998 17:52:43 +1000 >>Description: > > Run the program below. It will periodically hang until > you press return (which causes a readability condition). > It should (as far as I can tell) generate continuous > output without pausing at all. The program seems to only make sense for ttys (fcntl returns a value which is always ignored...) and seems to only hang for ptys. It hangs because wakeups for output-wouldn't block are only sent to processes in the kernel - for output there are only select-style wakeups, not SIGIO wakeups. The select-style wakeups are poorly implemented too - processes gets woken up whenever the space in the output buffer increases, and then usually go back to sleep until the space reaches a watermark. While debugging this, I was reminded of other problems: the O_NONBLOCK and O_ASYNC flags are sticky, and syscons is not reentrant - a breakpoint in ttwakeup() soon caused a panic. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message