Message ID | 20230823051615.1297706-4-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp622242wrp; Tue, 22 Aug 2023 22:17:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwTk8yMUCJtkV0EUJeDmkZ8zv+cB4J4gXbPdY61W+10ZFpVIqmXaSsox8tFXE7IUmHip5c X-Received: by 2002:a0c:e551:0:b0:64d:b496:7cb9 with SMTP id n17-20020a0ce551000000b0064db4967cb9mr9294673qvm.27.1692767858410; Tue, 22 Aug 2023 22:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692767858; cv=none; d=google.com; s=arc-20160816; b=P5x2DFa9HAFiLIdOyDitQE1UH/kM9QQTnx2fggY6aB8wNKBvC1glr/zQhVmJrDmiv6 iWXJzKLu7lla80IreC5IpJZqB7RSbZb6aspWeKa1WS2UEOtygELFzIqRF6S2aEQC8Nny Ku0r+1f9kMdMbwE3xHNvZ1U1ZmtSJze235xOdA2Dgf8uMXEAse5nq1rEvuT/OI0e79n9 vl/iP6IBJzmAJiXCo6CB1Ogz8ltS8eY9OMQw0gOkm0Kg+n22kMf0rScVEcDM5Z2DHQ3R rwEhYUt6bFeSKMR9VgUkHj1T919WYf2GUd5jDtdu/6AGywuRFZnYwLDRCayxLGcHqZgi DOfQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rn4m/BUkUlHqvAP+qKbf9mRxMLOIUsCoPFyrQpA+ZgA=; fh=uta8CuNdWwEUIsmWLQQIuZWY0GOyjYTd4DbN32nR8cE=; b=N5R8ri8I3JbTApesCYjRDrNwJ4RfMAo59ZFVQbIXwVqJVYB5ZLwBhB3tEsIZQlVdSL +V2KsjLLzv0f00TPeK16JDwSgfvS+rHU0Zq99do0gvZ3zD2xDQA8uJO5dQCvsRuhXCGB ZDr8Z5+/wWonQ5wMQKLnA6pfVOwqrer1FfL0SvsOwSg+0wd3YRamGfSOvPuRs1FKFxQl j/68S/N9oxvtzNE5tY93IwkJM5iFgCngwsskhQ2BocFH/LT55h2UDBbmTtpdjkjmCmqq F8CQin+V+14ytmKrEo5emgDmf6j5JSQjPgaPBx3Rh6XogHkMh7fDLHxPguUauamxE/YV anYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tfL8+yP7; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m15-20020a0cf18f000000b0064f42b1ab16si3435829qvl.154.2023.08.22.22.17.38 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2023 22:17:38 -0700 (PDT) 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=tfL8+yP7; 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 <qemu-devel-bounces@nongnu.org>) id 1qYgEF-0004vf-27; Wed, 23 Aug 2023 01:16:27 -0400 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 <richard.henderson@linaro.org>) id 1qYgED-0004uz-4g for qemu-devel@nongnu.org; Wed, 23 Aug 2023 01:16:25 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1qYgEA-0000sU-RR for qemu-devel@nongnu.org; Wed, 23 Aug 2023 01:16:24 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1bc83a96067so31822365ad.0 for <qemu-devel@nongnu.org>; Tue, 22 Aug 2023 22:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692767781; x=1693372581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rn4m/BUkUlHqvAP+qKbf9mRxMLOIUsCoPFyrQpA+ZgA=; b=tfL8+yP7JXoUx4JsArTpdnOZb39LLyARNAWcOAgVJpcN83Mifc+RfioBe0EFQUjZ8k tawhjMtBZDHZwBGABM9NuX7JjvpLVwE0LgkUOn174Tw1fzNogTjuwrVtyFyxSqogtKp6 DV/rDp8oyvEXZ3Dh6U11k0wSwjIwA/5UmYsQIKWO9lnNrt78/k2OrWyTzgIkFuo3RoHT RwIEL9W3rTgqfHQj/XzmP5FQ1n1T3tzW7OQM4ZmVyUg6XzrGhl6uzayf2yZniFg2LJSD YcFstcmQ59+dIdHAVwx1syewOIgRqk9tYY1b3bD5RUumE138k6dToE9/Pq6jiSewO0dN +t+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692767781; x=1693372581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rn4m/BUkUlHqvAP+qKbf9mRxMLOIUsCoPFyrQpA+ZgA=; b=DdW6IXUnASLNvi26OEZ1QUoYOc90KRdLlkm9S03XF9VOvc/KIqdTegtmgD10xlp/Zu t01CTw2JbuAAGCJguv2Czi+6EEKnXRMbubg52tiHyBLoi1Y51JHAHKYS+dSSMZZ8GpPf oTJHK7a5NVci+e6WIAliTan+IYFsqyJT1LhFiUKfZDMKH5MvnLHe2m+VNw4q26UY1HiO vGH8Og2qCrK1f7tpQV8MuV7r8Nf1un345g9e3syB7dVOCQEZVpL6dKwAieWDMGdrreua sW7QzqpaM0yhONmrrZXJvU299VXQ9FfUVwuY6mG9g5eRRJLFJv4gG1k3SRUYByt0ReGU 2QOQ== X-Gm-Message-State: AOJu0YynDp3O8HyU95uB9kN6QUvewffc08RgTpfLhQJVPw7m8SX8IxnS nzoYgU3t+uqZI0w7raggpnEUaCe0bWXLFvcN290= X-Received: by 2002:a17:902:f546:b0:1b6:af1a:7dd3 with SMTP id h6-20020a170902f54600b001b6af1a7dd3mr10881380plf.23.1692767781506; Tue, 22 Aug 2023 22:16:21 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:4e3c:f4a4:b92a:b5ab]) by smtp.gmail.com with ESMTPSA id 5-20020a170902c24500b001bf044dc1a6sm9969402plg.39.2023.08.22.22.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 22:16:21 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v4 03/10] linux-user: Use die_with_signal with abort Date: Tue, 22 Aug 2023 22:16:08 -0700 Message-Id: <20230823051615.1297706-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230823051615.1297706-1-richard.henderson@linaro.org> References: <20230823051615.1297706-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
linux-user: Detect and report host crashes
|
expand
|
diff --git a/linux-user/signal.c b/linux-user/signal.c index 57fbf2f58b..a77d003de6 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -721,6 +721,18 @@ void die_with_signal(int sig) _exit(EXIT_FAILURE); } +/* + * The system abort() will raise SIGABRT, which will get caught and deferred + * by host_signal_handler. Returning into system abort will try harder. + * Eventually, on x86, it will execute HLT, which raises SIGSEGV. This goes + * back into host_signal_handler, through a different path which may longjmp + * back to the main loop. This often explodes. + */ +void abort(void) +{ + die_with_signal(SIGABRT); +} + static G_NORETURN void dump_core_and_abort(CPUArchState *cpu_env, int target_sig) {
Describe the convoluted way by which we can see ERROR:../alt/accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu) Bail out! ERROR:../alt/accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu) for encountering an an abort() in qemu source. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/signal.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)