public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: sergiodj+buildbot@redhat.com
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] gdbserver crash if gdb attaches too fast
Date: Mon, 30 Nov 2015 22:32:00 -0000	[thread overview]
Message-ID: <500c1d8576ad5a5bdc791fc7f7c3518a4d3f4b39@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 500c1d8576ad5a5bdc791fc7f7c3518a4d3f4b39 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 500c1d8576ad5a5bdc791fc7f7c3518a4d3f4b39

gdbserver crash if gdb attaches too fast

With "maint set target-non-stop on", the attach tests occasionally
crash gdbserver.

Basically, gdb attaches with vAttach;PID, and then shortly after reads
the xml target description for that process, to figure out the
process' architecture.  On the gdbserver side, the target description
is only filled in when the first process/thread in the thread group
reports its initial PTRACE_ATTACH SIGSTOP.  So if GDB is fast enough,
it can read the target description _before_ that initial stop, and
then gdbserver dies dereferencing a NULL tdesc pointer.

gdb/gdbserver/ChangeLog:
2015-11-30  Pedro Alves  <palves@redhat.com>

	* linux-low.c (linux_attach): In non-stop mode, wait for one stop
	before returning.


             reply	other threads:[~2015-11-30 22:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 22:32 sergiodj+buildbot [this message]
2015-11-30 22:37 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
2015-11-30 22:44 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2015-11-30 22:54 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-12-01  0:16 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2015-12-01  1:54 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2015-12-01  3:43 ` Failures on Debian-i686, " sergiodj+buildbot
2015-12-01  4:30 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2015-12-01  6:06 ` Failures on Debian-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2015-12-01 13:24 ` Failures on Fedora-i686, " sergiodj+buildbot
2015-12-01 13:32 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2015-12-01 13:34 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-12-01 13:43 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2015-12-08  9:14 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
2015-12-08  9:27 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2015-12-08 10:04 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-12-09  1:42 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-12-09  1:53 ` Failures on Fedora-ppc64le-cc-with-index, " sergiodj+buildbot
2015-12-09  2:16 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot
2015-12-09  2:50 ` Failures on Fedora-ppc64le-m64, " sergiodj+buildbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=500c1d8576ad5a5bdc791fc7f7c3518a4d3f4b39@gdb-build \
    --to=sergiodj+buildbot@redhat.com \
    --cc=gdb-testers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).