linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Byungchul Park <byungchul.park@lge.com>, 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
Subject: Re: Report in ata_scsi_port_error_handler()
Date: Wed, 16 Feb 2022 15:37:20 +0900	[thread overview]
Message-ID: <94b1cba2-0e78-bbc0-0321-8be70b2b3be2@opensource.wdc.com> (raw)
In-Reply-To: <1644984964-28300-3-git-send-email-byungchul.park@lge.com>

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] [<ffffffff8178d355>] 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] [<ffffffff810baa53>] __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] [<ffffffff8178047c>] 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] [<ffffffff810bb017>] 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] [<ffffffff8178046e>] 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]  <TASK>
> [    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]  </TASK>


-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2022-02-16  6:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16  4:12 [REPORT] libata deadlock possibilities by DEPT Byungchul Park
2022-02-16  4:16 ` Report 2 in ata_scsi_port_error_handler() Byungchul Park
2022-02-16  4:16   ` Report 3 " Byungchul Park
2022-02-16  4:16   ` Report " Byungchul Park
2022-02-16  6:37     ` Damien Le Moal [this message]
2022-02-16 18:09       ` Linus Torvalds
2022-02-16 18:33         ` Steven Rostedt
2022-02-17 23:55           ` Byungchul Park
2022-02-17 10:35         ` Byungchul Park
2022-02-16  6:52 ` [REPORT] libata deadlock possibilities by DEPT Byungchul Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94b1cba2-0e78-bbc0-0321-8be70b2b3be2@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=amir73il@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bfields@fieldses.org \
    --cc=byungchul.park@lge.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=cl@linux.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=david@fromorbit.com \
    --cc=dennis@kernel.org \
    --cc=djwong@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=duyuyang@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=johannes.berg@intel.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@lge.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=melissa.srw@gmail.com \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=ngupta@vflare.org \
    --cc=paolo.valente@linaro.org \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rientjes@google.com \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=sashal@kernel.org \
    --cc=sj@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=vbabka@suse.cz \
    --cc=vdavydov.dev@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).