[dm-devel] can we fix some dm snapshot crashes please? :)

Zdenek Kabelac zkabelac at redhat.com
Fri May 7 12:31:45 UTC 2021


Dne 07. 05. 21 v 12:31 Michael Tokarev napsal(a):
> Hi!
> 
> I asked this 1.5 years ago, but go no replies.
> 
> The thing is that we have a few bugs in kernel in snapshot-related area
> for years, maybe for decades, and the bugs are still there and it is still
> trivial to crash the kernel is you're not very-very-very careful.
> 
> This might be due to user error ofcourse, but this still is definitely
> NOT a valid reason for the crashes.
> 
> For example, here it goes for snapshot-origin dm target. Just create
> a snapshot-origin and do some activity on it, it is a 2-line reproducer:
> 
>   # first create a test device: it can be anything
>   # here we use a 100-MB loop device
>   truncate --size=100M base
>   losetup /dev/loop0 base
>   # now create the snapshot-origin on it
>   sz=$(blockdev --getsize /dev/loop0)
>   dmsetup create base --table "0 $sz snapshot-origin /dev/loop0"
>   # and now the crash
>   mkfs.ext4 /dev/mapper/base
> 
> This crashes instantly. Different kernels crashed a bit differently,
> I tried even some 3.x kernels. But the result is the same - crash.
> 
> Here's an example from 5.10 kernel:

Hi


Yes reproducible - can you please open BZ report here:

https://bugzilla.redhat.com/enter_bug.cgi?product=LVM%20and%20device-mapper

I assume you are aware you are trying to using snapshot target in wrong way,
but it should not be crashing kernel.

Regards

Zdeneek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zkabelac.vcf
Type: text/x-vcard
Size: 4 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20210507/1e0dcbfb/attachment.vcf>


More information about the dm-devel mailing list