This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug server/20053] New: As a side effect of patch supporting "Target remote mode fork and exec event support". Cross-debugging with gdbserver fails to hit breakpoint in parent after many fork / exec's.
- From: "ranjan.amit8 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 06 May 2016 10:32:17 +0000
- Subject: [Bug server/20053] New: As a side effect of patch supporting "Target remote mode fork and exec event support". Cross-debugging with gdbserver fails to hit breakpoint in parent after many fork / exec's.
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20053
Bug ID: 20053
Summary: As a side effect of patch supporting "Target remote
mode fork and exec event support". Cross-debugging
with gdbserver fails to hit breakpoint in parent after
many fork / exec's.
Product: gdb
Version: 7.11
Status: NEW
Severity: critical
Priority: P2
Component: server
Assignee: unassigned at sourceware dot org
Reporter: ranjan.amit8 at gmail dot com
Target Milestone: ---
On my target(x86_64) after cross-debugging a program with "follow fork / follow
exec" enabled, it fails to hit a breakpoint in the parent program after many
fork/exec's. The gdbserver prints following error message near the end of the
program:
gdb/7.11-r0/gdb-7.11/gdb/gdbserver/linux-low.c:1922: A problem internal to
GDBserver has been detected.
unsuspend LWP 842, suspended=-1
And Host Side I am getting gdb error as:
gdb-cross-x86_64/7.11-r0/gdb-7.11/gdb/thread.c:1100: internal-error:
finish_thread_state: Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
-----------------
STEPS TO REPRODUCE:-
wget http://www.gzip.org/gz124src.zip
unzip gz124src.zip
cd gz124
./configure
time make -j 4 # real 1.5 sec / user 5.124 sec
make clean
gdbserver :1234 time make -j 4
# Back on the host, perform the following:
gdb
set non-stop on
target remote 128.224.199.101:1234
set pagination off
set follow-fork-mode parent
set detach-on-fork off
b time.c:654
cont
--> The program runs to end, and gdbserver prints an error
--> Expected: The breakpoint at time.c:654 should hit.
-------------
ANALYSIS:-
On Analyzing the issue I identified that patch supporting the functionality
"support fork and exec events for target remote mode Linux targets",
reference:(https://sourceware.org/ml/gdb-patches/2015-11/msg00209.html)
is causing the problem. If we remove this particular patch then issue gets
resolved. May be this patch have some side effect which is not taken care.
Up-streamed Link:-
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=8020350c5277e056e89b0ea5e14a8d09408f7fb3
--------------------
References:- https://sourceware.org/bugzilla/show_bug.cgi?id=13584
--
You are receiving this mail because:
You are on the CC list for the bug.