From owner-freebsd-current Wed Oct 23 20:53:08 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA06165 for current-outgoing; Wed, 23 Oct 1996 20:53:08 -0700 (PDT) Received: from rf900.physics.usyd.edu.au (rf900.physics.usyd.edu.au [129.78.129.109]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id UAA06149 for ; Wed, 23 Oct 1996 20:52:59 -0700 (PDT) Received: (from dawes@localhost) by rf900.physics.usyd.edu.au (8.6.11/8.6.9) id NAA18586; Thu, 24 Oct 1996 13:52:09 +1000 From: David Dawes Message-Id: <199610240352.NAA18586@rf900.physics.usyd.edu.au> Subject: Re: bug in 312S on ftp.freebsd.org To: spaz@u.washington.edu (John Utz) Date: Thu, 24 Oct 1996 13:52:09 +1000 (EST) Cc: XFree86@XFree86.org, current@freebsd.org In-Reply-To: from "John Utz" at Oct 23, 96 08:26:58 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >using the freebsd 2.2-961006 snap with the 312s distribution available >on 10/23/96 > >certain applications, such as netscape and ghostview fail with the error: > >xterm: error 50, errno 14: bad address This message is coming from xterm. In xterm/error.h, error 50 is: #define ERROR_SELECT 50 /* in_put: select() failed */ In xterm/charproc.c (in_put()): select_timeout.tv_sec = 0; select_timeout.tv_usec = 0; i = select(max_plus1, &select_mask, &write_mask, (int *)NULL, QLength(screen->display) ? &select_timeout : (struct timeval *) NULL); if (i < 0) { if (errno != EINTR) SysError(ERROR_SELECT); continue; } so, select is failing for some reason other than EINTR. errno 14 is: 14 EFAULT Bad address. The system detected an invalid address in attempt- ing to use an argument of a call. select_mask and write_mask are declared outside of in_put() as: static int select_mask; static int write_mask; and select_timeout is declared within in_put() as: static struct timeval select_timeout; so I can't imagine their addresses being invalid. The select stuff has changed a little in our current code: static fd_set select_mask; static fd_set write_mask; static struct timeval select_timeout; select_timeout.tv_sec = 0; if (XtAppPending(app_con)) select_timeout.tv_usec = 0; else select_timeout.tv_usec = 50000; i = select(max_plus1, &select_mask, &write_mask, NULL, (select_timeout.tv_usec == 0) || screen->awaitInput ? &select_timeout : NULL); I don't have that snap installed here, so I can't check this any further myself. David