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 threads/17305] New: Hang when joining thread with gdb 7.8


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

            Bug ID: 17305
           Summary: Hang when joining thread with gdb 7.8
           Product: gdb
           Version: 7.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: threads
          Assignee: unassigned at sourceware dot org
          Reporter: rosslagerwall at gmail dot com

Created attachment 7756
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7756&action=edit
program to reproduce the problem

When using gdb 7.8 (or compiled from git), if a process does a pthread_join,
gdb and the process hang and gdb stops responding to any input (Ctrl-C, Ctrl-\,
Ctrl-z, etc). The only way to get out is to kill the process with SIGKILL, at
which point gdb begins responding again. This did not happen with gdb 7.7.1.

$ gcc -Wall -o test -g test.c -pthread
$ gdb test
Exception caught while booting Guile.
Error in function "open-file":
No such file or directory: "/usr/share/gdb/guile/gdb/boot.scm"

warning: Could not complete Guile gdb module initialization from:
/usr/share/gdb/guile/gdb/boot.scm.
Limited Guile support is available.
Suggest passing --data-directory=/path/to/gdb/data-directory.

GNU gdb (GDB) 7.8.50.20140824-cvs
Copyright (C) 2014 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-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /tmp/test...done.
(gdb) r
Starting program: /tmp/test 
Got object file from memory but can't read symbols: File truncated.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff780f700 (LWP 1277)]
test
test
test
test
test
test
test
test
test
test

At this point the process has hung (which it doesn't when not connected to gdb)
and gdb doesn't respond to any keyboard input.

$ ps aux | grep test
ross      1268  0.0  0.3 108580 26096 pts/0    Sl   22:45   0:00 gdb/gdb
/tmp/test
ross      1273  0.0  0.0  14588   740 pts/0    tl+  22:45   0:00 /tmp/test

For what it's worth, I'm running Arch Linux with Linux 3.16.1. Thanks!

-- 
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]