linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [REPORT] libata deadlock possibilities by DEPT
@ 2022-02-16  4:12 Byungchul Park
  2022-02-16  4:16 ` Report 2 in ata_scsi_port_error_handler() Byungchul Park
  2022-02-16  6:52 ` [REPORT] libata deadlock possibilities by DEPT Byungchul Park
  0 siblings, 2 replies; 10+ messages in thread
From: Byungchul Park @ 2022-02-16  4:12 UTC (permalink / raw)
  To: damien.lemoal, linux-ide
  Cc: torvalds, mingo, linux-kernel, peterz, will, tglx, rostedt, joel,
	sashal, daniel.vetter, chris, duyuyang, johannes.berg, tj, tytso,
	willy, david, amir73il, bfields, gregkh, kernel-team, linux-mm,
	akpm, mhocko, minchan, hannes, vdavydov.dev, sj, jglisse, dennis,
	cl, penberg, rientjes, vbabka, ngupta, linux-block, axboe,
	paolo.valente, josef, linux-fsdevel, viro, jack, jlayton,
	dan.j.williams, hch, djwong, dri-devel, airlied,
	rodrigosiqueiramelo, melissa.srw, hamohammed.sa

Hi Damien and libata folks,

I've been developing a tool for detecting deadlock possibilities by
tracking wait/event rather than lock(?) acquisition order to try to
cover all synchonization machanisms. It's done on v5.17-rc1 tag.

https://github.com/lgebyungchulpark/linux-dept/commits/dept1.11_on_v5.17-rc1

Benifit:

	0. Works with all lock primitives.
	1. Works with wait_for_completion()/complete().
	2. Works with 'wait' on PG_locked.
	3. Works with 'wait' on PG_writeback.
	4. Works with swait/wakeup.
	5. Works with waitqueue.
	6. Multiple reports are allowed.
	7. Deduplication control on multiple reports.
	8. Withstand false positives thanks to 6.
	9. Easy to tag any wait/event.

Future work:

	0. To make it more stable.
	1. To separates Dept from Lockdep.
	2. To improves performance in terms of time and space.
	3. To use Dept as a dependency engine for Lockdep.
	4. To add any missing tags of wait/event in the kernel.
	5. To deduplicate stack trace.

I've got several reports from the tool. Some of them look like false
alarms caused by Lockdep's fake annotations added for better detection.
However, some others look like real deadlock possibility. Because of my
unfamiliarity of the domain, it's hard to confirm if it's a real one.
I'd like to ask for your opinion on it and it'd be appreciated.

How to interpret the report is:

	1. E(event) in each context cannot be triggered because of the
	   W(wait) that cannot be woken.
	2. The stack trace helping find the problematic code is located
	   in each conext's detail.

Let me add the reports on this email thread.

---
Thanks,
Byungchul


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-02-17 23:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).