From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56D1C2F5A for ; Mon, 4 Nov 2024 02:38:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730687917; cv=none; b=bLyVKqF5eJ3NSrzSO/wO9G7ePFnDsblrwPwrfXKs/7/UHZUFzec2Rk306ln8BaVko8htPC7IerN+Ou8bgVHddKL8JGbZfw4x2s4ocf81IypZWC6htH952TzO4r3uNE4sb2doBrx0mmw+Bce/O5vGERYKB9aaz3uXErTVdp+Afvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730687917; c=relaxed/simple; bh=XhCyYYk0mEstaNDV/2XhxEt14BcFP29muk01JM58Mg0=; h=Content-Type:Message-ID:Date:MIME-Version:Subject:From:To:Cc: References:In-Reply-To; b=jOZDNdhLdroxgaHDGtTJFkpFruhqcpvWxKf7WCIqBT+HWSxtHAHn3/yad3rFxpU0PW0vc1iNGAJ16gOgda6OAhlGhbzK5GNW40za7PxPIzmTaDIzQoOPhV4ZFGPOfYx3x3YHD9RxZIY2TDL75fNmAl+nBz66tLoTKrlP0c5qKg8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=GIp9u7UL; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="GIp9u7UL" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20c9978a221so36965095ad.1 for ; Sun, 03 Nov 2024 18:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1730687913; x=1731292713; darn=vger.kernel.org; h=in-reply-to:content-language:references:cc:to:from:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=eC3eBFWwdOLE/lj3duyiFnbRAXC5pXb5r7bt7MjFNVc=; b=GIp9u7ULHgWBPkcjslrBVautXIdTTmj7HVxNi/WYUTXH0jDAPcySfBFb2uDz9xR6PB zoaMJiczxr9xFLQTiD/OWPoMI4dGFiYeWWDCUx13nhP/+0Ul4KWPDpdUcWuAj43OZE7e tnkPEmJrfh3b3VTN3tvuZRn12AqPtMVHpSehrSuMaCeKGUOZjw/MmHBhhfkfxie1ucyu xoDtHlLzaIbgNppYdAOS9iQDyXkwWZXSjQpAqEvC3H16Pa6bGvU28bm9OlyZLo7Yn41b B7+Eoq6WL39V7vzWwhe9mUpXhtT3T3hdd2sQWQU14B9WSrXsImfpPKQQPSRivrrpNCKy vtwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730687913; x=1731292713; h=in-reply-to:content-language:references:cc:to:from:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=eC3eBFWwdOLE/lj3duyiFnbRAXC5pXb5r7bt7MjFNVc=; b=pQ7UFpR8RLnhgngBfJLkkmaqW5ZYo2RvDYoV/0g7vW+aLIs4dNZmbz34CQ8Qk7vdrt j3TTLCqfCJQh+pMdhYel9zAhN9IBaRZvbbN2T2IYfPS6BqQuAoanvOYlF+K26PSkdbCW e5K9IcMfgPlFt0fsMNf8aw9giLGeLDT3GZTs3XR58+ZDxoQngMv4gaB9VXXDpRbYdtRY TsW2W7JxRLf6WYPVuyDYeHblZUA9/ZlZd7xFBwWn8DiY2MPmxqsCycC5Is9aZx0eEIvd 0BgZVdVvkCRq3VTm/R/I0uYSg7pfrgQ0nVm4iCX57u9yZZkkmkuV7OBfKzft0rf/OWQQ JeYA== X-Forwarded-Encrypted: i=1; AJvYcCW3uUp2aeTno7aGtB0h8oaCBElhc50Fq1n9vqLHnZ5MXmc4y1f3lr1LhI3cvZ9jqd03bTw3WXSKmg==@vger.kernel.org X-Gm-Message-State: AOJu0YyFQD7OkFA1l9HFI7PtwF7yTSU2YLV1ouqFraVcFSx22XyHcxMM HDKgLh7XkJJmcKTfj7QtbII13BlMVK9BuODB7VPOHq6Sp0fPxMNiaeJz0LfK4TY= X-Google-Smtp-Source: AGHT+IHirDQUIVeuwX+mE5dRWw3aGeXGQssoMqggzHIIOwB3ls3PYAgmLZwJ1Gf7RQMWv52Y0OAvbg== X-Received: by 2002:a17:902:f693:b0:20b:9535:922d with SMTP id d9443c01a7336-210c6d27f7fmr350982525ad.60.1730687912581; Sun, 03 Nov 2024 18:38:32 -0800 (PST) Received: from [192.168.1.150] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2110570865fsm51955925ad.107.2024.11.03.18.38.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Nov 2024 18:38:31 -0800 (PST) Content-Type: multipart/mixed; boundary="------------y0Q5tL4sI0ACrQE9b500uhkB" Message-ID: Date: Sun, 3 Nov 2024 19:38:30 -0700 Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Stable backport (was "Re: PROBLEM: io_uring hang causing uninterruptible sleep state on 6.6.59") From: Jens Axboe To: Keith Busch Cc: Andrew Marshall , io-uring@vger.kernel.org, Greg Kroah-Hartman , stable References: <3d913aef-8c44-4f50-9bdf-7d9051b08941@app.fastmail.com> <25c4c665-1a33-456c-93c7-8b7b56c0e6db@kernel.dk> Content-Language: en-US In-Reply-To: <25c4c665-1a33-456c-93c7-8b7b56c0e6db@kernel.dk> This is a multi-part message in MIME format. --------------y0Q5tL4sI0ACrQE9b500uhkB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/3/24 5:06 PM, Jens Axboe wrote: > On 11/3/24 5:01 PM, Keith Busch wrote: >> On Sun, Nov 03, 2024 at 04:53:27PM -0700, Jens Axboe wrote: >>> On 11/3/24 4:47 PM, Andrew Marshall wrote: >>>> I identified f4ce3b5d26ce149e77e6b8e8f2058aa80e5b034e as the likely >>>> problematic commit simply by browsing git log. As indicated above; >>>> reverting that atop 6.6.59 results in success. Since it is passing on >>>> 6.11.6, I suspect there is some missing backport to 6.6.x, or some >>>> other semantic merge conflict. Unfortunately I do not have a compact, >>>> minimal reproducer, but can provide my large one (it is testing a >>>> larger build process in a VM) if needed?there are some additional >>>> details in the above-linked downstream bug report, though. I hope that >>>> having identified the problematic commit is enough for someone with >>>> more context to go off of. Happy to provide more information if >>>> needed. >>> >>> Don't worry about not having a reproducer, having the backport commit >>> pin pointed will do just fine. I'll take a look at this. >> >> I think stable is missing: >> >> 6b231248e97fc3 ("io_uring: consolidate overflow flushing") > > I think you need to go back further than that, this one already > unconditionally holds ->uring_lock around overflow flushing... Took a look, it's this one: commit 8d09a88ef9d3cb7d21d45c39b7b7c31298d23998 Author: Pavel Begunkov Date: Wed Apr 10 02:26:54 2024 +0100 io_uring: always lock __io_cqring_overflow_flush Greg/stable, can you pick this one for 6.6-stable? It picks cleanly. For 6.1, which is the other stable of that age that has the backport, the attached patch will do the trick. With that, I believe it should be sorted. Hopefully that can make 6.6.60 and 6.1.116. -- Jens Axboe --------------y0Q5tL4sI0ACrQE9b500uhkB Content-Type: text/x-patch; charset=UTF-8; name="0001-io_uring-always-lock-__io_cqring_overflow_flush.patch" Content-Disposition: attachment; filename*0="0001-io_uring-always-lock-__io_cqring_overflow_flush.patch" Content-Transfer-Encoding: base64 RnJvbSAzZjFjMzNmMDMzODZjNDgxY2FmMjA0NGE4MzZmM2NhNjExMDk0MDk4IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXZlbCBCZWd1bmtvdiA8YXNtbC5zaWxlbmNlQGdt YWlsLmNvbT4KRGF0ZTogV2VkLCAxMCBBcHIgMjAyNCAwMjoyNjo1NCArMDEwMApTdWJqZWN0 OiBbUEFUQ0hdIGlvX3VyaW5nOiBhbHdheXMgbG9jayBfX2lvX2NxcmluZ19vdmVyZmxvd19m bHVzaAoKQ29tbWl0IDhkMDlhODhlZjlkM2NiN2QyMWQ0NWMzOWI3YjdjMzEyOThkMjM5OTgg dXBzdHJlYW0uCgpDb25kaXRpb25hbCBsb2NraW5nIGlzIG5ldmVyIGdyZWF0LCBpbiBjYXNl IG9mCl9faW9fY3FyaW5nX292ZXJmbG93X2ZsdXNoKCksIHdoaWNoIGlzIGEgc2xvdyBwYXRo LCBpdCdzIG5vdCBqdXN0aWZpZWQuCkRvbid0IGhhbmRsZSBJT1BPTEwgc2VwYXJhdGVseSwg YWx3YXlzIGdyYWIgdXJpbmdfbG9jayBmb3Igb3ZlcmZsb3cKZmx1c2hpbmcuCgpTaWduZWQt b2ZmLWJ5OiBQYXZlbCBCZWd1bmtvdiA8YXNtbC5zaWxlbmNlQGdtYWlsLmNvbT4KTGluazog aHR0cHM6Ly9sb3JlLmtlcm5lbC5vcmcvci8xNjI5NDdkZjI5OWFhMTI2OTNhYzRiMzA1ZGFj ZWRhYjMyZWM3OTc2LjE3MTI3MDgyNjEuZ2l0LmFzbWwuc2lsZW5jZUBnbWFpbC5jb20KU2ln bmVkLW9mZi1ieTogSmVucyBBeGJvZSA8YXhib2VAa2VybmVsLmRrPgotLS0KIGlvX3VyaW5n L2lvX3VyaW5nLmMgfCAxM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