Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [RFC] Set process affinity in test to work around ARM ptrace bug
Date: Thu, 30 Jun 2016 15:32:00 -0000	[thread overview]
Message-ID: <af0b4e20-faba-8c51-4d98-3bbbd5899f39@redhat.com> (raw)
In-Reply-To: <1467295036-2816-1-git-send-email-yao.qi@linaro.org>

On 06/30/2016 02:57 PM, Yao Qi wrote:

> Then, I am thinking we can workaround this bug in testing, because the
> intermittent fails are confusing in comparing test results, by binding
> both tracer and tracee on the same core.  For example, we can start GDB
> or GDBserver with "taskset -c 0 ", but this is a global change, may
> have some affects on gdb.threads tests.
> I also think about doing
> "taskset -p PID -c 0" in test harness after the inferior is started,
> and do the same to the parent process of inferior (which is either GDB
> or GDBserver).
> 
> The approach in this patch is to have a small c function which sets
> both process affinity and its parent's affinity to core 0.  This
> function should be called in these tests explicitly, but other tests
> are not affected at all.  This patch is posted to get comments on the
> necessity of workaround this kernel bug, and the proper to workaround
> this bug.  There are still some test cases affected by this kernel bug,
> but this patch doesn't touch them yet.

Pushing people to update their kernels would be better, but I
understand how that's complicated on ARM, given that in many cases
it's not even possible to have access to the kernel's sources...

Still, it'd think that a fix in gdb/gdbserver itself would be
better  for _users_.

Also having to manually determine whether a test is misbehaving
because of this problem or not seems like recipe for continued pain.

I also think that whatever workaround, if any, should be limited
to known-broken kernels.  Otherwise, this is likely to mask
other problems going forward.  Maybe all we have is the version
number to work with, but that's still better than unconditionally
enabling this on arm.

Thanks,
Pedro Alves


  parent reply	other threads:[~2016-06-30 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 13:57 Yao Qi
2016-06-30 14:20 ` Antoine Tremblay
2016-06-30 15:32 ` Pedro Alves [this message]
2016-07-04 10:50   ` Yao Qi
2016-07-25 13:22     ` Yao Qi
2016-07-25 14:28       ` Pedro Alves
2016-09-01 14:48         ` Yao Qi
2016-09-02  1:00           ` Pedro Alves
2016-09-02  8:24             ` Yao Qi

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=af0b4e20-faba-8c51-4d98-3bbbd5899f39@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /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