All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Martin Wilck <mwilck@suse.com>,
	Zdenek Kabelac <zkabelac@redhat.com>,
	David Teigland <teigland@redhat.com>,
	Peter Rajnoha <prajnoha@redhat.com>
Cc: dm-devel@redhat.com, Heming Zhao <heming.zhao@suse.com>,
	Franck Bui <fbui@suse.de>,
	lvm-devel@redhat.com
Subject: Re: [dm-devel] [PATCH] udev: create symlinks and watch even in suspended state
Date: Fri, 28 Jan 2022 18:47:15 +0100	[thread overview]
Message-ID: <e85bd660-0c50-df5d-35de-2fd5b16cc47f@gmail.com> (raw)
In-Reply-To: <d0d0d8f39257bcddf480524f01faae1f15ac2c42.camel@suse.com>

Dne 28. 01. 22 v 17:02 Martin Wilck napsal(a):
> On Fri, 2022-01-28 at 16:57 +0100, Martin Wilck wrote:
>>
>> It's a race condition. It probably happens while multipathd is
>> reloading a map (*), suspending it during the table reload. The
>> device
>> will be resumed a few fractions of a second later (so yes, it's
>> "quick"), but then it's too late
> 
> More precisely: The suspend state itself may actually not last longer
> than a few ms. But once the symlink is bent to point to the wrong
> device, it will remain so, until the CHANGE event following the device
> resume is successfully processed by udev, which may happen
> substantially later. And it's that longer time span which matters for
> systemd's mount attempt (or LVM device activation, for that matter).
> 
>


This looks like you are trying to mask-out different synchronization bug.

Also it's worth to note - using symlinks is somewhat doomed on its own.

So you only solve a very minor subcase where you manage to 'hit' your race
just in a moment where you device is suspend and you actually 'scan' state of 
device.

But what happen - if device would happen to be already resumed ?
It looks like there is some race in udev rules processing - just somewhere else.

I think Peter could more enlighten the lvm2 logic - but it seems there is 
possibly missing similar logic on multipath side in the moment when devices 
are created ?

There should be no race when switching from ramdisk to rootfs.

Regards

Zdenek

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


WARNING: multiple messages have this Message-ID (diff)
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: lvm-devel@redhat.com
Subject: [PATCH] udev: create symlinks and watch even in suspended state
Date: Fri, 28 Jan 2022 18:47:15 +0100	[thread overview]
Message-ID: <e85bd660-0c50-df5d-35de-2fd5b16cc47f@gmail.com> (raw)
In-Reply-To: <d0d0d8f39257bcddf480524f01faae1f15ac2c42.camel@suse.com>

Dne 28. 01. 22 v 17:02 Martin Wilck napsal(a):
> On Fri, 2022-01-28 at 16:57 +0100, Martin Wilck wrote:
>>
>> It's a race condition. It probably happens while multipathd is
>> reloading a map (*), suspending it during the table reload. The
>> device
>> will be resumed a few fractions of a second later (so yes, it's
>> "quick"), but then it's too late
> 
> More precisely: The suspend state itself may actually not last longer
> than a few ms. But once the symlink is bent to point to the wrong
> device, it will remain so, until the CHANGE event following the device
> resume is successfully processed by udev, which may happen
> substantially later. And it's that longer time span which matters for
> systemd's mount attempt (or LVM device activation, for that matter).
> 
>


This looks like you are trying to mask-out different synchronization bug.

Also it's worth to note - using symlinks is somewhat doomed on its own.

So you only solve a very minor subcase where you manage to 'hit' your race
just in a moment where you device is suspend and you actually 'scan' state of 
device.

But what happen - if device would happen to be already resumed ?
It looks like there is some race in udev rules processing - just somewhere else.

I think Peter could more enlighten the lvm2 logic - but it seems there is 
possibly missing similar logic on multipath side in the moment when devices 
are created ?

There should be no race when switching from ramdisk to rootfs.

Regards

Zdenek



  reply	other threads:[~2022-01-28 17:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 13:42 [dm-devel] [PATCH] udev: create symlinks and watch even in suspended state mwilck
2022-01-28 13:42 ` mwilck
2022-01-28 15:33 ` [dm-devel] " Zdenek Kabelac
2022-01-28 15:33   ` Zdenek Kabelac
2022-01-28 15:57   ` [dm-devel] " Martin Wilck
2022-01-28 15:57     ` Martin Wilck
2022-01-28 16:02     ` [dm-devel] " Martin Wilck
2022-01-28 16:02       ` Martin Wilck
2022-01-28 17:47       ` Zdenek Kabelac [this message]
2022-01-28 17:47         ` Zdenek Kabelac
2022-01-28 18:46         ` [dm-devel] " Martin Wilck
2022-01-28 18:46           ` Martin Wilck
2022-01-28 21:06           ` [dm-devel] " Zdenek Kabelac
2022-01-28 21:06             ` Zdenek Kabelac
2022-01-28 23:21             ` [dm-devel] " Martin Wilck
2022-01-28 23:21               ` Martin Wilck
2022-01-29 20:05               ` [dm-devel] " Zdenek Kabelac
2022-01-29 20:05                 ` Zdenek Kabelac
2022-01-29 20:46                 ` [dm-devel] " Martin Wilck
2022-01-29 20:46                   ` Martin Wilck
2022-01-31 13:33                   ` [dm-devel] " Peter Rajnoha
2022-01-31 13:33                     ` Peter Rajnoha
2022-02-01  8:40                     ` [dm-devel] " Martin Wilck
2022-02-01  8:40                       ` Martin Wilck
2022-02-01 10:11                       ` [dm-devel] " Zdenek Kabelac
2022-02-01 10:11                         ` Zdenek Kabelac
2022-02-01 10:55                         ` [dm-devel] " Martin Wilck
2022-02-01 10:55                           ` Martin Wilck
2022-02-01 10:55                       ` [dm-devel] " Peter Rajnoha
2022-02-01 10:55                         ` Peter Rajnoha
2022-02-01 11:11                         ` [dm-devel] " Martin Wilck
2022-02-01 11:11                           ` Martin Wilck

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=e85bd660-0c50-df5d-35de-2fd5b16cc47f@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=fbui@suse.de \
    --cc=heming.zhao@suse.com \
    --cc=lvm-devel@redhat.com \
    --cc=mwilck@suse.com \
    --cc=prajnoha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.