linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Jaco Kroon <jaco@uls.co.za>, linux-lvm@lists.linux.dev
Subject: Re: lvm2 deadlock
Date: Fri, 31 May 2024 14:34:01 +0200	[thread overview]
Message-ID: <a6c24173-d138-49dc-afb0-f48d41128477@gmail.com> (raw)
In-Reply-To: <c828486f-46d1-45b6-8477-ed390553f4dd@uls.co.za>

Dne 30. 05. 24 v 12:21 Jaco Kroon napsal(a):
> Hi,
> 
> Possible lvm2 command deadlock scenario:
> 
> crowsnest [12:15:47] /run/lvm # fuser //run/lock/lvm/*
> /run/lock/lvm/P_global: 17231
> /run/lock/lvm/V_lvm: 16087 17231
> 
> crowsnest [12:15:54] /run/lvm # ps axf | grep -E '16087|17231'
> 24437 pts/1    S+     0:00  |       \_ grep --colour=auto -E 16087|17231
> 16087 ?        S      0:00  |       |       \_ /sbin/lvcreate -kn -An -s -n 
> fsck_cerberus /dev/lvm/backup_cerberus
> 17231 ?        S      0:00  |           \_ /sbin/lvs --noheadings --nameprefixes
> 
> crowsnest [12:17:40] /run/lvm # dmsetup udevcookies
> Cookie       Semid      Value      Last semop time           Last change time
> 0xd4d2051    10         1          Thu May 30 02:34:05 2024  Thu May 30 
> 02:32:22 2024
> 
> This was almost 10 hours ago.
> 
> crowsnest [12:17:44] /run/lvm # dmsetup udevcomplete 0xd4d2051
> DM_COOKIE_COMPLETED=0xd4d2051
> crowsnest [12:18:43] /run/lvm # ps axf | grep -E '16087|17231'
> 27252 pts/1    S+     0:00  |       \_ grep --colour=auto -E 16087|17231
> crowsnest [12:18:45] /run/lvm #
> 
> Allows progress again.

Hi

I'm kind of missing here to see your 'deadlock' scenario from this description.

Lvm2 takes the VG lock - creates LV - waits for udev till it's finished with 
its job and confirms all the udev work with dmsetup udevcomplete.

If something 'kills'  your udev worker  (which may eventually happen on some 
'very very very' busy system - you may need to set up longer timeout for 
systemd to kill udev worker (I believe it's just 30seconds by default).

If it happens your cookies blocks your lvm2 command - you can 'unblock' them 
with  'dmsetup udevcomplete_all'  -  but that's a sign your system is already 
in very bad state.

It's also unclear which OS are you using - Debian, Fedora, ???
Version of your packages ?

Regards

Zdenek


  reply	other threads:[~2024-05-31 12:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 10:21 lvm2 deadlock Jaco Kroon
2024-05-31 12:34 ` Zdenek Kabelac [this message]
2024-06-03 12:56   ` Jaco Kroon
2024-06-03 19:25     ` Zdenek Kabelac
2024-06-04  8:46       ` Jaco Kroon
2024-06-04 10:48         ` Roger Heflin
2024-06-04 11:52           ` Jaco Kroon
2024-06-04 13:30             ` Roger Heflin
2024-06-04 13:46               ` Stuart D Gathman
2024-06-04 14:49                 ` Jaco Kroon
2024-06-04 15:03                   ` Roger Heflin
2024-06-04 14:07               ` Jaco Kroon
2024-06-04 16:07             ` Zdenek Kabelac
2024-06-05  8:59               ` Jaco Kroon
2024-06-06 22:14                 ` Zdenek Kabelac
2024-06-06 22:17                   ` Zdenek Kabelac
2024-06-07  9:03                     ` Jaco Kroon
2024-06-07  9:26                       ` Zdenek Kabelac
2024-06-07  9:36                         ` Jaco Kroon
2024-09-02  5:48                           ` Unsubscribe box, listen

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=a6c24173-d138-49dc-afb0-f48d41128477@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=jaco@uls.co.za \
    --cc=linux-lvm@lists.linux.dev \
    /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).