This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Avoid deadlock in guality tests.


Hi,

we are confronted to a deadlock situation when doing native validation
on armv8l target.

When gcc/testsuite/gcc.dg/guality/example.c is executed it spawns gdb,
and makes it attach to his parent, but during the test execution, gdb
receives a SIGSEGV, which is handled as a stop signal.  Then the test
timeouts and dejagnu tries to terminate it, but doesn't manage to do
it, this was raised and discussed on dejagnu list.

https://lists.gnu.org/archive/html/dejagnu/2016-03/msg00048.html

Dejagnu cleanup mechanism needs to be enhanced, but I think that it
would also be better if guality tests don't get stuck and/or can be
killed easily.  This patch changes GDB signals handling to nostop for
SIGSEGV, SIGINT, SIGTERM and SIGBUS.  I am not sure if we need to
increase the list of signals to all the stop ones (which are not used
by GDB) or to restrict it just to SIGSEGV.

Tested without regression on native x86_64, i386, aarch64 targets and
unleash native armv8l one.  Is it OK for trunk ? (I don't know the
rules for that kind of testsuite fix during stage 4).

Cheers,
Yvan

2016-04-06  Yvan Roux  <yvan.roux@linaro.org>
            Pedro Alves  <palves@redhat.com>

        * gcc.dg/guality/guality.h (main): Avoid GDB being blocked on signals.

Attachment: guality-fix.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]