While attaching GDB to already running process with -p option, gdb crashed as , corresponding process was in the middle of its own crash . Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found). ..done. warning: td_ta_new failed: generic error warning: td_ta_new failed: generic error warning: Unable to find libthread_db matching inferior's thread library, th read debugging will not be available. Loaded symbols for /lib64/libpthread.so.0 Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done . Loaded symbols for /lib64/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols fo und)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /usr/lib64/libcxgb3-rdmav2.so...done. Loaded symbols for /usr/lib64/libcxgb3-rdmav2.so Reading symbols from /usr/lib64/libmthca-rdmav2.so...done. Loaded symbols for /usr/lib64/libmthca-rdmav2.so Reading symbols from /usr/lib64/libnes-rdmav2.so...done. Loaded symbols for /usr/lib64/libnes-rdmav2.so Reading symbols from /usr/lib64/libmlx4-rdmav2.so...done. Loaded symbols for /usr/lib64/libmlx4-rdmav2.so Reading symbols from /usr/lib64/libmlx4-m-rdmav2.so...done. Loaded symbols for /usr/lib64/libmlx4-m-rdmav2.so Cannot access memory at address 0x7f0bff1eb188 warning: td_ta_new failed: generic error warning: td_ta_new failed: generic error warning: Unable to find libthread_db matching inferior's thread library, th read debugging will not be available. Failed to read a valid object file image from memory. 0x00007f0bf4e85f95 in pthread_join () from /lib64/libpthread.so.0 (gdb) c Continuing. 0x00007f0bf4e85f95 in pthread_join () from /lib64/libpthread.so.0 ptrace: No such process. (gdb) c Continuing. 0x00007f0bf4e85f95 in pthread_join () from /lib64/libpthread.so.0 ptrace: No such process. (gdb) c Continuing. 0x00007f0bf4e85f95 in pthread_join () from /lib64/libpthread.so.0 ptrace: No such process. (gdb) q A debugging session is active. Inferior 1 [process 11892] will be detached. Quit anyway? (y or n) n Not confirmed. (gdb) q A debugging session is active. Inferior 1 [process 11892] will be detached. Quit anyway? (y or n) y [process 11892 exited] linux-nat.c:1766: internal-error: linux_nat_detach: Assertion `num_lwps (GE T_PID (inferior_ptid)) == 1' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y linux-nat.c:1766: internal-error: linux_nat_detach: Assertion `num_lwps (GE T_PID (inferior_ptid)) == 1' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) y
attached is the coredump collected from the GDB crash. http://irg.cs.ohiou.edu/~jdeshpan/misc/gdb.11995.coredump
I cannot reproduce it, do you still have it reproducible?