This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug cli/19301] New: gdb hangs if process will not stop


https://sourceware.org/bugzilla/show_bug.cgi?id=19301

            Bug ID: 19301
           Summary: gdb hangs if process will not stop
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: 0xloem at gmail dot com
  Target Milestone: ---

I cannot attach to a process I have which is using 100% cpu.  GDB simply hangs,
and offers no output as to the cause.  I think it would be great if GDB gave me
information on what the hang was about, for example "WARNING: process has not
[done something necessary] after waiting for 10s."

Stack trace:
(gdb) bt
#0  0x00007f20a3a40b6a in waitpid () from /lib64/libpthread.so.0
#1  0x0000560d4e778749 in my_waitpid (pid=7576, status=0x7fff2dc2edac, flags=0)
at ./nat/linux-waitpid.c:141
#2  0x0000560d4e75df7b in linux_nat_post_attach_wait (ptid=..., first=1,
cloned=0x560d4f31b82c, signalled=0x560d4f31b830) at linux-nat.c:1013
#3  0x0000560d4e75eb7c in linux_nat_attach (ops=0x560d4f1d0810,
args=0x560d4f15b070 "7576", from_tty=1) at linux-nat.c:1313
#4  0x0000560d4e90d222 in attach_command (args=0x560d4f15b070 "7576",
from_tty=1) at infcmd.c:2748
#5  0x0000560d4e93a2a6 in catch_command_errors (command=0x560d4e90d0ec
<attach_command>, arg=0x7fff2dc30a5c "7576", from_tty=1) at main.c:368
#6  0x0000560d4e93b88f in captured_main (data=0x7fff2dc2f1c0) at main.c:1073
#7  0x0000560d4e933a28 in catch_errors (func=0x560d4e93a7a1 <captured_main>,
func_args=0x7fff2dc2f1c0, errstring=0x560d4ecf63e9 "", mask=RETURN_MASK_ALL) at
exceptions.c:240
#8  0x0000560d4e93bb71 in gdb_main (args=0x7fff2dc2f1c0) at main.c:1165
#9  0x0000560d4e6fa59f in main (argc=3, argv=0x7fff2dc2f2d8) at gdb.c:32


Environment:
$ uname -a
Linux livecd 4.1.13+ #1 SMP Wed Nov 18 06:53:18 EST 2015 x86_64 Intel(R)
Core(TM) i5-3340M CPU @ 2.70GHz GenuineIntel GNU/Linux
$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.5/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.5/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.8.5/work/gcc-4.8.5/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.5
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.5
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.5/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.5/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/g++-v4
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.5/python
--enable-languages=c,c++,java,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --disable-nls --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 4.8.5
p1.3, pie-0.6.2' --enable-esp --enable-libstdcxx-time --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-altivec
--disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libmudflap --disable-libssp --enable-lto --without-cloog
--disable-libsanitizer
Thread model: posix
gcc version 4.8.5 (Gentoo Hardened 4.8.5 p1.3, pie-0.6.2) 
$ gdb -v
GNU gdb (GDB) 7.10.50.20151129-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
(gdb) show configuration
This GDB was configured as follows:
   configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/usr/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/lib/gdb (relocatable)
             --without-libunwind-ia64
             --with-lzma
             --with-python=/usr (relocatable)
             --without-guile
             --with-separate-debug-dir=/usr/lib/debug (relocatable)
             --without-babeltrace

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]