From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38436C433EF for ; Wed, 16 Feb 2022 06:37:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 93AC56B0078; Wed, 16 Feb 2022 01:37:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8EB0F6B007B; Wed, 16 Feb 2022 01:37:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B09F6B007D; Wed, 16 Feb 2022 01:37:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0215.hostedemail.com [216.40.44.215]) by kanga.kvack.org (Postfix) with ESMTP id 6B87D6B0078 for ; Wed, 16 Feb 2022 01:37:37 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 13ED792E08 for ; Wed, 16 Feb 2022 06:37:37 +0000 (UTC) X-FDA: 79147686954.12.627AAB4 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by imf23.hostedemail.com (Postfix) with ESMTP id 46021140003 for ; Wed, 16 Feb 2022 06:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1644993456; x=1676529456; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=CGvzGEO6H0Vv782UdYzwFn2xFK4FwUxx8fKugTOPQL8=; b=hKZYaI1QjB5ZbfPxC75VONsH6MIz5UBxcQ3CIluG7a4zF0X9tNN/euKP Et6BzZWP5AxVWMcWPbbGWQndwQHt8SE0OoH8omJLea7xBNhAJZFtsW4hF 0FsyjEQS1tVSDi4Kex+VcrKPW2ngUXPls3oUspQN9pSO194TadeccZVa/ RJYu4ACE6yhhaxLOSvU6EoM7k2eqemx3208Xy3ji7Ld2Zed2tedOLjLwT JwRlq8klLKYK14UrANnEPLJdOnTSxATkXuKaITw9qk+VIu+nmJsq1kwF1 K9T3wgddDNE3BAyWug/PSOdEkiDsdI/Ea2D165elU0kalx2HBODlvX/u9 A==; X-IronPort-AV: E=Sophos;i="5.88,373,1635177600"; d="scan'208";a="192005036" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 16 Feb 2022 14:37:34 +0800 IronPort-SDR: UY6AD3oZjpfpp10/wrUV4Y6aCnMlBO0D0uFLZ+4olgUmtL+ubMvnt4Y7gS3rS1gf/5Cml8f6BO zt7S+KA2TMkcCltxi07FBB8PanAtt92Ppp0mHRO15d5rcz4uK+jfzCrzLBDStlH+8BU4kcHUnc 8VjWK6fg+cI8KEGMEDsDbbI4DZxXXYSNdBbnTf0HWmpK1ZCUkkERDQpc/frZNqU1A3Ab/VES+U xB/f3Kcj9l3spNiCWL0WKK007ni64phBynDa2KZF09eeBNGj7G+dAn8T6mC/ou1G9GvCp8lrDy 8a7wVjHvq+iUSZcy3blAOR+9 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 22:09:15 -0800 IronPort-SDR: /2posuwMT98Q5zqaxOJ+eNNuxeFsoW2KvfzVPaxrx4XLbxiGmudosxij9ctcbLu1Kw0CV4UnpI oMHZuTzXSZ8oO3ZtsUNi/Jq1nqgr9KE8SphzGcURBohYA1Y8gmf34l8uDgfdVpVwX6yRgs6WIS ax1UAbWkm/weXJeBP+KbxM6c1rJp4MClbqPZzANrPEOSTriIPRxGbSbwTBx0UIWECBj9MQR0DE fXaTvIUHosxC9h+nTV4ZqacV6pa6Fcn4Ge//7RaZhPMLjAY1nCb3s9BUmdkvEtN+4yH87WkHB2 NxM= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 22:37:35 -0800 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Jz7YV044Cz1SVnx for ; Tue, 15 Feb 2022 22:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1644993451; x=1647585452; bh=CGvzGEO6H0Vv782UdYzwFn2xFK4FwUxx8fK ugTOPQL8=; b=LCiPWDmy/wDI9DZBJkajNtBqe8X5r+11fnaTaBf8Kbsbq2tUdhe gETKJ9RgJ/Xbri5R05zB8BaD9Ft+ponZLq7aIs8vQsV1b1QFZamGODCpBAA/TokJ cBqZEvXvZc7Pn7OC1JMxvH8KH+v+K1+/rrG2c9tM/8i8FZwQ9baooRAdmPx7qoq/ SFZO2XKB1UpA97RQm56x3IVR6ka22Nq8cWVTN7pqaurmVzcIWLykV1aDrS1//maB 9/3P6U/owNBDKC75Zj6g5pgEQHndXfeaY7GEPpO/qB/NRWDQSq0ioGuNUA2ABrtq bUHvu3kOhVquB2kMomuqOfHejGOTqCFXofQ== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id b5299dblOclP for ; Tue, 15 Feb 2022 22:37:31 -0800 (PST) Received: from [10.225.163.73] (unknown [10.225.163.73]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Jz7YF53xcz1Rwrw; Tue, 15 Feb 2022 22:37:21 -0800 (PST) Message-ID: <94b1cba2-0e78-bbc0-0321-8be70b2b3be2@opensource.wdc.com> Date: Wed, 16 Feb 2022 15:37:20 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Report in ata_scsi_port_error_handler() Content-Language: en-US To: Byungchul Park , linux-ide@vger.kernel.org Cc: torvalds@linux-foundation.org, mingo@redhat.com, linux-kernel@vger.kernel.org, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, chris@chris-wilson.co.uk, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, bfields@fieldses.org, gregkh@linuxfoundation.org, kernel-team@lge.com, linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@kernel.org, minchan@kernel.org, hannes@cmpxchg.org, vdavydov.dev@gmail.com, sj@kernel.org, jglisse@redhat.com, dennis@kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, vbabka@suse.cz, ngupta@vflare.org, linux-block@vger.kernel.org, axboe@kernel.dk, paolo.valente@linaro.org, josef@toxicpanda.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com References: <1644984747-26706-1-git-send-email-byungchul.park@lge.com> <1644984964-28300-1-git-send-email-byungchul.park@lge.com> <1644984964-28300-3-git-send-email-byungchul.park@lge.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <1644984964-28300-3-git-send-email-byungchul.park@lge.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46021140003 X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=hKZYaI1Q; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=LCiPWDmy; spf=pass (imf23.hostedemail.com: domain of "prvs=0397431e6=damien.lemoal@opensource.wdc.com" designates 216.71.154.42 as permitted sender) smtp.mailfrom="prvs=0397431e6=damien.lemoal@opensource.wdc.com"; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com X-Stat-Signature: ttds8aom1kbtmufg3gxjzyx67y6kxb4u X-Rspamd-Server: rspam11 X-HE-Tag: 1644993456-336657 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000033, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2/16/22 13:16, Byungchul Park wrote: > [ 2.051040] =================================================== > [ 2.051406] DEPT: Circular dependency has been detected. > [ 2.051730] 5.17.0-rc1-00014-gcf3441bb2012 #2 Tainted: G W > [ 2.051991] --------------------------------------------------- > [ 2.051991] summary > [ 2.051991] --------------------------------------------------- > [ 2.051991] *** DEADLOCK *** > [ 2.051991] > [ 2.051991] context A > [ 2.051991] [S] (unknown)(&(&ap->eh_wait_q)->dmap:0) > [ 2.051991] [W] __raw_spin_lock_irq(&host->lock:0) > [ 2.051991] [E] event(&(&ap->eh_wait_q)->dmap:0) > [ 2.051991] > [ 2.051991] context B > [ 2.051991] [S] __raw_spin_lock_irqsave(&host->lock:0) > [ 2.051991] [W] wait(&(&ap->eh_wait_q)->dmap:0) > [ 2.051991] [E] spin_unlock(&host->lock:0) Sleeping with a spinlock held would be triggering warnings already, so these reports seem bogus to me. In any case, trying to make sense of these reports is not easy, to say the least. If you think there is really a bug, then please send a clear explanation of your findings rather than a raw tool output that did not go through human analysis. > [ 2.051991] > [ 2.051991] [S]: start of the event context > [ 2.051991] [W]: the wait blocked > [ 2.051991] [E]: the event not reachable > [ 2.051991] --------------------------------------------------- > [ 2.051991] context A's detail > [ 2.051991] --------------------------------------------------- > [ 2.051991] context A > [ 2.051991] [S] (unknown)(&(&ap->eh_wait_q)->dmap:0) > [ 2.051991] [W] __raw_spin_lock_irq(&host->lock:0) > [ 2.051991] [E] event(&(&ap->eh_wait_q)->dmap:0) > [ 2.051991] > [ 2.051991] [S] (unknown)(&(&ap->eh_wait_q)->dmap:0): > [ 2.051991] (N/A) > [ 2.051991] > [ 2.051991] [W] __raw_spin_lock_irq(&host->lock:0): > [ 2.051991] [] ata_sff_flush_pio_task+0x45/0xc0 > [ 2.051991] stacktrace: > [ 2.051991] _raw_spin_lock_irq+0x58/0x90 > [ 2.051991] ata_sff_flush_pio_task+0x45/0xc0 > [ 2.051991] ata_exec_internal_sg+0x422/0x690 > [ 2.051991] ata_do_set_mode+0x5ee/0xac0 > [ 2.051991] ata_set_mode+0xfc/0x110 > [ 2.051991] ata_eh_recover+0x1061/0x1360 > [ 2.051991] ata_do_eh+0x3f/0xa0 > [ 2.051991] ata_scsi_port_error_handler+0x432/0x740 > [ 2.051991] ata_scsi_error+0x94/0xc0 > [ 2.051991] scsi_error_handler+0x8d/0x3a0 > [ 2.051991] kthread+0xe3/0x110 > [ 2.051991] ret_from_fork+0x22/0x30 > [ 2.051991] > [ 2.051991] [E] event(&(&ap->eh_wait_q)->dmap:0): > [ 2.051991] [] __wake_up_common+0x93/0x1a0 > [ 2.051991] stacktrace: > [ 2.051991] dept_event+0x12b/0x1f0 > [ 2.051991] __wake_up_common+0xb0/0x1a0 > [ 2.051991] __wake_up_common_lock+0x65/0x90 > [ 2.051991] ata_scsi_port_error_handler+0x67a/0x740 > [ 2.051991] ata_scsi_error+0x94/0xc0 > [ 2.051991] scsi_error_handler+0x8d/0x3a0 > [ 2.051991] kthread+0xe3/0x110 > [ 2.051991] ret_from_fork+0x22/0x30 > [ 2.051991] --------------------------------------------------- > [ 2.051991] context B's detail > [ 2.051991] --------------------------------------------------- > [ 2.051991] context B > [ 2.051991] [S] __raw_spin_lock_irqsave(&host->lock:0) > [ 2.051991] [W] wait(&(&ap->eh_wait_q)->dmap:0) > [ 2.051991] [E] spin_unlock(&host->lock:0) > [ 2.051991] > [ 2.051991] [S] __raw_spin_lock_irqsave(&host->lock:0): > [ 2.051991] [] ata_port_wait_eh+0x6c/0xc0 > [ 2.051991] stacktrace: > [ 2.051991] _raw_spin_lock_irqsave+0x82/0xa0 > [ 2.051991] ata_port_wait_eh+0x6c/0xc0 > [ 2.051991] ata_port_probe+0x1f/0x30 > [ 2.051991] async_port_probe+0x27/0x50 > [ 2.051991] async_run_entry_fn+0x21/0xa0 > [ 2.051991] process_one_work+0x317/0x640 > [ 2.051991] worker_thread+0x44/0x410 > [ 2.051991] kthread+0xe3/0x110 > [ 2.051991] ret_from_fork+0x22/0x30 > [ 2.051991] > [ 2.051991] [W] wait(&(&ap->eh_wait_q)->dmap:0): > [ 2.051991] [] prepare_to_wait+0x47/0xd0 > [ 2.051991] stacktrace: > [ 2.051991] ata_port_wait_eh+0x52/0xc0 > [ 2.051991] ata_port_probe+0x1f/0x30 > [ 2.051991] async_port_probe+0x27/0x50 > [ 2.051991] async_run_entry_fn+0x21/0xa0 > [ 2.051991] process_one_work+0x317/0x640 > [ 2.051991] worker_thread+0x44/0x410 > [ 2.051991] kthread+0xe3/0x110 > [ 2.051991] ret_from_fork+0x22/0x30 > [ 2.051991] > [ 2.051991] [E] spin_unlock(&host->lock:0): > [ 2.051991] [] ata_port_wait_eh+0x5e/0xc0 > [ 2.051991] stacktrace: > [ 2.051991] _raw_spin_unlock_irqrestore+0x35/0x80 > [ 2.051991] ata_port_wait_eh+0x5e/0xc0 > [ 2.051991] ata_port_probe+0x1f/0x30 > [ 2.051991] async_port_probe+0x27/0x50 > [ 2.051991] async_run_entry_fn+0x21/0xa0 > [ 2.051991] process_one_work+0x317/0x640 > [ 2.051991] worker_thread+0x44/0x410 > [ 2.051991] kthread+0xe3/0x110 > [ 2.051991] ret_from_fork+0x22/0x30 > [ 2.051991] --------------------------------------------------- > [ 2.051991] information that might be helpful > [ 2.051991] --------------------------------------------------- > [ 2.051991] CPU: 1 PID: 53 Comm: scsi_eh_1 Tainted: G W 5.17.0-rc1-00014-gcf3441bb2012 #2 > [ 2.051991] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 > [ 2.051991] Call Trace: > [ 2.051991] > [ 2.051991] dump_stack_lvl+0x44/0x57 > [ 2.051991] print_circle+0x384/0x510 > [ 2.051991] ? print_circle+0x510/0x510 > [ 2.051991] cb_check_dl+0x58/0x60 > [ 2.051991] bfs+0xdc/0x1b0 > [ 2.051991] add_dep+0x94/0x120 > [ 2.051991] do_event.isra.22+0x284/0x300 > [ 2.051991] ? __wake_up_common+0x93/0x1a0 > [ 2.051991] dept_event+0x12b/0x1f0 > [ 2.051991] __wake_up_common+0xb0/0x1a0 > [ 2.051991] __wake_up_common_lock+0x65/0x90 > [ 2.051991] ata_scsi_port_error_handler+0x67a/0x740 > [ 2.051991] ? trace_hardirqs_on+0x38/0xe0 > [ 2.051991] ? scsi_eh_get_sense+0x150/0x150 > [ 2.051991] ata_scsi_error+0x94/0xc0 > [ 2.051991] scsi_error_handler+0x8d/0x3a0 > [ 2.051991] ? _raw_spin_unlock_irqrestore+0x63/0x80 > [ 2.051991] ? scsi_eh_get_sense+0x150/0x150 > [ 2.051991] kthread+0xe3/0x110 > [ 2.051991] ? kthread_complete_and_exit+0x20/0x20 > [ 2.051991] ret_from_fork+0x22/0x30 > [ 2.051991] -- Damien Le Moal Western Digital Research