Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp408986lqp; Wed, 12 Jun 2024 05:35:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVYqiUh4hYR7CZdBtf28qwGFhNQ5lRHMNzN0/2wZX3nElJRP7I5TcEvxlamanOcT8olk4JTvgwNpwScaO/kEQahQAXbz9vwlG0Q+/eI/A== X-Google-Smtp-Source: AGHT+IHxIDoRCBTcPU+/nVUP5t+ZQeaZ41stWAtk5qv1QcZUuk/eaOHl1YQbtUb/4TGxQqLUm9CV X-Received: by 2002:a05:6a20:2590:b0:1b8:7cd7:7aa8 with SMTP id adf61e73a8af0-1b8a9c76246mr2270145637.41.1718195753857; Wed, 12 Jun 2024 05:35:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718195753; cv=pass; d=google.com; s=arc-20160816; b=Gh1C9awT1D1MVlSBCB46UAK0ieLTqCmri5YzW5OLayXoPLTJgYUB5G3idqoeqGlBk1 kAScHBWQG1Dob5KcQifiBDoDAcOiR3FD8S260MDZA3pXoawz9I//4y14DFbgDARHOmF3 p67aXyU8A9nC7ikI4E9CKKVJsdB5a5RKOD+bTmTcvlgX1wXyjqrMudLK9nCEMtwErgUt JJcvy28Jy9eMLDMjC0mfNBpI3KwwNQCI3hSMHkFiITpd5pa+Kg6Z1VMsSX4uxdKAKBvL XWO3qi72Z36ExoiHz/4BQkpBbJGguBtxHFIGOkO+ZwS3Gl/zLz6/ZeblmbdyloeL1uvu NZiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=KRmihzRKsZKPXkmImPA2PJdwqrzPV0j1SUb1OGAaqoc=; fh=fMoz8NoyTqNOrVBLIsSQUHHLHImyWwt26OsB4UPAanY=; b=U/EnzVM84UBzdUzybzmVX6la8hoJcFtpEOv/1nDM96EyKch6IA0nprHGQye3Kxui8q F1bJ8+t0L3eHYYSVVYCvLXyInZFrePAcLeB6sOCiMO2ycypN5kj++UfcNoK7JSSnUjYG 0RUo3I++sNdpdOg5gTI8BkzVDp+KkFUHVSA2mp7oGapvvBxqIgNQoE7iIOc/eJHEJqMJ jAkdGzms9TjOggBWNnukxi9QiAWFuuV8ttSFkWMrFEJ+dF4GwvNd3QKsTyaZW8hizSjg lxb6AFPtsgfA9CbxRk8dwj2tHUID428qQK+HC8A14gFKE7UVeI56J9b+H/ssoXe1HhUL dSlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UZggQePO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211491-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de20831b35si11652601a12.57.2024.06.12.05.35.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 05:35:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211491-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UZggQePO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211491-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 77281282937 for ; Wed, 12 Jun 2024 12:35:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44616170835; Wed, 12 Jun 2024 12:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UZggQePO" Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (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 CCA1F16D4F6; Wed, 12 Jun 2024 12:35:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718195746; cv=none; b=Qfe9cwXYoEagCSjv5YA1mphPw+Cm4G7bIBLVfu9zlivVztc13xRZv+9gOs8exSAzHLHzNJW3HRXv5DtImUvlLWVwH/lGWYdEkSoJOKaJksSpj+Efot0Ni+lkBTuCGLv3BqY7zH1Y319wd9VZqcgWcvACD1mXDY/y93EkHtrTm3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718195746; c=relaxed/simple; bh=75aY26XuMuHZAMH1H77DDXsruluFV5/Q1HkpU9UlInU=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=WlxjkKPb1Zznz0/5GlmXrvOgwjjK0WSt+O/LyS+lwVkgigfcx5J7drK1DUSvbdu76UiaCDoY7pUXXLNQXiWWSVp25pM7rEmupl0lACn5386K6NzU7fxyDEXSTi3EYBUvCJabAJ9AxlPNpO1YOoGejVgSIPKmzzVn1ze/dAiowGc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UZggQePO; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-57c72d6d5f3so5267067a12.1; Wed, 12 Jun 2024 05:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718195743; x=1718800543; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=KRmihzRKsZKPXkmImPA2PJdwqrzPV0j1SUb1OGAaqoc=; b=UZggQePODzwNyl/i3peyhVVQa8LCk5pnQ+TK46s5ck7aHiM7g/Do3msJrhS3pKtO3E 79lGyPQxLUjj3YrNcgT9vcTaA8vpJloTWPSlmN37mRGgSOwsXdU45XETcPsn+9wys5NV oyQV8C74Qlk2VfgNO/omr8pBgEYUYgiVjWMQvz4uHTt7EoE+ATUnIR2o5w5WE3b5uQTi 9Tqn06t1g31slmlDPiXEjlDxY1yuzgoYSGm4b9F2SLrK5Fm90/xqXEA00cKZBKyvr51R xb+CljHeZNnq+erIZVjHZAbW5o2sD7jJx1QTuAwbN5L1YhQQnLCkdD0euc7kmlsKt1hX Y5vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718195743; x=1718800543; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KRmihzRKsZKPXkmImPA2PJdwqrzPV0j1SUb1OGAaqoc=; b=ZOJe2vJVgNTxzETN5WHzNoEMCfgeXMeYqqZldYkIcIQqa97sMAEVoptsemHJXF5x4T hIzjtUC45vdDX9l/LmQATO93U/tMxqv2chYQbiGIP9pWdWxmg/a3Qrckc0gGR/cEmPMW P9puwze6hIK2sSAhtIPMZe5nMcV1PNT49VLUZDmE+bNcpvNHlLNe4htt2T5PmqSABtV3 ZSJmdyqJ8sZ7NbqvqVhpkhIDXiNcyYsDnhhDRZ33iiDzzjQpqJIazRaLgvqWNlpdE7FC yKC+BXHMew3OrdwgSwYpA7WT3unkqEOJTCqMXmaMHMoehNljcMVuqG08IJeGwx52j324 dzXA== X-Forwarded-Encrypted: i=1; AJvYcCWm5VJXA1Y+7lj78ak71ZzvCSmyhS7bzxXkFLGTwDg/kjds08pDZBPhQSPOiiWAK462XwO5CC4z6cWD3PcvYRZ2IshFZ8YdQR5MJEEDirmnhyLVUyM6xmIG2ITgkXFMyKdn15puqaM= X-Gm-Message-State: AOJu0YxYVcXw2RKAWF6Oyo8UUEnXhf63YGwZ/jEhBwUcgIfRWa6RpzKU /KGYMSbfwAzE7a9sW1lqqVgIQocjMT1WtDGc9MmNYB5vHL2Vx+9qPF1iCg== X-Received: by 2002:a17:906:355b:b0:a6f:4e02:ce55 with SMTP id a640c23a62f3a-a6f4e0323e1mr31088866b.53.1718195742741; Wed, 12 Jun 2024 05:35:42 -0700 (PDT) Received: from [192.168.42.244] ([163.114.131.193]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c8072a101sm879776266b.201.2024.06.12.05.35.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jun 2024 05:35:42 -0700 (PDT) Message-ID: <6213cf3d-b114-4c27-b9c5-6339b9f363aa@gmail.com> Date: Wed, 12 Jun 2024 13:35:50 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [io-uring] WARNING in io_fill_cqe_req_aux To: chase xd , Jens Axboe , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: <4fd9cd27-487d-4a23-b17a-aa9dcb09075f@gmail.com> Content-Language: en-US From: Pavel Begunkov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/12/24 08:10, chase xd wrote: > Sorry now I'm also a bit confused by the branch choosing. I checked > out branch "for-6.9/io_uring" and started testing on that branch. I > assume that was the latest version of io_uring at that time, even now > I check out that branch and the bug still exists. How should I know > whether the branch will be merged, and which branch do you think I > should test on? Thanks. # git show a69d20885494:io_uring/io_uring.c | grep -A 13 io_fill_cqe_req_aux bool io_fill_cqe_req_aux(struct io_kiocb *req, bool defer, s32 res, u32 cflags) { struct io_ring_ctx *ctx = req->ctx; u64 user_data = req->cqe.user_data; if (!defer) return __io_post_aux_cqe(ctx, user_data, res, cflags, false); lockdep_assert_held(&ctx->uring_lock); io_lockdep_assert_cq_locked(ctx); ctx->submit_state.flush_cqes = true; return io_fill_cqe_aux(ctx, user_data, res, cflags); } That's the buggy version from the hash you're testing, IIRC it was in the tree for longer than necessary, presumably which is why you found it, but it was never sent to Linus. Below is current state of for-6.9 and what it was replaced with respectively. Let me separately check for-6.9/io_uring if you're concerned about it. # git show for-6.9/io_uring:io_uring/io_uring.c | grep -A 30 io_fill_cqe_req_aux bool io_fill_cqe_req_aux(struct io_kiocb *req, bool defer, s32 res, u32 cflags) { struct io_ring_ctx *ctx = req->ctx; u64 user_data = req->cqe.user_data; struct io_uring_cqe *cqe; lockdep_assert(!io_wq_current_is_worker()); if (!defer) return __io_post_aux_cqe(ctx, user_data, res, cflags, false); lockdep_assert_held(&ctx->uring_lock); if (ctx->submit_state.cqes_count == ARRAY_SIZE(ctx->completion_cqes)) { ... # git show origin/for-6.10/io_uring:io_uring/io_uring.c | grep -A 13 io_req_post_cqe bool io_req_post_cqe(struct io_kiocb *req, s32 res, u32 cflags) { struct io_ring_ctx *ctx = req->ctx; bool posted; lockdep_assert(!io_wq_current_is_worker()); lockdep_assert_held(&ctx->uring_lock); __io_cq_lock(ctx); posted = io_fill_cqe_aux(ctx, req->cqe.user_data, res, cflags); ctx->submit_state.cq_flush = true; __io_cq_unlock_post(ctx); return posted; } -- Pavel Begunkov