This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/17108] New: Some records are not output after rapidly attaching to inferiors
- From: "dryden2 at illinois dot edu" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 02 Jul 2014 20:58:42 +0000
- Subject: [Bug mi/17108] New: Some records are not output after rapidly attaching to inferiors
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17108
Bug ID: 17108
Summary: Some records are not output after rapidly attaching to
inferiors
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: mi
Assignee: unassigned at sourceware dot org
Reporter: dryden2 at illinois dot edu
Created attachment 7676
--> https://sourceware.org/bugzilla/attachment.cgi?id=7676&action=edit
GDB input/output
OS: Linux 2.6.32-431.17.1.el6.x86_64 on a 12-core Intel machine.
GDB version: 7.7.1
Rapidly attaching to multiple inferiors while using the machine interface, such
as with a program loop or by copy-pasting the commands all at once, results in
the *stopped and =library-loaded records for some inferiors to not be output.
Adding a pause of about 0.1 s after the first attach seems to avoid the
problem.
Reproducing:
I use
#include <stdio.h>
#include <unistd.h>
int main(int argc, char** argv) {
int i = 0;
while (i != 1) {
sleep(1);
}
}
as my test program. Start twelve instances: for i in `seq 1 12`; do ( ./test &
); done
Then I start GDB: gdb --quiet --nx --nw --interpreter=mi2
And paste the following all at once (with the appropriate PIDs) to GDB:
00000000-enable-pretty-printing
00000001-gdb-set target-async on
00000002-gdb-set pagination off
00000003-gdb-set non-stop on
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000004-add-inferior
00000005-target-attach --thread-group i1 PID
00000006-target-attach --thread-group i2 PID
00000007-target-attach --thread-group i3 PID
00000008-target-attach --thread-group i4 PID
00000009-target-attach --thread-group i5 PID
00000010-target-attach --thread-group i6 PID
00000011-target-attach --thread-group i7 PID
00000012-target-attach --thread-group i8 PID
00000013-target-attach --thread-group i9 PID
00000014-target-attach --thread-group i10 PID
00000015-target-attach --thread-group i11 PID
00000016-target-attach --thread-group i12 PID
Actual results: See the attachment for GDB's output. The *stopped and
=library-loaded records are not output for inferior i1, but are for the other
inferiors.
Expected results: GDB should output the records for every inferior.
It seems that pausing after the first attach results in everything working as
expected.
--
You are receiving this mail because:
You are on the CC list for the bug.