From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66982 invoked by alias); 2 Apr 2015 14:53:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 66927 invoked by uid 89); 2 Apr 2015 14:53:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f178.google.com Received: from mail-pd0-f178.google.com (HELO mail-pd0-f178.google.com) (209.85.192.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 02 Apr 2015 14:53:07 +0000 Received: by pdea3 with SMTP id a3so40392434pde.3 for ; Thu, 02 Apr 2015 07:53:05 -0700 (PDT) X-Received: by 10.68.223.36 with SMTP id qr4mr87196813pbc.50.1427986385287; Thu, 02 Apr 2015 07:53:05 -0700 (PDT) Received: from [127.0.0.1] (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id jh2sm5469433pbb.25.2015.04.02.07.53.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 07:53:04 -0700 (PDT) Message-ID: <551D57CC.9050403@gmail.com> Date: Thu, 02 Apr 2015 14:53:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH 8/8] add non-stop test that stresses thread starvation issues References: <1419625871-28848-1-git-send-email-palves@redhat.com> <1419625871-28848-9-git-send-email-palves@redhat.com> In-Reply-To: <1419625871-28848-9-git-send-email-palves@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00106.txt.bz2 Hi, Pedro, On 26/12/14 20:31, Pedro Alves wrote: > +int > +main (void) > +{ > + int res; > + int i; > + > + alarm (60); Is there any reason to call alarm here? It causes some fails on arm-linux, that is, the board is slow, and alarm is triggered. Then thread is disappeared and current_thread is set to NULL. GDB/GDBserver doesn't know about that. When the inferior memory is accessed, current_thread is dereferenced, and GDBserver is crashed. How about removing it? -- Yao (齐尧) From: Yao Qi Date: Thu, 2 Apr 2015 15:38:49 +0100 Subject: [PATCH] Remove unnecessary call to alarm It is unnecessary to call alarm, and this causes some fails when tests are running on some arm board. gdb/testsuite: 2015-04-02 Yao Qi * gdb.threads/non-stop-fair-events.c (main): Don't call alarm. diff --git a/gdb/testsuite/gdb.threads/non-stop-fair-events.c b/gdb/testsuite/gdb.threads/non-stop-fair-events.c index 6a9d31d..8ce8fe8 100644 --- a/gdb/testsuite/gdb.threads/non-stop-fair-events.c +++ b/gdb/testsuite/gdb.threads/non-stop-fair-events.c @@ -64,8 +64,6 @@ main (void) int res; int i; - alarm (60); - signal (SIGUSR1, handler); for (i = 0; i < NUM_THREADS; i++)