[binutils-gdb] AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[binutils-gdb] AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

sergiodj+buildbot-2
*** TEST RESULTS FOR COMMIT 754e31689866524049b9cfc68053ed4e1293cfac ***

Author: Alan Hayward <[hidden email]>
Branch: master
Commit: 754e31689866524049b9cfc68053ed4e1293cfac

AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

On some heavily loaded AArch64 boxes, GDB will sometimes hang forever when
the inferior creates a thread.  This hang happens inside the kernel during
the ptrace call to set hardware watchpoints or hardware breakpoints.
Currently, GDB will always set hw wp/bp at the start of each thread even if
there are none set in the process.

This patch works around the issue by avoiding setting hw wp/bp if there
are none set for the process.

On an effected machine, this fix drastically reduces the racy nature of the
gdb.threads test set.  I ran the entire gdb test suite across all processors
for 100 iterations, then ran the results through the racy tests script.
Without the patch, 58 .exp files in gdb.threads were marked as racy.  After
the patch this reduced to the same ~14 tests as the non effected boxes.

Clearly GDB will still be subject to hangs on an effect box if hw wp/bp's are
used prior to creating inferior threads on a heavily loaded system.

To enable this in gdbserver, the sequence in gdbserver add_lwp() is switched
to the same as gdb order as gdb, to ensure the thread is registered before
calling new_thread().  This allows aarch64_linux_new_thread() to read the
ptid.

gdb/ChangeLog:

        * nat/aarch64-linux-hw-point.c
        (aarch64_linux_any_set_debug_regs_state): New function.
        * nat/aarch64-linux-hw-point.h
        (aarch64_linux_any_set_debug_regs_state): New declaration.
        * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
        BPs or WPs are set.

gdb/gdbserver/ChangeLog:

        * linux-low.c (add_lwp): Switch ordering.
Reply | Threaded
Open this post in threaded view
|

Failures on RHEL-s390x-m64, branch master

sergiodj+buildbot-2
Buildslave:
        rhel-7_1-s390x-1

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/RHEL-s390x-m64/builds/8880>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/RHEL-s390x-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/RHEL-s390x-m64/xfails/master/xfail?id=e8b4bade>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/RHEL-s390x-m64/xfails/master/xfail.table?id=e8b4bade>



Reply | Threaded
Open this post in threaded view
|

Failures on Debian-s390x-native-extended-gdbserver-m64, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        debian-jessie-s390x-1

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Debian-s390x-native-extended-gdbserver-m64/builds/7186>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Debian-s390x-native-extended-gdbserver-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Debian-s390x-native-extended-gdbserver-m64/xfails/master/xfail?id=7e6e0858>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Debian-s390x-native-extended-gdbserver-m64/xfails/master/xfail.table?id=7e6e0858>



Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-i686, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        fedora-x86-64-2

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Fedora-i686/builds/11593>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Fedora-i686/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-i686/xfails/master/xfail?id=d9b5a952>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-i686/xfails/master/xfail.table?id=d9b5a952>



Reply | Threaded
Open this post in threaded view
|

Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        ubuntu16-aarch64

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Ubuntu-Aarch64-native-extended-gdbserver-m64/builds/236>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>




Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        fedora-x86-64-4

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-native-extended-gdbserver-m32/builds/11272>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Fedora-x86_64-native-extended-gdbserver-m32/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
PASS -> FAIL: gdb.multi/bkpt-multi-exec.exp: run
PASS -> FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: continue
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-extended-gdbserver-m32/xfails/master/xfail?id=d39bf374>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-extended-gdbserver-m32/xfails/master/xfail.table?id=d39bf374>



Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        fedora-x86-64-3

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-native-extended-gdbserver-m64/builds/11543>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Fedora-x86_64-native-extended-gdbserver-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-extended-gdbserver-m64/xfails/master/xfail?id=ed344788>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-extended-gdbserver-m64/xfails/master/xfail.table?id=ed344788>



Reply | Threaded
Open this post in threaded view
|

Failures on Ubuntu-Aarch64-native-gdbserver-m64, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        ubuntu16-aarch64

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Ubuntu-Aarch64-native-gdbserver-m64/builds/4605>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Ubuntu-Aarch64-native-gdbserver-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>




Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m64, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        fedora-x86-64-2

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-native-gdbserver-m64/builds/11508>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Fedora-x86_64-native-gdbserver-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
new UNRESOLVED: gdb.mi/mi-break.exp: mi-mode=separate:
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-gdbserver-m64/xfails/master/xfail?id=0fc024e7>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-gdbserver-m64/xfails/master/xfail.table?id=0fc024e7>



Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m64, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        fedora-x86-64-4

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m64/builds/11647>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Fedora-x86_64-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
PASS -> FAIL: gdb.base/foll-vfork.exp: exit: vfork relations in info inferiors: vfork relation no longer appears in info inferiors
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-m64/xfails/master/xfail?id=cdf6907c>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-m64/xfails/master/xfail.table?id=cdf6907c>



Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m32, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        fedora-x86-64-3

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m32/builds/11345>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Fedora-x86_64-m32/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-m32/xfails/master/xfail?id=4e4add6c>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-m32/xfails/master/xfail.table?id=4e4add6c>



Reply | Threaded
Open this post in threaded view
|

Failures on Ubuntu-Aarch64-m64, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        ubuntu16-aarch64

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Ubuntu-Aarch64-m64/builds/4673>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Ubuntu-Aarch64-m64/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
new KFAIL: gdb.base/step-over-syscall.exp: clone: displaced=on: single step over clone
PASS -> UNRESOLVED: gdb.mi/list-thread-groups-available.exp: list available thread groups
PASS -> FAIL: gdb.mi/list-thread-groups-available.exp: list available thread groups with filter
PASS -> FAIL: gdb.server/ext-attach.exp: attach to remote program 1
PASS -> FAIL: gdb.server/ext-attach.exp: backtrace 1
PASS -> FAIL: gdb.server/ext-attach.exp: detach
PASS -> FAIL: gdb.server/ext-attach.exp: monitor exit
PASS -> FAIL: gdb.threads/multi-create.exp: continue to breakpoint 6
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Ubuntu-Aarch64-m64/xfails/master/xfail?id=60187cc3>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Ubuntu-Aarch64-m64/xfails/master/xfail.table?id=60187cc3>



Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m32, branch master

sergiodj+buildbot-2
In reply to this post by sergiodj+buildbot-2
Buildslave:
        fedora-x86-64-1

Full Build URL:
        <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-native-gdbserver-m32/builds/11278>

Commit(s) tested:
        754e31689866524049b9cfc68053ed4e1293cfac

Author(s) (in the same order as the commits):
        Alan Hayward <[hidden email]>

Subject:
        AArch64: Racy: Don't set empty set of hardware BPs/WPs on new thread

Testsuite log (gdb.sum and gdb.log) URL(s):
        <http://gdb-build.sergiodj.net/results/Fedora-x86_64-native-gdbserver-m32/75/754e31689866524049b9cfc68053ed4e1293cfac/>

*** Diff to previous build ***
============================
new FAIL: gdb.base/corefile.exp: core-file warning-free
============================


*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-gdbserver-m32/xfails/master/xfail?id=f5591e61>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://git.sergiodj.net/gdb-xfails.git/tree/xfails/Fedora-x86_64-native-gdbserver-m32/xfails/master/xfail.table?id=f5591e61>