From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83858 invoked by alias); 27 Apr 2017 09:16:22 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 83840 invoked by uid 89); 27 Apr 2017 09:16:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy= X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Apr 2017 09:16:19 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3wDBC74kBNz1qtXd; Thu, 27 Apr 2017 11:16:19 +0200 (CEST) Received: from localhost (dynscan01.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3wDBC74BdQz3hhZk; Thu, 27 Apr 2017 11:16:19 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan01.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id BhJv_dgF1Vv5; Thu, 27 Apr 2017 11:16:19 +0200 (CEST) X-Auth-Info: f6mMR6maq94SQQA1l2dFBXDmmAx15tpjTwEMajZSIfcMwcuJMoQ2R6K0TcmPPcIO Received: from igel.home (ppp-88-217-21-34.dynamic.mnet-online.de [88.217.21.34]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 27 Apr 2017 11:16:18 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 504642C40B5; Thu, 27 Apr 2017 11:16:18 +0200 (CEST) From: Andreas Schwab To: RAJESH DASARI Cc: Yao Qi , GDB Subject: Re: Reg : gdb crash is seen while attaching a process to gdb. References: <728178DD-B9FD-4695-A7FF-F13B829DFD2E@gmail.com> <864lyfp0b7.fsf@gmail.com> X-Yow: Yow! Are we wet yet? Date: Thu, 27 Apr 2017 09:16:00 -0000 In-Reply-To: (RAJESH DASARI's message of "Thu, 27 Apr 2017 11:42:59 +0530") Message-ID: <8737cugqhp.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2017-04/txt/msg00035.txt.bz2 On Apr 27 2017, RAJESH DASARI wrote: > + /* sleep for a while to eliminate race condition on update to kernel > + * task structure with the process state (STOP state of thread). > + */ > + usleep(10000); A sleep can never eliminate a race, only make it less likely. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."