Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2599538lqo; Tue, 14 May 2024 03:59:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUR0Xgm1dneBGX6rYEX+2pmL4/A8p18QmnqNZ45RFzCWJ+jy5bEF0kKSwp5PZIYV7NTFa0bBp3axs/G2z1wL8znesMxZHhtFhvY7dSgcQ== X-Google-Smtp-Source: AGHT+IGarPm6gRELLpEcXk5A6RDDSAzN4SdPegXiR5V/xidXXfD3Yn3r5hwx+ILyWw35Tvt9esbY X-Received: by 2002:a50:d5ca:0:b0:572:a4eb:6682 with SMTP id 4fb4d7f45d1cf-5734d6b1f9amr8505069a12.30.1715684341208; Tue, 14 May 2024 03:59:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715684341; cv=pass; d=google.com; s=arc-20160816; b=QRkdOU17D8AX8nybu534AHkegctGIFZO0z7+o//56tzUnjAiL0WKCI9wyc5aURyGMP Va+BLteBCP31x8M1erwnsRtqeLnRtUZYxk8tG4tWZ+8UQ5WMnhran3mx9Ebya0gslO4/ yl1TDfkAqkV9udRvAFWEFlwkfDEzkHf9eUVUTTphLYTaJwyDlQ5s76ia0Q0skot4lGu8 ATdgTzvMRgFzh4mHSmNw5SUjKAgqPR2c+CxElncdxaFxWkKeddEb7ar68las+TL88meA NQrD+EYAK33V1dM/6u9ZvRqL1N+PjMUPziFDG5hwHLuGxqfD3+T4TCDar6vAcOtgp2mE utjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=aWkqLS6MXvhCx1OreFFjPbkUPRButFj1gWnRIvm+26w=; fh=Z/dQfjCw6xekLK2CgMufJQNNpcPFs7MkwwZB0YVX3UI=; b=qKgeyyYl4Ktw7p4yhM7jX/WEwGT8FOoZjtGjl19zP0KOQv+z1vB8BHYeue03/jMfgg Hee6uAOOTuSPMHGDnZBM8L7v1HjQU8G2/GQcL5lR5lApGWXEnpFzq14kWhw9DPdZrQ/+ I85YL0RanaHJ0cQkHkiJhWR4BocmQtVoKi/JFNZN/kCIUkByS/IMY798YwpcKD+1GEtM YrdpTVxC5qG52lDV5ExFUmPJCPS5Bui4+Pq+2l++zPBUJFrrta6+7aW1gDWrzgWJoxPR ul4wtegSDPYz/HH7ZWDl1oyRe724AW9yktyWu6cK8IQ83wrt3wwOuZq/9uuXymiGf752 XP9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-178561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178561-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733bead0d2si6086833a12.45.2024.05.14.03.59.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 03:59:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-178561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178561-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id DEE081F20C89 for ; Tue, 14 May 2024 10:59:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4544813A261; Tue, 14 May 2024 10:38:05 +0000 (UTC) Received: from mail115-100.sinamail.sina.com.cn (mail115-100.sinamail.sina.com.cn [218.30.115.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6533A4205D for ; Tue, 14 May 2024 10:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715683084; cv=none; b=eYck2xl1kETQblzwBgUuUzKdSv0zCHsGCksX5HYIEUPfaxVMX13t5Rtp6iTNFM1QblA0C1KcH1rxmao8LTOT+h/Qvw9iZ1pfevyUtfgfvFPbxBHFyGDZiqT3CDWr4fShN2XGybQbko6nSZg1Gkb96yzyOa12ypnOw9eXRegSn5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715683084; c=relaxed/simple; bh=ttL8nhYSj14rqc6rPfMgzrqper9I6jzQqcP61trWcYU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=S9qPxeQiL6bb8RFfnF2oMwIb+TlXE5IsMGr3zYy8DcWOM5QEXfyCNhepcBaQqasQUPWlVPFlTJQX+g2ue+Eyrhg0zizh88dBcicJTU+chIwO+M97JZRlwZXhzk8262tdHIXOJMkMj7G/N16A+PuGuEDa68NpDnc+tEQGiFLS2m0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.50.104]) by sina.com (172.16.235.24) with ESMTP id 66433F00000078FB; Tue, 14 May 2024 18:37:55 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 22684945089256 X-SMAIL-UIID: A76544F3C5E1431A937ADE10C72885BC-20240514-183755-1 From: Hillf Danton To: Sam Sun Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, axboe@kernel.dk, Tetsuo Handa , syzkaller-bugs@googlegroups.com, xrivendell7@gmail.com Subject: Re: [Linux kernel bug] INFO: task hung in blk_mq_get_tag Date: Tue, 14 May 2024 18:37:42 +0800 Message-Id: <20240514103742.3137-1-hdanton@sina.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Tue, 14 May 2024 10:05:21 +0800 Sam Sun > On Tue, May 14, 2024 at 6:54 AM Hillf Danton wrote: > > On Mon, 13 May 2024 20:57:44 +0800 Sam Sun > > > > > > I applied this patch and tried using the C repro, but it still crashed > > > with the same task hang kernel dump log. > > > > Oh low-hanging pear is sour, and try again seeing if there is missing > > wakeup due to wake batch. > > > > --- x/lib/sbitmap.c > > +++ y/lib/sbitmap.c > > @@ -579,6 +579,8 @@ void sbitmap_queue_wake_up(struct sbitma > > unsigned int wake_batch = READ_ONCE(sbq->wake_batch); > > unsigned int wakeups; > > > > + __sbitmap_queue_wake_up(sbq, nr); > > + > > if (!atomic_read(&sbq->ws_active)) > > return; > > > > -- > > I applied this patch together with the last patch. Unfortunately it > still crashed. After two rounds of test, what is clear now so far is -- it is IOs in flight that caused the task hung reported, though without spotting why they failed to complete within 120 seconds. > > Pointed out by Tetsuo, this kernel panic might be caused by sending > NMI between cpus. As dump log shows: > ``` > [ 429.046960][ T32] NMI backtrace for cpu 0 > [ 429.047499][ T32] CPU: 0 PID: 32 Comm: khungtaskd Not tainted 6.9.0-dirty #6 > [ 429.048417][ T32] Hardware name: QEMU Standard PC (i440FX + PIIX, > 1996), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014 > [ 429.049873][ T32] Call Trace: > [ 429.050299][ T32] > [ 429.050672][ T32] dump_stack_lvl+0x201/0x300 > ... > [ 429.063133][ T32] ret_from_fork_asm+0x11/0x20 > [ 429.063735][ T32] > [ 429.064168][ T32] Sending NMI from CPU 0 to CPUs 1: > [ 429.064833][ T32] BUG: unable to handle page fault for address: > ffffffff813d4cf1 Given many syzbot reports without gpf like this one, I have difficulty understanding it. If it is printed after task hung detected, it should be a seperate issue. > [ 429.065765][ T32] #PF: supervisor write access in kernel mode > [ 429.066502][ T32] #PF: error_code(0x0003) - permissions violation > [ 429.067274][ T32] PGD db38067 P4D db38067 PUD db39063 PMD 12001a1 > [ 429.068068][ T32] Oops: 0003 [#1] PREEMPT SMP KASAN NOPTI > [ 429.068767][ T32] CPU: 0 PID: 32 Comm: khungtaskd Not tainted > 6.9.0-dirty #6 > [ 429.069666][ T32] Hardware name: QEMU Standard PC (i440FX + PIIX, > 1996), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014 > [ 429.071142][ T32] RIP: 0010:__send_ipi_mask+0x541/0x690