From patchwork Wed Apr 6 14:53:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 65188 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1100305lbc; Wed, 6 Apr 2016 07:54:14 -0700 (PDT) X-Received: by 10.98.71.86 with SMTP id u83mr39052116pfa.156.1459954454162; Wed, 06 Apr 2016 07:54:14 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id rp13si5101316pab.74.2016.04.06.07.54.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2016 07:54:14 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-424461-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-424461-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-424461-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=QSvjVSoGF2X24WMj0RLt6GKiXgr9qZz3nB4Hl7og8Fn DHEkYJY2GSUaLnPCKEFH3CShj9NAEy0eIbgSQYUN9GMeVPYUCitcjb2nb+jfvRfA 9E0aVSbaCqXkLO2dPpqGkSnsENKDo5fQ+DPSoswU64E+F64hBltgkCCaHipS0iKM = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; s=default; bh=Ye/+iH5kBd/ahRR5UdvImXSC9Pw=; b=TSP7pBWpfbxqqa3Ix 1ihQU6tKSKbUhUdKUVq90rrsWc5ExudMkFYQ/mConbH5L0stlm3hU5YymFfjq6uk 4OgsFKC7lqUpeuQjNMuNF3oF+1lfn8O4GbDcKgl4Vj31mi0KzF9Rz6UwuU3NPesw oH1LT2lzyJ3bXemdiNjGinCzz8= Received: (qmail 42442 invoked by alias); 6 Apr 2016 14:54:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 41411 invoked by uid 89); 6 Apr 2016 14:53:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 spammy=2526, his X-HELO: mail-yw0-f176.google.com Received: from mail-yw0-f176.google.com (HELO mail-yw0-f176.google.com) (209.85.161.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 06 Apr 2016 14:53:49 +0000 Received: by mail-yw0-f176.google.com with SMTP id t10so59591762ywa.0 for ; Wed, 06 Apr 2016 07:53:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=tvxAtC9jiuT0W1dsEQzyOPe9Ay7i+QRFdmhDgoK0vxw=; b=AFdYuEqLz9dQ8xvDOKnEbSAD4ScRxmFcpOvgFrmUqHvr7VfCgMcHvI8y5MFDhlLuk9 J7SJxwjd+FIUOchiIFJ2+NyWvNwQaDlcYqw1Y+zucZ3H8in5zuB28hnb58Idqw+u2484 YFqWYA+boZxBHDscxExCfqI791tfP+obCOmFWF3SSYo3fmOwMwlb9KBmPJ2UqvG3ZQ2t G/sqoNJkfzprpLg2fpu63WfKuB0JwvWbw39QtFOAOFHRmdfdEXcMgOXpUFEDvTtvOTD7 IOowtoQt3CEKfVrtWJwlNOezpHbZybtgscWR6Yb+/1h3k7tmFpB+j3Q865SKhsWS+1jR USrQ== X-Gm-Message-State: AD7BkJIvBJ+kI/o2D919Pt6xOqhdhel2ezCHTt8G6GJQ9qva85lKb+aSrBqoGFJBlKhFYCxN6Uy85j3yEW/aLPz8 MIME-Version: 1.0 X-Received: by 10.129.57.193 with SMTP id g184mr26857464ywa.242.1459954427762; Wed, 06 Apr 2016 07:53:47 -0700 (PDT) Received: by 10.37.15.87 with HTTP; Wed, 6 Apr 2016 07:53:47 -0700 (PDT) Date: Wed, 6 Apr 2016 16:53:47 +0200 Message-ID: Subject: [Patch] Avoid deadlock in guality tests. From: Yvan Roux To: "gcc-patches@gcc.gnu.org" Cc: Pedro Alves X-IsSubscribed: yes 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 Pedro Alves * gcc.dg/guality/guality.h (main): Avoid GDB being blocked on signals. diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h index 52fa706..d5867d8 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.h +++ b/gcc/testsuite/gcc.dg/guality/guality.h @@ -252,6 +252,10 @@ main (int argc, char *argv[]) if (!guality_gdb_input || fprintf (guality_gdb_input, "\ set height 0\n\ +handle SIGINT pass nostop\n\ +handle SIGTERM pass nostop\n\ +handle SIGSEGV pass nostop\n\ +handle SIGBUS pass nostop\n\ attach %i\n\ set guality_attached = 1\n\ b %i\n\