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

Bug#329901: xterm freezes when starting mc



On Thu, Nov 02, 2006 at 12:44:03AM +0100, Jan Gorski wrote:
> On Mon, 30 Oct 2006 at 18:50:46 -0500, Thomas Dickey wrote:
> > If you could reproduce it with a copy of xterm built with debug code,
> > then it's possible that you could attach it with gdb from another window
> > and see where it's hanging.  You wouldn't need the setgid mode on the
> > executable, since it's unlikely that the utmp code is involved.
> 
> That is what I have done:

thanks.  The first two look more like a problem with X libraries than
xterm, though there's the possibility that mc is asking for a large
number of color changes (I don't think so...), and xterm isn't handling
it that well.

But you did say xinerama - and there's some question in my mind whether
the hang is happening on the second screen (and whether xterm is
handling a second screen properly - not being that familiar with xinerama).

xterm is using the default screen of the display, which may not be the
right thing in a multi-screen system (I'm not sure whether xinerama is
supposed to "just work").

> 
> slimak@daradei:~/kodowanie/got/debian/xterm-210$ export CFLAGS=-g
...
> 0x00002b98a5cbcc8f in poll () from /lib/libc.so.6
> (gdb) bt
> #0  0x00002b98a5cbcc8f in poll () from /lib/libc.so.6
> #1  0x00002b98a58e1d2f in XProcessInternalConnection () from /usr/lib/libX11.so.6
> #2  0x00002b98a58e2142 in _XRead () from /usr/lib/libX11.so.6
> #3  0x00002b98a58e2b81 in _XReply () from /usr/lib/libX11.so.6
> #4  0x00002b98a58cfc3b in XParseColor () from /usr/lib/libX11.so.6

You could add a printf to get the number of screens in the display,
e.g., I did this (enabling trace), but a printf would also work:

    Trace("FIXME %d\n", dpy->default_screen);
    Trace("FIXME %d\n", dpy->nscreens);
    if (XParseColor(screen->display, cmap, spec, &def)

For the normal single-screen, that's default_screen=0, nscreens=1.

> Starting program: /home/slimak/kodowanie/got/debian/xterm-210/xterm
> (xterm started, i run mc in it, it does no freeze this time, but i interrupt it anyway ;)

That's more normal - I'd expect it to be in a select() call "most" of the
time.  There are some possible error conditions where it would stay there
too long (or not often enough).

Next - to see if xterm is seeing more than one screen, if being started
on the second screen is the cause of the problem (confusing X), and if so,
whether the display information passed to xterm can tell it to use a
different screen number.  If that's the explanation, I can modify xterm
to take that into account.  (If it's not, I'm still puzzled ;-)

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

Attachment: pgpDYZ4NH2hBf.pgp
Description: PGP signature


Reply to: