linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* hungtask in dm code raised by concurrent run refresh and remove command
@ 2024-11-05 12:27 wangzhiqiang (Q)
  2024-11-05 21:15 ` Zdenek Kabelac
  0 siblings, 1 reply; 2+ messages in thread
From: wangzhiqiang (Q) @ 2024-11-05 12:27 UTC (permalink / raw)
  To: linux-lvm

Hi Team,
Here's a hungtask issue occurs in the dm-snapshot scenario,
reproduce by concurrent run vgchange --refresh and dmsetup -f remove vg-snap.

            vgchange                   dmsetup                dmsetup
     table_load (load snapshot)
                             table_load snapshot to error
                                    remove snapshot
     suspend origin/cow/real
table_load(snapshot already remove)
take type_lock and issue io to cow in snapshot_ctr
                                                      table_load (wait type_lock)

[root@localhost ~]# ps aux | grep D
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     1818066  0.0  0.0      0     0 ?        D    Nov04   0:03 [kworker/3:2+ksnaphd]
root     2972729  0.5  2.1  87256 73032 pts/1    D<L  20:17   0:00 vgchange --refresh vg
root     2972761  0.0  0.3  23464 10636 pts/1    D    20:17   0:00 dmsetup -f remove vg-snap

Snapshot has remove after suspend origin/cow/real during vgchange --refresh, and then load
snapshot will take type_lock and issue io to cow in snapshot_ctr, the io process by kworker
but cow has suspend lead to hungtask in kernel.

Does we have some way to fix it?
Thanks

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

end of thread, other threads:[~2024-11-05 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 12:27 hungtask in dm code raised by concurrent run refresh and remove command wangzhiqiang (Q)
2024-11-05 21:15 ` Zdenek Kabelac

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