Description of problem: [root@nostromo notting]# gdb /bin/stty $(pidof stty) GNU gdb Red Hat Linux (6.5-8.fc6rh) 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 "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". Attaching to program: /bin/stty, process 3044 ../../gdb/linux-nat.c:1057: internal-error: linux_nat_attach: Assertion `pid == GET_PID (inferior_ptid) && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Version-Release number of selected component (if applicable): gdb-6.5-8.fc6 kernel-2.6.18-1.2741.fc6 Process tree is: 3041 tty1 T 0:00 \_ /bin/sh /etc/X11/xinit/xinitrc 3044 tty1 T 0:00 \_ stty iutf8 (not sure why they're in 'T')
It is already fixed in gdb-6.5-9.fc6 which will be present in RawHide after FC6 gets released. FC6 will contain "gdb-6.5-8.fc6". Bug is present even upstream. 'T' state looks as SIGSTOP from some SIGTTIN or SIGTTOU due to stty(1) not being supplied proper console descriptor as fd 0.
gdb-6.5-13.fc6 has been pushed for fc6, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.
Originally submitted as: http://sources.redhat.com/ml/gdb-patches/2006-09/msg00092.html