From owner-freebsd-hackers Fri Jan 20 07:31:26 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id HAA12202 for hackers-outgoing; Fri, 20 Jan 1995 07:31:26 -0800 Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id HAA12054 for ; Fri, 20 Jan 1995 07:28:34 -0800 Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id QAA07101 for hackers@freebsd.org; Fri, 20 Jan 1995 16:26:25 +0100 From: Luigi Rizzo Message-Id: <199501201526.QAA07101@labinfo.iet.unipi.it> Subject: sio.c... To: hackers@FreeBSD.org Date: Fri, 20 Jan 1995 16:26:25 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2363 Sender: hackers-owner@FreeBSD.org Precedence: bulk Two questions about sio.c on FreeBSD 1.1.5 The first is easy, and deals with avoding the problem with processes which are not able to exit in case of hardware problems. In sioclose(), on 2.0R the call to the line_close routine is surrounded by a timeout/untimeout pair: timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz); (*linesw[tp->t_line].l_close)(tp, flag); untimeout(wakeup, TSA_OCOMPLETE(tp)); while 1.1.5R has only the call to l_close. Would it be possible to add the calls to timeout/untimeout on 1.1.5, or there are other changes needed ? [I know there are comments which say that the solution is far from being optimal; however, it would at least save me rebooting the system every time!] --- second question--- On the same 1.1.5 system here, I found out that a process here keeps blocking with WCHAN="siotx" (this happens with mgetty, when a particolar user drops the session, probably not in the most appropriate way). "siotx" seems to be present only in sio.c, function comparam(tp, t), in the following section of code, which is exactly the same as in 2.0R (I have no current sources handy): disable_intr(); retry: com->state &= ~CS_TTGO; enable_intr(); while ((inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY)) != (LSR_TSRE | LSR_TXRDY)) { error = ttysleep(tp, TSA_OCOMPLETE(tp), TTIPRI | PCATCH, "siotx", hz / 100); if (error != 0 && error != EAGAIN) { if (!(tp->t_state & TS_TTSTOP)) { disable_intr(); com->state |= CS_TTGO; enable_intr(); } splx(s); return (error); } } from which it appears that there is no timeout or other way out in case the modem is not responding properly. Wouldn't it be better to add an emergemcy exit after a proper timeout ? Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 ====================================================================