From patchwork Tue Jan 17 03:56:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 643391 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp951268pvb; Mon, 16 Jan 2023 19:57:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXshhH/Iq2VXhSNT1XZoIzFyqARiZX0Z21QHStVftWuzTfCjIyK2GYHdTuTKHgxUEI5/GHKQ X-Received: by 2002:ac8:44c3:0:b0:3b6:2d75:9b07 with SMTP id b3-20020ac844c3000000b003b62d759b07mr1200171qto.26.1673927866375; Mon, 16 Jan 2023 19:57:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673927866; cv=none; d=google.com; s=arc-20160816; b=hz7mYgE3ik0v2j0Q/Zv+W4lymYoRo8F5gndmKeyh05BL5wmKpoZdaJP8nmyr8l70KL KjOs2dq5Em2yZ5QDIpn34sFPMew/KVlPwGHli1eR0eGZqp+DjtXy/gZ4QzWoRF2IuSyi OVKjrMoTQMyX/T7grCLDAi5VtVd8/reo9G4cpKDM5GLc+n+I8AkgHT8YFfojBc+FPhi2 94ougD/O/4MwYmHMULiJepY/TQszamkCjMD+QMLEHeZChSnLbTRtKyZcOq9DJ8JoquBi TSvGJiuE3JMiBQkPtWeJLsbO9s174eX/pnomx5+kKgoSIi52VXc6H2fruQevzJxXF79c OyBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=gM1CjMI/N7DQfnTG/1bMsvDAvMz5iBpOsUOR++NYBmk=; b=aJCI4+zye/sx4u2vWCnfpUbbHUprEYDfq6sitCbwT0fdR0yiFX6bzoc2Tit5igI9wL sXbr3kqht1GRcr3xloTtyBywh6WirQAz1mlxp3u2uT0u9cVFQ7UQ80lf8oORlRY1b+aR mkL5N06iQ3hQc+DNFWmZiy2z4zVMGCliORdpFnvNRfli/AE+nREiydWKk1eOFO1+zEHU FvrHCTq4y2/SJIFWo6txaYqi93YatNWnKPeeP0FVv6i+3qCokL7qFFAAV/cE2OiPnHin g5R8qFNNDqpvBsjnxhZ4osCcZR6lZjIKeZmnQd+yBQ1oprN1dmQ8Q/67mO2bkixVs3Gg NuSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NhZEAHCD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ew5-20020a05622a514500b003b2b9830418si8117708qtb.673.2023.01.16.19.57.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Jan 2023 19:57:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NhZEAHCD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHd69-0000W3-Uj; Mon, 16 Jan 2023 22:57:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHd62-0000Rr-Oz for qemu-devel@nongnu.org; Mon, 16 Jan 2023 22:57:14 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHd5w-0005du-Pv for qemu-devel@nongnu.org; Mon, 16 Jan 2023 22:57:12 -0500 Received: by mail-pl1-x631.google.com with SMTP id r21so170159plg.13 for ; Mon, 16 Jan 2023 19:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gM1CjMI/N7DQfnTG/1bMsvDAvMz5iBpOsUOR++NYBmk=; b=NhZEAHCDV53wNbdx5MLTV3/+Kpj6jOP581HuLPFOsc9JsAng0BC/7UnUs6tlCxJ2IE 4AwxkK5QyvgBMtcSFK7ZnoM7GK7vKJbnOH95LS45BRdiIGTPybxYftBs+viWkYdRL2cp VeLmvRoSfy4jifDkQtTzoaco6PeD+Dmcn00RGr/96/FvdQTRpQS5xHS7iBCCY1HKY+Yx 2USBuPmFWhdXtMOi/1buUhNUoEqxkKZaCQh1+vlpovRf51O4YEw/ZZyx60yuPT+y4aCe x7LgP5ki1SKzET7nMXzXlMGVG/6APerFHsqJi9NVtiZS/yeMNX1UMwU3J130CHbb9Htl 7AiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gM1CjMI/N7DQfnTG/1bMsvDAvMz5iBpOsUOR++NYBmk=; b=hIsGJi1ZPgQ/+9lZOsxbLkWocwi6/Nsyn7urlGYyojcXbwLjoE2TIHG1u1tWwmQCkS Nxk5KXjVj9a8ER+L5YIfiIJrXPN0+Ey//wUT8mJSH4tnENjmUVhzhkL7Y7ZPqZm3GNci XB4vndn/KV4w2C6yZjDsgQcAkYmUtXvyr2Q5tcUQkvl8t0hPB30WlY0iT4d7yLmNIbxV FHG63O2A7ksp2saC5pcnDbZWvX8hMXRZ/b2aaTvM1S3ljmuka97a6sHOOxsKhakoPhhy HAk3UudjXanKOipWR2cq7Xrtzusjk4yuqOQXi3BxjGB0ZrEiCTi6WHrBQ1ZwATD+Nhb5 7wIA== X-Gm-Message-State: AFqh2kq0I0KN51XaC19pDt9bE7pbZ6gWsZX5CsH5LbAH0FAxJaRQn/26 5CtyENWHuirSfCI72p8uQ7Q8ovTEzOCUHZl5 X-Received: by 2002:a17:902:d88d:b0:194:7c28:3fa4 with SMTP id b13-20020a170902d88d00b001947c283fa4mr938900plz.19.1673927824597; Mon, 16 Jan 2023 19:57:04 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id z15-20020a1709027e8f00b001869079d083sm19991531pla.90.2023.01.16.19.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 19:57:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org Subject: [PATCH 0/3] tests: Fix some deadlocks Date: Mon, 16 Jan 2023 17:56:58 -1000 Message-Id: <20230117035701.168514-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The first patch addresses the fact that linux-user blocks all signals while attempting to handle guest signals (e.g. ABRT), which means that the default TERM sent by timeout has no effect -- KILL instead. When a guest aborts (possible nios2 guest bug), sending SIGABRT to itself, I have caught one thread waiting in start_exclusive, and all of the others blocked in exclusive_idle. I look at that and think there's a bug in our start_exclusive locking, but I can't prove it. I also wonder whether qemu_plugin_user_exit really needs it, and since that's the only place that seems to have issues at present, whether it is in fact using it incorrectly. Finally, I think we're missing at least a few early tests for "no plugins registered", like this one, which ought to be fast path, where the function need do no work whatsoever -- possibly including taking the plugin lock, but I can't prove that either. Anyway, this has improved make check-tcg -jX, for large X, which appears to aggravate things. r~ Richard Henderson (3): tests/tcg: Use SIGKILL for timeout plugins: Avoid deadlock in qemu_plugin_user_exit plugins: Iterate on cb_lists in qemu_plugin_user_exit plugins/core.c | 13 +++++++------ tests/tcg/Makefile.target | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-)