Path: utzoo!attcan!uunet!cs.utexas.edu!rice!sun-spots-request From: sitongia@hao.ucar.edu (Leonard Sitongia) Newsgroups: comp.sys.sun Subject: Re: STREAMS tty driver problems.. Keywords: SunOS Message-ID: <3113@brazos.Rice.edu> Date: 16 Nov 89 19:52:52 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 32 Approved: Sun-Spots@rice.edu X-Refs: Original: v8n192 X-Sun-Spots-Digest: Volume 8, Issue 200, message 3 of 11 In a previous article, sdl!monet!gregt@uunet.uu.net (Greg Tusar) writes: >I'm in the process of writing a STREAMS tty driver, and I'm having a >rather tough time of it. The driver is for an Omnibyte OB68K board which >sits in a Sun 4/260 (SunOS 4.0.3).. > >The specific problem that I've run up against is that when a port is >closed, and the stream is getting dismantled, something in qdetach() >generates a data fault... My close routine is nowhere in the call stack >trace. The actual call stack trace looks like this : This is a known SunOS 4.0.3 bug. Ask for the patch. We were having this problem also, with crashes up to 3 times a day, with the standard Sun software, apparently because we have so many (?) serial ports (3 ALM-2 boards). 1025622 Panic bus error in streams close code The panic was being caused by a naive fix to #1019499, which introduced a race condition in the streams open/close code that could cause a stream to be torn down even though someone else was in the middle of opening it; the resulting corruption of data would cause the system to panic at some later time, normally after carrier was detected, getty opened the line, called vhangup, and closed the line. Specificly, the panic would occur most often during the "close" above, since the queue's q_qinfo pointer pointed at something unexpected. The fix is to back out the original fix for #1019499, and modify the streams code to properly handle the case of background processes holding a stream open that has been hung up. Leonard E. Sitongia System Programmer (303) 497-1509 Internet: sitongia@hao.ucar.edu