This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug threads/13869] Latest gdb 7.4 (CVS HEAD) has problem with"target async": Cannot get thread event message: debugger service failed
- From: "qiyao at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 23 May 2012 07:29:33 +0000
- Subject: [Bug threads/13869] Latest gdb 7.4 (CVS HEAD) has problem with"target async": Cannot get thread event message: debugger service failed
- Auto-submitted: auto-generated
- References: <bug-13869-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13869
Yao Qi <qiyao at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |qiyao at gcc dot gnu.org
AssignedTo|unassigned at sourceware |qiyao at gcc dot gnu.org
|dot org |
--- Comment #1 from Yao Qi <qiyao at gcc dot gnu.org> 2012-05-23 07:29:33 UTC ---
I can reproduce this problem on CVS trunk with existing test case
gdb.thread/manythreads.c
$ ./gdb -ex "set target-async on" -ex "set non-stop on" -ex "run"
./testsuite/gdb.threads/manythreads
...
Thread <255> executing
[Thread 0xb77feb70 (LWP 12986) exited]
[New Thread 0xb77feb70 (LWP 12987)]
Cannot get thread event message: debugger service failed
(gdb) (gdb) quit
Initial analysis shows that this problem is caused by the race condition
between gdb (with libthread_db) and inferior (with libpthreads.so) on accessing
some shared state variables, such as __nptl_last_event. The code in nptl to
access shared state variables is written in a thread-safe way (using some
atomic and compare-and-swap operations), however, GDB doesn't coordinate with
inferior on accessing them. The fix would be `stopping all threads in inferior
when gdb tries to access state variables in thread library in async & non-stop
mode'.
I'll post a patch to @gdb-patches in two or three days.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.