From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 823 invoked by alias); 7 Apr 2016 13:41:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 792 invoked by uid 89); 7 Apr 2016 13:41:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=armv8l, validated 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; Thu, 07 Apr 2016 13:41:22 +0000 Received: by mail-yw0-f176.google.com with SMTP id d68so96673584ywe.1 for ; Thu, 07 Apr 2016 06:41:21 -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:in-reply-to:references:date :message-id:subject:from:to:cc; bh=EuswIXIVHqf3xV4Ny/I0wPzcqWEUhN3hGF2NLdUzgEk=; b=gSXnA9xwRymsd/y4KQxzBEDR0C6edyuYYVEfJZvurbGTrn/sHJYGuigoggwIUVs3K9 9M7lXYSpci7Bpv2W0WcFLQv9B5TE2f+cYgTWCOqILEr43zeP+NAYYkFc9JBH+N9yQwDl WmB2mjArJwoCWH9dPseisN+FbSfXq6LN4cerhIH3IKiEpfA4l5Lk+RIXoEszqhNNurUh gQem9OJQhDoXYOo5ENK7NniLzEgZiPzmvkqqLg838qpXwyVWiuKtUNH5rObqq23xiE1w mPtzBmRxkbxkf74eY/ocgjxoCDZ4Fv3jox/cVLjmbZbbMz6JwYLI13xj6f3P0Ro9Va1m xMqQ== X-Gm-Message-State: AD7BkJJvSJ4aUZOAqFI3LlDoGUt0PpMhldlEoLGra9e04XlEo3VXrwJo059MDO2i0oNqa4TNM5p/8PQHF2CHBEAq MIME-Version: 1.0 X-Received: by 10.37.50.149 with SMTP id y143mr1607463yby.10.1460036479948; Thu, 07 Apr 2016 06:41:19 -0700 (PDT) Received: by 10.37.15.87 with HTTP; Thu, 7 Apr 2016 06:41:19 -0700 (PDT) In-Reply-To: References: <570526A2.70108@redhat.com> <57052A27.9080007@redhat.com> Date: Thu, 07 Apr 2016 13:41:00 -0000 Message-ID: Subject: Re: [Patch] Avoid deadlock in guality tests. From: Yvan Roux To: Pedro Alves Cc: "gcc-patches@gcc.gnu.org" Content-Type: multipart/mixed; boundary=001a1146e086bf77f8052fe53b00 X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00342.txt.bz2 --001a1146e086bf77f8052fe53b00 Content-Type: text/plain; charset=UTF-8 Content-length: 1721 Hi, On 6 April 2016 at 17:29, Yvan Roux wrote: > On 6 April 2016 at 17:24, Pedro Alves wrote: >> On 04/06/2016 04:13 PM, Yvan Roux wrote: >>> On 6 April 2016 at 17:09, Pedro Alves wrote: >>>> On 04/06/2016 03:53 PM, Yvan Roux wrote: >>>>> 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. >>>> >>>> I'd suggest: >>>> >>>> handle all pass nostop >>>> handle SIGINT pass nostop >>>> >>>> That would make gdb pass _all_ signals except SIGTRAP >>> >>> I've committed it already :/ >>> >>> I can make the change, but isn't there cases where SIGILL is used for >>> breakpoints in GDB (I think I've seen that somewhere). >> >> True, and SIGSEGV and SIGEMT too. But GDB handles that transparently >> and won't pass such a breakpoint signal to the program, even with >> "handle pass". Only "handle SIGTRAP pass" passes a >> breakpoint/step/etc. trap to the program. > > Ah ok, thanks for the explanations Pedro, I'll prepare a new patch and > validate it. Here is the new patch which makes GDB pass all signals except SIGTRAP. validated on native armv8l target without regessions. ok for trunk ? Cheers, Yvan 2016-04-07 Yvan Roux Pedro Alves * gcc.dg/guality/guality.h (main): Make GDB pass all signals except SIGTRAP. --001a1146e086bf77f8052fe53b00 Content-Type: text/plain; charset=US-ASCII; name="guality-fix.diff" Content-Disposition: attachment; filename="guality-fix.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_imqbzs1e0 Content-length: 749 ZGlmZiAtLWdpdCBhL2djYy90ZXN0c3VpdGUvZ2NjLmRnL2d1YWxpdHkvZ3Vh bGl0eS5oIGIvZ2NjL3Rlc3RzdWl0ZS9nY2MuZGcvZ3VhbGl0eS9ndWFsaXR5 LmgKaW5kZXggZDU4NjdkOC4uYWNmOTc3ZiAxMDA2NDQKLS0tIGEvZ2NjL3Rl c3RzdWl0ZS9nY2MuZGcvZ3VhbGl0eS9ndWFsaXR5LmgKKysrIGIvZ2NjL3Rl c3RzdWl0ZS9nY2MuZGcvZ3VhbGl0eS9ndWFsaXR5LmgKQEAgLTI1MiwxMCAr MjUyLDggQEAgbWFpbiAoaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKICAgICAg IGlmICghZ3VhbGl0eV9nZGJfaW5wdXQKIAkgIHx8IGZwcmludGYgKGd1YWxp dHlfZ2RiX2lucHV0LCAiXAogc2V0IGhlaWdodCAwXG5cCitoYW5kbGUgYWxs IHBhc3Mgbm9zdG9wXG5cCiBoYW5kbGUgU0lHSU5UIHBhc3Mgbm9zdG9wXG5c Ci1oYW5kbGUgU0lHVEVSTSBwYXNzIG5vc3RvcFxuXAotaGFuZGxlIFNJR1NF R1YgcGFzcyBub3N0b3BcblwKLWhhbmRsZSBTSUdCVVMgcGFzcyBub3N0b3Bc blwKIGF0dGFjaCAlaVxuXAogc2V0IGd1YWxpdHlfYXR0YWNoZWQgPSAxXG5c CiBiICVpXG5cCg== --001a1146e086bf77f8052fe53b00--