Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 1996 13:52:09 +1000 (EST)
From:      David Dawes <dawes@rf900.physics.usyd.edu.au>
To:        spaz@u.washington.edu (John Utz)
Cc:        XFree86@XFree86.org, current@freebsd.org
Subject:   Re: bug in 312S on ftp.freebsd.org
Message-ID:  <199610240352.NAA18586@rf900.physics.usyd.edu.au>
In-Reply-To: <Pine.OSF.3.95.961023201438.19462A-100000@becker2.u.washington.edu> from "John Utz" at Oct 23, 96 08:26:58 pm

next in thread | previous in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610240352.NAA18586>