linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "heming.zhao@suse.com" <heming.zhao@suse.com>
To: Zdenek Kabelac <zkabelac@redhat.com>
Cc: teigland@redhat.com, linux-lvm@redhat.com
Subject: Re: [linux-lvm] [PATCH] [PATCH] stable-2.02 - lvresize: deny operation on swap dev without force option
Date: Wed, 24 Mar 2021 19:02:55 +0800	[thread overview]
Message-ID: <463197f9-1d6c-30ac-7bb8-2ea7e1833d9d@suse.com> (raw)
In-Reply-To: <147078353.43143.1616576860174.JavaMail.zimbra@redhat.com>

On 3/24/21 5:07 PM, Zdenek Kabelac wrote:
> 
> 
> ----- Original Message -----
> From: "Zhao Heming" <heming.zhao@suse.com>
> To: linux-lvm@redhat.com, zkabelac@redhat.com, teigland@redhat.com
> Cc: "Zhao Heming" <heming.zhao@suse.com>
> Sent: Wednesday, March 24, 2021 6:09:09 AM
> Subject: [PATCH] [PATCH] stable-2.02 - lvresize: deny operation on swap dev without force option
> 
> When lvmetad is active on system and some memory pages of lvmetad
> swapout, user may issue lvextend/lvresize on swap LV. The resize
> operation will suspend & resume swap device (by reload dm table).
> After suspended swap device, lvmetad will be in UN status for waiting
> swapin pages from suspended swap dev. lvmetad will hung, then
> lvresize will fail to conection to lvmetad. then the resize operation
> will fail, lvresize leaves suspended swap, the logic dead lock is
> happending.
> 
>   
> Hi
> 
> It seems there is something wrong elsewhere.
> There should be no contact to lvmetad while ANY devices are in suspend state.
> Maybe something got reshuffled into wrong place.
> 
> Can you please provide  'lvextend -vvvvv'  when it hangs ?
> 

I can't show your "-vvvvv", the issue was reported from one suse customer.
the syslog shows machine was running lvextend at the start time of lvmetad UN.
the machine running lvm2 version is 2.02.120. some code may different with latest stable-2.02 branch.
the machine became no response and triggered coredump later.

> There should be no contact to lvmetad while ANY devices are in suspend state.

lvextend promise itself doesn't need to contact lvmetad. and if my understanding is correct,
critical_section_inc() is only process internal protection. if another lvm2 cmd calling
lvmetad when lvextend executing, the story will happen on my way.

(in my opinion) the flow:
1. lvmetad some page swapped out
2. lvextend was running, swap device was suspended successfully. (enter critical section)
3. lvmetad kept running (by whatever calling)
4. lvmetad need to swap in some pages but swap device suspended. lvmetad status become UN.
5. the lvextend resumed suspended swap device but failed.
    I guess lvmetad UN may trigger/block kernel dm layer failed to resume. I can't find log/info
    to show the reason of resume failed. From the coredump, lvmetad stacks show lvmetad in
    UN state, and swap status is suspended (dm dev with flags: DMF_BLOCK_IO_FOR_SUSPEND, DMF_SUSPENDED).

Thanks,
heming

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


      reply	other threads:[~2021-03-24 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  5:09 [linux-lvm] [PATCH] [PATCH] stable-2.02 - lvresize: deny operation on swap dev without force option Zhao Heming
2021-03-24  9:07 ` Zdenek Kabelac
2021-03-24 11:02   ` heming.zhao [this message]

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=463197f9-1d6c-30ac-7bb8-2ea7e1833d9d@suse.com \
    --to=heming.zhao@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=teigland@redhat.com \
    --cc=zkabelac@redhat.com \
    /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).