From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by sourceware.org (Postfix) with ESMTPS id A05CB3982C22 for ; Fri, 2 Jul 2021 13:02:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A05CB3982C22 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f51.google.com with SMTP id b14-20020a1c1b0e0000b02901fc3a62af78so2466431wmb.3 for ; Fri, 02 Jul 2021 06:02:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cbDoc21zONsardR0FuzD5ga5YWbw4SahsU55Rha/1/8=; b=mpmYUairFTZ3zTV2fQucJ+/VUoj/76PBX3+q2QXoD7vEdoiWxjew51rMLg23Z1DvRt qPj6JEssyuyQVab/DIr6TJ4cgyjNtuWXIBRIS8LqKynN6FfllSXkp+93/v4hTLsKuStR GycWoOoW6SsJH2QDyDjCi3MA1tX9IXHYx3KqIVPkWo1xFXaQM4hbSFqzP7XxxTgoKfs3 kQtlcxtU+3deGMIibUsnwYnrZJJXcpSpKNRkMivCsmKQiqVk3iS9B1d2F6kxK4ITthei zMMN113i04oDTni+Pj4H/vg2GPI82/BbCg+0Q9ELB/NXGW+fl8Ioja/k3R4VzsPW1L2S NkkA== X-Gm-Message-State: AOAM533x3G19z5cy8hRW0FLnoF0OYKUGUxdVg9WlfUh09pfu9nP6QNR0 mrnaWewAqoWmadGS65tOHghryXBgvo20/g== X-Google-Smtp-Source: ABdhPJzdynmeDLw1ikMI3X4xtde9L2pP4sTBzFeh19vtL+4j7PMcCTMeW8EOT3PBtrmHMjtwL3FIcA== X-Received: by 2002:a05:600c:a01:: with SMTP id z1mr16513391wmp.77.1625230930888; Fri, 02 Jul 2021 06:02:10 -0700 (PDT) Received: from localhost ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id z12sm527074wrs.39.2021.07.02.06.02.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jul 2021 06:02:09 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 06/10] stop_all_threads: (re-)enable async before waiting for stops Date: Fri, 2 Jul 2021 14:01:50 +0100 Message-Id: <20210702130154.1947858-7-pedro@palves.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210702130154.1947858-1-pedro@palves.net> References: <20210702130154.1947858-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 02 Jul 2021 13:02:14 -0000 Running the gdb.threads/interrupt-while-step-over.exp testcase added later in the series against gdbserver, after the TARGET_WAITKIND_NO_RESUMED fix from the following patch would run into an infinite loop in stop_all_threads. I added a hacky gdb_assert to catch the loop, and it looked like this: [infrun] stop_all_threads: Thread 3492141.3492141 not executing [infrun] stop_all_threads: Thread 3492141.3492716 not executing [infrun] stop_all_threads: Thread 3492141.3492717 not executing [infrun] stop_all_threads: Thread 3492141.3492718 not executing [infrun] stop_all_threads: Thread 3492141.3492719 not executing [infrun] stop_all_threads: Thread 3492141.3492720 executing, need stop [remote] stop: enter [remote] remote_stop_ns: Enqueueing phony stop reply for thread pending vCont-resume (3492141, 3492720, 0) [remote] stop: exit [infrun] stop_all_threads: Thread 3492141.3492721 not executing [infrun] stop_all_threads: Thread 3492141.3492722 not executing [infrun] stop_all_threads: Thread 3492141.3492723 not executing [infrun] stop_all_threads: Thread 3492141.3492724 not executing [infrun] stop_all_threads: Thread 3492141.3492725 not executing [infrun] stop_all_threads: Thread 3492141.3492726 not executing [infrun] stop_all_threads: Thread 3492141.3492727 not executing [infrun] stop_all_threads: Thread 3492141.3492728 not executing [infrun] stop_all_threads: Thread 3492141.3492729 not executing [infrun] stop_all_threads: Thread 3492141.3492730 not executing [infrun] stop_all_threads: Thread 3492141.3492731 not executing [infrun] stop_all_threads: Thread 3492141.3492732 not executing [infrun] stop_all_threads: Thread 3492141.3492733 not executing [infrun] stop_all_threads: Thread 3492141.3492734 not executing [infrun] stop_all_threads: Thread 3492141.3492735 not executing [remote] wait: enter [remote] wait: exit [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) = [infrun] print_target_wait_results: -1.0.0 [process -1], [infrun] print_target_wait_results: status->kind = no-resumed [infrun] infrun_async: enable=0 [infrun] handle_one: status->kind = no-resumed process -1 [remote] Sending packet: $qXfer:threads:read::0,1000#92 [remote] Packet received: l\n\n\n\n\n\n