From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by sourceware.org (Postfix) with ESMTPS id 0FF67394743F for ; Tue, 13 Apr 2021 15:51:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0FF67394743F Received: by mail-qk1-x72c.google.com with SMTP id 18so1460316qkl.3 for ; Tue, 13 Apr 2021 08:51:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HbvGzyoKGpO7mnyCSAtzb6zqqCoud7G1SB5RRcWWFPE=; b=QlJro/emLOYRnqdcS+eJJqyhsFKqqbLTA7tSdzNVfAs1T2znacHEhUuKwFQHc/KSW5 1lk6eZKBrq1BCWdRYy/VwOSxbG+rknMjdAAuHvJ91oAPafo1tvwQJrxoOXPg9E0t44WP MYktcxv45ZsyZbW2O2r9sjuee/TppHcMLHVuBJfYTmRN3xaG96F6Qj2ak6M3VKc7LOjR iIgmJmhDX+wPGRtOmL3d4INzPDHV89koU5IUfNIOkNxb9GV96uCfhT01drehIaWnSD+n GhSCRCrbzwwNJQo8LKt7E6ACBKIkPla4N0taZiW5BqTGHko9XfZeQMXlBWEoEOn11i/f 9VpQ== X-Gm-Message-State: AOAM530+gW//grxXPL+F/rYrfi54EnffhhLRCnnSoEEaw2bKUNDn5IrP aStfcgbatEPcZCydjKBMV9CEMYoF+7y9LQ== X-Google-Smtp-Source: ABdhPJzIP30TUcos7inkrw2cS3MskcptZm7YBlAonWajfSL4nK9F6L1LuqN3uW90DxbqMMXa9q86Ug== X-Received: by 2002:a37:852:: with SMTP id 79mr14833572qki.274.1618329105578; Tue, 13 Apr 2021 08:51:45 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:b15b:1248:f1ec:bed5? ([2804:7f0:4841:2841:b15b:1248:f1ec:bed5]) by smtp.gmail.com with ESMTPSA id e25sm6910071qtr.54.2021.04.13.08.51.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Apr 2021 08:51:45 -0700 (PDT) Subject: Re: [PATCH][gdb/testsuite] Fix gdb.threads/killed-outside.exp with -m32 To: Pedro Alves , Tom de Vries , gdb-patches@sourceware.org References: <20210118114422.GA11394@delia> <208b6e38-66f5-0395-62f7-9f122384a3a5@linaro.org> <500c8933-8d03-9cb0-fd4c-7ab1b3a35065@palves.net> From: Luis Machado Message-ID: <22f86bac-97f8-f4c2-404e-636ca279fb74@linaro.org> Date: Tue, 13 Apr 2021 12:51:42 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <500c8933-8d03-9cb0-fd4c-7ab1b3a35065@palves.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 15:51:47 -0000 On 4/13/21 11:45 AM, Pedro Alves wrote: > On 13/04/21 14:33, Luis Machado wrote: >> >> Forcing scheduler-locking to on made the output consistent for both cases, but I was left wondering if enabling scheduler-locking would cause the bug to not be reproducible anymore. > > Yeah, no. That would just paper over problems. GDB should cope with threads disappearing beneath it, as they're resumed, stopped, etc. Forcing scheduler-locking just > means you're only resuming one thread instead of many, and thus reducing the chances of some GDB issue triggering. Wouldn't be much different from making the testcase > be single-threaded. Right. The non-deterministic nature of the output makes it harder to find a reliable pattern to match. There seems to be a couple issues at play here. One is the non-deterministic ordering of thread-related outputs, which is expected and we can't do much about it. Though I'd expect a thread exit notification to always show up, and not be swallowed by GDB. The other is the non-deterministic position of the gdb prompt, even for all-stop mode. Sometimes it shows up before GDB gets a chance to output other messages, like so: Executing on target: kill -9 3742839 (timeout = 300) spawn -ignore SIGHUP kill -9 3742839^M continue^M Continuing.^M Unable to fetch general registers.: No such process.^M (gdb) [Thread 0xfffff7e281e0 (LWP 3742842) exited]^M ^M Program terminated with signal SIGKILL, Killed.^M The program no longer exists.^M FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout) I was considering the possibility of adjusting the test, but I may be dealing with other GDB bugs.