[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#229566: xterm fails to start with EINVAL



On Fri, 30 Jan 2004, Branden Robinson wrote:

> On Thu, Jan 29, 2004 at 08:58:25PM -0500, Thomas Dickey wrote:
> > On Wed, Jan 28, 2004 at 11:37:39PM -0500, Branden Robinson wrote:
> >
> > > Don Armstrong and I both have PowerPC machines, but he experiences the
> > > problem, and I don't.
> > >
> > > I prepared an unstripped, unoptimized, trace-enabled xterm binary for
> > > PowerPC and Don and I each produced xterm Traces and system call
> > > straces.
> > >
> > > Hopefully these will be of some use in tracking down the bug.
> >
> > They seem to give some hints.  Your trace shows the process-ids, no timestamps
> > and Don's doesn't show process-ids.  But stripping away that column, I can see
> > that his process is (I'm guessing) running on a network connection while yours
> > is local machine (that's guessing by looking at some of the calls they make).
> > His is getting occasional EAGAIN errno's reading from the pty (perhaps because
> > it's slower).  I don't see any detail from the subprocess on his - perhaps it
> > doesn't use the -f option of strace.  Anyway, it seems that the failure is
> > on the child process, since I don't see a call on the parent side that fails.
>
> Don was running across a network connection, but he said he experienced
> the exact same problem locally.

So it's not that (network delay).  But a little more information might
help.  From the original report, I think this chunk in main.c is where
it's failing - but no idea why (around line 3415):

#ifndef USE_POSIX_TERMIOS
                if (ioctl(tty, TCSETA, &tio) == -1)
                    HsSysError(cp_pipe[1], ERROR_TIOCSETP);
#else /* USE_POSIX_TERMIOS */
                if (tcsetattr(tty, TCSANOW, &tio) == -1)
                    HsSysError(cp_pipe[1], ERROR_TIOCSETP);
#endif /* USE_POSIX_TERMIOS */

Since the '23' would be ERROR_TIOCSETP.  There're several calls before
that in the child process, and I can only guess what's going on.  (This
one looks hard enough even if I could reproduce it).  I generally do
something like
	strace -tfo foo.out ./xterm
for this sort of thing...

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




Reply to: