From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11020088.outbound.protection.outlook.com [52.101.69.88]) by lore.virtuozzo.com (Postfix) with ESMTPS id 95D098002A for ; Mon, 23 Nov 2026 21:33:01 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u3NitJvFt/NGut/POMYZwavBqjtYWlVCmVcEFh1DZGO44PVl+IFX/Yk+EQOMA506FIVQFkkX1at7Rz+V7DfE3PhuGWSkI0PEz2tozl+DYit7SeKfir5EdFI7ETj028Y+5GvnGqzs7YlTypACn9rPJG985U6sj7bQ2GNgOxvLBpjH/KN2Jdc5jMGsfZga4uaqS6IPJMmHdWD/8mE2SokHSkRCGkQpGYGMuZNqc9Lt0ILFprVQow0oxAafzlRFEGaCDg/AALSzMvQNgHD+e0I/MErn88RPyXggwqJ+h7XF/23hJFAENRWKDEkyh9mPlC23bjBn7AUOzX+CFMuWqgHaAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xIs9ya6xtaSBuUTwiDHzJKVE2qqlH3BbbHtj2DgZ5kI=; b=I2zzZRCOPQcX18HFN/ShimJyCfKus/VMd1ADQOjcGkAnlq7IDqQJ0Ym4iJuRpU8hgJc1mc5/ZOiOfOGaeLAmHuQEFRsLD+68tlcHfctkUqBOSe6WtKG2UHimO0QogLIIRFEE2Ej6y8t5X8lMco5U+bgyZZPLq5SfoZh8LfdZEqpaMfycO0q65Ut0hcSLCrSB5WDOR/OT3V5XxgaJ5I5bahy1ZogXxzRHK25uDACnIq2rKs+2aUAiFMwKfDLguRvLe1+/128DR9KTcPUF4Nkc13Z1ZDO2BaToLbwZexsZDioaGVPAWGpIhKV3fkXSa8lsCmniswypPk9i2e1W3oZrIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.5) smtp.rcpttodomain=virtuozzo.com smtp.mailfrom=eu-central-1.amazonses.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=amazonses.com; arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.onmicrosoft.com; s=selector2-virtuozzo-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xIs9ya6xtaSBuUTwiDHzJKVE2qqlH3BbbHtj2DgZ5kI=; b=hVrcMl2/LH8qklHhBo3o3wBFcRRZvK6vdJph3cjA7ar7Z2O9zBXN9hCsBZuE+j4tWcR7wsP/1BVL7TEYpJPncfYiB5+Z+ogT6i6sUclK8S05BQGYGZ8XssLrwhFlmbwLuk+zddS8E62yyftrrfd55vFvwRKmJmayFcxgLukVJiI= Received: from AS9PR06CA0153.eurprd06.prod.outlook.com (2603:10a6:20b:45c::17) by DB9PR08MB11532.eurprd08.prod.outlook.com (2603:10a6:10:608::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.639.14; Mon, 23 Nov 2026 21:32:59 +0000 Received: from AMS1EPF0000009B.eurprd02.prod.outlook.com (2603:10a6:20b:45c:cafe::15) by AS9PR06CA0153.outlook.office365.com (2603:10a6:20b:45c::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.639.14 via Frontend Transport; Mon, 23 Nov 2026 21:32:58 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.5) smtp.mailfrom=eu-central-1.amazonses.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com;dkim=pass (signature was verified) header.d=amazonses.com;dmarc=pass action=none header.from=sashiko.virtuozzo.com; Received-SPF: Pass (protection.outlook.com: domain of eu-central-1.amazonses.com designates 69.169.224.5 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.5; helo=b224-5.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-5.smtp-out.eu-central-1.amazonses.com (69.169.224.5) by AMS1EPF0000009B.mail.protection.outlook.com (10.167.242.72) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.639.5 via Frontend Transport; Mon, 23 Nov 2026 21:32:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1795469578; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=5F7YtDS4s7F08Y6DoYyOe5MlDXkIiwqV4/y0GH0AzlI=; b=WjZfMVpFmQxL7VMR8u4gHdCwP7t7IPPOj8w5kA50JEYf9Z37xgV7tPtbmqaMT9BM rcKHQry2wtMGbfWa9vKokhrPtpyNGIlmXMVmj4it5c5DWuY4RfG8kPnja3/e9koxWNs vbnOhEv5LyIgTiYVtmGfbZPF7xyehULXUAD1Y9j5y+kaRHHl46Getm+EFXB+VKjZ0gA YmjwnU8Wnpnj8My9bR109gCKkXR/H3SBHowx/Fcat4PbBatY8dQ1VY3otarQJwiMwdP OwgFyJMS+MHrfTPQ8cpeWQemGKRfh6LF+2kHGFwpdpTQeQeHRF+21AOn05A75AgVlfp owisuHiHRw== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1795469578; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=5F7YtDS4s7F08Y6DoYyOe5MlDXkIiwqV4/y0GH0AzlI=; b=BYnIiYD4ogQbQvYEVoq/6m5b2ZaFM+bHW4lDzEZvgpfiZSrSAEXFFkpSExjabOy0 7R+VJ5fj/v5H4Ms38zPdBDE54SBFSbJb5sqHJ03Ccvef0evFq5PigMEc7RH6xVzk1jv 5ilajGqlSs5wokOhL0EpbaMi/cRqZAv++myea+FM= Message-ID: <010701a20a538fab-ea86d998-0f75-4099-a32b-c32ddf0487eb-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH hci-dev] monitor: fix abort when a rate-limited event races with its timer #VSTOR-156540 To: "Denis V. Lunev" , svt-core@virtuozzo.com Cc: andrey.drobyshev@virtuozzo.com In-Reply-To: <20261123212942.242422-1-den@openvz.org> References: <20261123212942.242422-1-den@openvz.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 23 Nov 2026 21:32:58 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.11.23-69.169.224.5 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS1EPF0000009B:EE_|DB9PR08MB11532:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 19f01983-cea1-45a4-0aa6-08df49a95829 X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA List-Id: svt-core@virtuozzo.com X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|61400799027|9140799003|376014|48200799018|32142699015|18002099003|22082099003|5113699003|4113699003|55112099003|16102099003|13003099007|56012099006|5023799004|5063699009|261102123227099003|261028144727099003|261009223027099003|261026140227099003|261022105027099003|261021121427099003|261022075727099003|261026121527099003|261022113327099003|261026135527099003|10067099003; X-Microsoft-Antispam-Message-Info: SLRlnD/Cw/bhxnhEVxKrVecvCvyPD1HOWnc7OLOzHr0Gh8C/b76xtQpxajuVTZCFdvV3SUodn121YbSS0qYQTK93uTFXH6tZnW864ESPeD3AuNcnv/yvRUz1S3jylk/ceu3l2ao9tuFrNaKylXUk7ot/H3lwPI33g07A50MEJATp00LVbGHY3BVoFNPMPCgxL6a5CmeS6hdd5Ao741XtFnUIuNwKy7GS1ZL7/g59heTs4ih7CJPhsArVggeVPwhr6vrbJ2Qc1g9lYGLYhfquwvpI7j/fcMUtxtErrUCphmADMoqsd2iGS9cWJ9P1qoK+Ddu86BI72D8GZt2e5Ak8ML/fg7j/tdEMmv7KLJsE57ooU8XQ0QkCpTlgQbdAXpQisXGYYFhOzdLVBp+rtIwuw+vocpEUunnX2Jfhvfy7qcUAlLtWn6N6C9Adxl2cITjCtsq9TGncbMjgfUBEFcuuA3LQvzfEiL++1WiA0Yqfr+KfYxxG7/FxF/mKuleF4x6gMXoTbuHSiaJw9RFBpa1Df0EB2jP/m0l2nd+shNLstyaVomRlkYMrO5mbYZJLiOWh9gibi3uYwd33MGExkofZjhjxZs5ubcLL41I1TI+89MDuO46ng36BvXnDPxNTx28GbpUNblLyU4N5TQnYefV7aixtws4TUjI7w+CS8V3dZHgoNLHAqkREGxSSVMYZKA/Eh83mrhniuGNpeAxvAtZoMT+kE8XkCrhDr3JKnGxK5snvPn5DLI5vQ6NteG1Autr4/grIW5WjtUF288UgNHrUUIJW0YyZ5ljqjFFhrZOgacWXKMY/L1t7QPswspXAsHsS X-Forefront-Antispam-Report: CIP:69.169.224.5;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-5.smtp-out.eu-central-1.amazonses.com;PTR:b224-5.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(61400799027)(9140799003)(376014)(48200799018)(32142699015)(18002099003)(22082099003)(5113699003)(4113699003)(55112099003)(16102099003)(13003099007)(56012099006)(5023799004)(5063699009)(261102123227099003)(261028144727099003)(261009223027099003)(261026140227099003)(261022105027099003)(261021121427099003)(261022075727099003)(261026121527099003)(261022113327099003)(261026135527099003)(10067099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AJyLwjw/+W3mVhVZ3TGYO399zIKCXIoh3GliZKm67V6KT7JgtvkhIs+pC157HaxJ7kLXzKLRfkwRHk+0ZewhJi0TGiJjPBFr41L3722OgfmEL6QPdFUGKTQPADB9FqPJYKqsFVNHEXZkvaa22wEnCFgplQkcFyqvI33nJymZJGokm+demlaIaycQpEVPn4s6pdzkCEni3y2fThCxU5cK/KJVHniviSZq0XCvRd4U8cRE/wW2avdPDxORv1NWQGIoY9uofmy9qt9jcRkrPPE81aZskyMajgGu1igaTXCpXo9htBpfk7m1l0eO7EP0ddZKgITrGNFNLoxVpd9RS3Ry5+jTTY8jkawsAQjETRVV3YcUDf2+UIQB/sl/lcfDJJH3smD8a4hx8JvTbVAvJ6bNaJl8i4eigVeH3+Fyt+lECvmh/eouQekBshh7OYYNWWnu X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2026 21:32:58.6675 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19f01983-cea1-45a4-0aa6-08df49a95829 X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF0000009B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB11532 > From: Denis V. Lunev >=20 > Rate-limited events can be raised from iothreads, outside the BQL. > QUORUM_REPORT_BAD always could be. Since 2155d2dd7f73 BLOCK_IO_ERROR is > rate limited too, and any disk on an iothread raises it. >=20 > The rate-limit timer runs in the main loop. timerlist_run_timers() > takes it off the active list before it calls the handler, and only then > does the handler take monitor_lock. An iothread raising the same event > for the same device in between finds the rate-limit entry with a timer > that is no longer pending, and QEMU aborts with: >=20 > Assertion `!evstate || timer_pending(evstate->timer)' failed. >=20 > This hits virtio-blk on an iothread with an error policy other than > stop when the storage goes away and every guest request fails. >=20 > The state is fine, the assert is wrong. Once the timer has fired, the > handler is committed to run: it takes the lock as soon as the iothread > drops it, sends the stored event and re-arms the timer, exactly as for > an event stored while the timer was pending. The event goes out at the > same moment it would have had the iothread come in after the handler. > The entry is only created, re-armed and freed under monitor_lock, so it > cannot go away under the iothread. Drop the assert. >=20 > Fixes: a24712af5425 ("monitor: Turn monitor_qapi_event_state[] into a has= h table") > Fixes: 2155d2dd7f73 ("block-backend: per-device throttling of BLOCK_IO_ER= ROR reports") > Signed-off-by: Denis V. Lunev Sashiko has reviewed this patch and found no issues. Carry the trailer below into the next revision and Sashiko will not review = this patch again. Reviewed-by: Sashiko --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/2026112321294= 2.242422-1-den@openvz.org?part=3D1