Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp729742pxv; Thu, 15 Jul 2021 14:40:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ8t/mZC0+OeyP2MCm1ZiYav0psz34TdKigNW1B+nB+LEaSo6TL4KJUshWriDKvSFPq/tB X-Received: by 2002:a05:6402:2899:: with SMTP id eg25mr9826024edb.13.1626385249660; Thu, 15 Jul 2021 14:40:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626385249; cv=none; d=google.com; s=arc-20160816; b=UHNqIRRc8qBOQqdmohe9t7B7jeYFlEC1xTWTzmrme2zs6t37YJfkoUYFIGgxI2ZbF6 Z4Ql/qSEht2AhiuDcRrptpJlkRQHJV+K60nMKgdXQM1JVmOC9uYkTjM14as4NZAugQKA 92hFfwQ/Lj1voniA81D5mtznldW90kaON7YQw716OmeHJpJn828fqFMGXTb7EFosDCxA tAG/Ar+2qg8ZW9RFAZ1FinqV8KoxWYDtt3XCrsyZnmLJsFmD14+ZIkcSfYcZo1ZbRwYY r2gcpdZ5x6DtiYPChmRDTeJjUAy7PIROpBsO+8RLyPhxhyGTpj8Xmm/vxHbPQkxniYu7 +3cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=uQBeqmBNMUwfgzBu0mpPTBIzauoqHgyHlsJEPZhpQ0o=; b=qPDgbpPbSTqZuzy4Sh6WUc0SKrk3kjMa8T8yN8Pwk1A/xWJOEupojEC0xZh4PbLhdE Uio5x27/ArOgdkl++TnbFdBj36h2XA+72q3QuzHUhYb5/pQ/SkS2xrAJqWB4P/U3/QP0 3c+dlUti9XSBZo8fb2qyPKaEmCvoaR3ZOKmZQY2+rT4oSkMO4YzZy7LKmF3yLg55A9q4 N3Seuq6J7C8HLvJluenFhLAdoNsiuQ1xBnqqYf4ZsXf9bBBnwDTUnCOfeVSP77YKiFJa xff6VBOS8JFxeXTfKaLvPb4dgcJ08lm2ZPgVX6AaH89uGgVQOXW4sI5f844l9PkFPgR4 mm5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NJkV7USE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si9712301edi.515.2021.07.15.14.40.24; Thu, 15 Jul 2021 14:40:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NJkV7USE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231364AbhGOVkW (ORCPT + 99 others); Thu, 15 Jul 2021 17:40:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51915 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbhGOVkV (ORCPT ); Thu, 15 Jul 2021 17:40:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626385047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uQBeqmBNMUwfgzBu0mpPTBIzauoqHgyHlsJEPZhpQ0o=; b=NJkV7USE80uiLUlhrz7Ou2NYCdPyLx3c6PuKZPkItBS9OJX05YHaQMBcnnZDK2cH/Bu0xJ xo+NIBrUCwRSOfdbjIb4iV1FMi0ykIp4yeAoe8na6c9ghxbYM2JYJ6M2s8yg6I9v/X8Cp/ KCzFH2CLU7YDhXmIX+N0tGAKGj4dpzk= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-224-QWI6CRkDNmyF34KEfplSsQ-1; Thu, 15 Jul 2021 17:37:25 -0400 X-MC-Unique: QWI6CRkDNmyF34KEfplSsQ-1 Received: by mail-qt1-f199.google.com with SMTP id a12-20020ac8108c0000b029023c90fba3dcso5053788qtj.7 for ; Thu, 15 Jul 2021 14:37:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=uQBeqmBNMUwfgzBu0mpPTBIzauoqHgyHlsJEPZhpQ0o=; b=hTvM3aLjhrG65w2uCrbrp0q7E6otDqxbofug/g+ggzA/cSDtlbKGh0UEtiMkMKzJzw avI0lzQklU7dtzKnO0jcOYfzjTngkMi7TqBzjNqctW1W+3mVl266Qx3whCfu/TvPuULG cx0eGQtVHbSbvpsUWrJEchniqL9hOsMc2x+H7doU+YbL3jL2u7fT+AFh0surDoIr4ryS 4mi9t//MVWwiLvKvc1UTsOJK5b5Xgo2Dg+2Xwyb+ImAgZOU0JlpWCBRu89SlV/EavYk1 IJWKWpV4QwTZpoDwB3f+ovFxOurqqFQbl+20KTRhts3LUuyukOUYUedJxU1WdHzLcwyg oNIA== X-Gm-Message-State: AOAM532Nm6RQr/arOWrhqzv0NH8E+h09H9LSjWZhLatWJHVDw0OisrBX L9P/k+qrw6xuWHbACjlbwbtg9nf17Tapet17rE66ilFDEamL3p+VANI7HYOytHVS0a01hjxIrN3 kEROidXFSrOGxmqXZEZsXJqq0 X-Received: by 2002:a05:622a:5cf:: with SMTP id d15mr5984994qtb.106.1626385044914; Thu, 15 Jul 2021 14:37:24 -0700 (PDT) X-Received: by 2002:a05:622a:5cf:: with SMTP id d15mr5984979qtb.106.1626385044650; Thu, 15 Jul 2021 14:37:24 -0700 (PDT) Received: from loberhel ([2600:6c64:4e7f:cee0:729d:61b6:700c:6b56]) by smtp.gmail.com with ESMTPSA id x9sm2498487qtf.76.2021.07.15.14.37.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jul 2021 14:37:24 -0700 (PDT) Message-ID: <8b0023f5ba9ede85f6f75159847b4c185ab68f6f.camel@redhat.com> Subject: Re: New warning in nvme_setup_discard From: Laurence Oberman To: Greg Kroah-Hartman , Oleksandr Natalenko Cc: linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, David Jeffery , Ming Lei , Paolo Valente , Jan Kara , Sasha Levin , Keith Busch Date: Thu, 15 Jul 2021 17:37:21 -0400 In-Reply-To: References: <4729812.CpyZKHjjVO@natalenko.name> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-07-15 at 16:19 +0200, Greg Kroah-Hartman wrote: > On Thu, Jul 15, 2021 at 03:56:38PM +0200, Oleksandr Natalenko wrote: > > Hello. > > > > After a v5.13.2 massive update I encountered this: > > > > ``` > > [19231.556665] ------------[ cut here ]------------ > > [19231.556674] WARNING: CPU: 20 PID: 502 at > > drivers/nvme/host/core.c:850 > > nvme_setup_discard+0x188/0x1f0 > > ... > > [19231.556776] CPU: 20 PID: 502 Comm: kworker/20:1H Not tainted > > 5.13.2 #1 > > [19231.556780] Hardware name: ASUS System Product Name/Pro WS X570- > > ACE, BIOS > > 3601 05/26/2021 > > [19231.556784] Workqueue: kblockd blk_mq_run_work_fn > > [19231.556789] RIP: 0010:nvme_setup_discard+0x188/0x1f0 > > [19231.556794] Code: 49 8b 44 24 10 4c 8b 90 40 0b 00 00 4c 2b 15 > > 8f 09 d8 00 > > 49 c1 fa 06 49 c1 e2 0c 4c 03 15 90 09 d8 00 4d 89 d0 e9 b9 fe ff > > ff <0f> 0b b8 > > 00 00 00 80 49 01 c2 72 52 48 c7 c0 00 00 00 80 48 2b 05 > > [19231.556798] RSP: 0018:ffffaed2416efc00 EFLAGS: 00010287 > > [19231.556802] RAX: ffff8e67fb580000 RBX: ffff8e640bbe5240 RCX: > > 0000000000000020 > > [19231.556805] RDX: ffff8e67fb580000 RSI: 000000000000001f RDI: > > 0000000000000000 > > [19231.556808] RBP: ffff8e640bbe5388 R08: ffff8e677b580000 R09: > > 0000000008abb800 > > [19231.556811] R10: ffff8e677b580000 R11: 0000000000000400 R12: > > ffff8e6405999c00 > > [19231.556814] R13: 000000000000001f R14: ffff8e6405693000 R15: > > ffff8e640bbaf800 > > [19231.556816] FS: 0000000000000000(0000) > > GS:ffff8e6b0ef00000(0000) knlGS: > > 0000000000000000 > > [19231.556819] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > [19231.556822] CR2: ffff888c76ece000 CR3: 000000047a184000 CR4: > > 0000000000350ee0 > > [19231.556825] Call Trace: > > [19231.556830] nvme_setup_cmd+0x2d0/0x670 > > [19231.556834] nvme_queue_rq+0x79/0xc90 > > [19231.556837] ? __sbitmap_get_word+0x30/0x80 > > [19231.556842] ? sbitmap_get+0x85/0x180 > > [19231.556846] blk_mq_dispatch_rq_list+0x15c/0x810 > > [19231.556851] ? list_sort+0x21d/0x2f0 > > [19231.556856] __blk_mq_do_dispatch_sched+0x196/0x320 > > [19231.556860] __blk_mq_sched_dispatch_requests+0x14d/0x190 > > [19231.556864] blk_mq_sched_dispatch_requests+0x2f/0x60 > > [19231.556867] blk_mq_run_work_fn+0x43/0xc0 > > [19231.556871] process_one_work+0x24e/0x430 > > [19231.556876] worker_thread+0x54/0x4d0 > > [19231.556880] ? process_one_work+0x430/0x430 > > [19231.556883] kthread+0x1b3/0x1e0 > > [19231.556886] ? __kthread_init_worker+0x50/0x50 > > [19231.556889] ret_from_fork+0x22/0x30 > > [19231.556895] ---[ end trace d9abdf019a56b4c7 ]--- > > [19231.556906] blk_update_request: I/O error, dev nvme1n1, sector > > 632935424 op > > 0x3:(DISCARD) flags 0x0 phys_seg 31 prio class 0 > > ``` > > > > or, in code: > > > > ``` > > 850 if (WARN_ON_ONCE(n != segments)) { > > 851 if (virt_to_page(range) == ns->ctrl->discard_page) > > 852 clear_bit_unlock(0, &ns->ctrl->discard_page_busy); > > 853 else > > 854 kfree(range); > > 855 return BLK_STS_IOERR; > > 856 } > > ``` > > > > BFQ scheduler is in use. > > > > Something similar was already fixed by > > a958937ff166fc60d1c3a721036f6ff41bfa2821, > > but I do not have a multipath device here, it's just 2 NVMe SSDs in > > a soft > > RAID10 with LUKS and LVM. > > > > Any idea what this might mean? v5.13.2 brought some commit into a > > stable tree > > that are, as I still suspect, causing unreproducible panics [1] > > [2]. > > Previously, I dropped that extra stuff from my kernel build and had > > no issues. > > This time I also do not have any extra commits in the block layer, > > only those > > that are in v5.13.2. > > > > Thanks. > > > > [1] https://lore.kernel.org/linux-block/3533087.dJKXTdksHR@spock/ > > [2] https://lore.kernel.org/linux-block/2957867.CS06ZTPI5V@spock/ > > Can you run 'git bisect' to find the offending patch? > > thanks, > > greg k-h > Hello [root@ml150 ~]# uname -a Linux ml150 5.14.0-rc1+ #1 SMP Thu Jul 15 16:41:08 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux [root@ml150 ~]# nvme list Node SN Model Namespace Usage Format FW Rev ---------------- -------------------- ------------------------------- --------- --------- -------------------------- ---------------- ----- --- /dev/nvme0n1 CVCQ536300C9400AGN INTEL SSDPEDMW400G4 1 400.09 GB / 400.09 GB 512 B + 0 B 8EV10135 /dev/nvme1n1 CVFT7383000W400BGN INTEL SSDPEDMD400G4 1 400.09 GB / 400.09 GB 512 B + 0 B 8DV10171 fwiw I built 5.14 and I have 2 nvme devices and I am not seeing this even using them to build the kernel on. Regards Laurence Oberman