Bug#329901: xterm freezes when starting mc
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:
slimak@daradei:~/kodowanie/got/debian/xterm-210$ export CFLAGS=-g
slimak@daradei:~/kodowanie/got/debian/xterm-210$ ./configure --enable-trace
...
slimak@daradei:~/kodowanie/got/debian/xterm-210$ make
...
slimak@daradei:~/kodowanie/got/debian/xterm-210$ gdb xterm
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...Using host libthread_db library
"/lib/libthread_db.so.1".
(gdb) run
Starting program: /home/slimak/kodowanie/got/debian/xterm-210/xterm
(xterm started, i started mc from xterm it got frozen, i hit ctrl-c in gdb)
Program received signal SIGINT, Interrupt.
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
#5 0x000000000042c747 in AllocateAnsiColor (pTerm=0x595420, res=0x595778, spec=0x443ca5 "white") at ./misc.c:1454
#6 0x000000000042c8e3 in xtermGetColorRes (res=0x595778) at ./misc.c:1484
#7 0x000000000040c16d in SGR_Foreground (color=15) at ./charproc.c:805
#8 0x000000000040c4f4 in setExtendedFG () at ./charproc.c:881
#9 0x000000000040e101 in doparsing (c=109, sp=0x5615e0) at ./charproc.c:1869
#10 0x000000000040f9a0 in VTparse () at ./charproc.c:2785
#11 0x0000000000413687 in VTRun () at ./charproc.c:4737
#12 0x00000000004246df in main (argc=0, argv=0x7fff05c8d380) at ./main.c:2354
(gdb) kill
Kill the program being debugged? (u or n) y
tarting program: /home/slimak/kodowanie/got/debian/xterm-210/xterm
(xterm started, i started mc from xterm it got frozen a bit later, i hit ctrl-c in gdb)
Program received signal SIGINT, Interrupt.
0x00002b5555cc1c8f in poll () from /lib/libc.so.6
(gdb) bt
#0 0x00002b5555cc1c8f in poll () from /lib/libc.so.6
#1 0x00002b55558e6d2f in XProcessInternalConnection () from
/usr/lib/libX11.so.6
#2 0x00002b55558e7142 in _XRead () from /usr/lib/libX11.so.6
#3 0x00002b55558e7b81 in _XReply () from /usr/lib/libX11.so.6
#4 0x00002b55558d4c3b in XParseColor () from /usr/lib/libX11.so.6
#5 0x000000000042c747 in AllocateAnsiColor (pTerm=0x595420, res=0x5956d0, spec=0x443c05 "gray50") at ./misc.c:1454
#6 0x000000000042c8e3 in xtermGetColorRes (res=0x5956d0) at ./misc.c:1484
#7 0x000000000040c16d in SGR_Foreground (color=8) at ./charproc.c:805
#8 0x000000000040c4f4 in setExtendedFG () at ./charproc.c:881
#9 0x000000000040e101 in doparsing (c=109, sp=0x5615e0) at ./charproc.c:1869
#10 0x000000000040f9a0 in VTparse () at ./charproc.c:2785
#11 0x0000000000413687 in VTRun () at ./charproc.c:4737
#12 0x00000000004246df in main (argc=0, argv=0x7fff55c88370) at
./main.c:2354
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb) run
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 ;)
Program received signal SIGINT, Interrupt.
0x00002b8583743a45 in select () from /lib/libc.so.6
(gdb) bt
#0 0x00002b8583743a45 in select () from /lib/libc.so.6
#1 0x000000000041027c in in_put () at ./charproc.c:3190
#2 0x000000000041036c in doinput () at ./charproc.c:3222
#3 0x000000000040f993 in VTparse () at ./charproc.c:2785
#4 0x0000000000413687 in VTRun () at ./charproc.c:4737
#5 0x00000000004246df in main (argc=0, argv=0x7fff282058f0) at ./main.c:2354
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb)
> Doing that would give more insight into the problem - to see whether it's
> an X library problem, or whether xterm's gotten into some state that I
> could fix.
What next?
Regards
Jan Górski
Reply to: