From owner-freebsd-current Tue Aug 13 5:49:40 2002 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 91A3537B406; Tue, 13 Aug 2002 05:49:36 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C15E43E65; Tue, 13 Aug 2002 05:49:35 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id MAA18273; Tue, 13 Aug 2002 12:46:06 GMT Date: Tue, 13 Aug 2002 22:51:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: marius@alchemy.franken.de Cc: Gavin Atkinson , , Subject: Re: 100% reproducable hang: serial related In-Reply-To: <20020812163210.B96711@newtrinity.default-network.net> Message-ID: <20020813223707.B28507-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 12 Aug 2002 marius@alchemy.franken.de wrote: > On Mon, Aug 12, 2002 at 01:23:06PM +0100, Gavin Atkinson wrote: > > ... > > I have an i386 toshiba laptop, running FreeBSD 5.0-CURRENT #4: Sat Aug 10 > > 13:27:55 BST 2002. I can get a 100% reproducible hang by doing the > > following: > > > > - Connect a serial cable between my laptop and a PC > > - run "tip -9600 com1" > > (where com1 in /etc/remote is the default: > > "com1:dv=/dev/cuaa0:br#9600:pa=none:") > > - power down the PC. > > > > My laptop hangs solid, and DDB cannot be entered from the keyboard. Note > > that if I close tip before powering down the PC, i don't get a hang. I am > > not using ACPI. > > > > Interestingly, if I type something and then power up the PC again, that > > character will echo on the screen before locking up again. By > > power-cycling the PC frequently, i could actually carry on using my > > laptop. Power cycling the PC (either on->off or off->on) seems to unlock > > the laptop for a fraction of a second. > > ... > > i have similar symptoms on my toshiba tecra 8000 under -stable ever since > i installed fbsd on it (~4.1 i think), fbsd freezes when whatever terminal > emulation (tip, cu , minicom) is still running when the remote side is > powered down or the serial line is disconnected. but when the remote > side (pc, router, ...) is powered on or the serial line is connected > again fbsd unfreezes and continues to work. i had the "unlocks the > laptop for a fraction of a second" just once when the remote side was > an amiga 500... > imho this is enirely related to (some) toshiba serial interfaces, at least > i haven't seen this behaviour on other pcs running fbsd so far It is most likely a hardware problem that causes endless sio interrupts, most likely ones for modem status changes. sio doesn't handle this gracefully. It may spin forever in the interrupt handler or keep returning to the interrupt handler because changes or interrupts to report changes (respectively) happen faster than they can be processed. Some serial drivers have an option to not use the interrupt for modem status changes and/or automatically don't use it when CLOCAL is set. Try not using it in all cases by changing all instances of IER_EMSC in sio.c to 0. Look at the interrupt counts after doing something to bring the system back to see if sio handled endless interrupts while the system was hung. You would need to add an internal counter in the interrupt handler (siointr1()) to detect internal looping. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message