Project

General

Profile

Actions

Bug #45986

closed

importing rbd diff does not apply zero sequences correctly

Added by Nikola Ciprich almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Jason Dillaman
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
nautilus,octopus
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
rbd
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

while investigating problems with incorrect backup checkums, we've discovered there's probably bug in rbd import command. When applying second rbd diff containing sequences of zeros, those seem not to be correctly applied, and areas which should be zeroed still contain data..

I'm attaching test data.

steps to reproduce:

  1. create new image and import diffs
    rbd create sata/test-export-import --size 100M
    rbd import-diff --no-progress export-first.diff sata/test-export-import
    rbd import-diff --no-progress export-second.diff sata/test-export-import
  1. export raw content of second snapshot
    rbd export --export-format 1 --no-progress sata/test-export-import@second export-second-raw.txt
  1. show structure of second diff
    python diff-parser.py export-second.diff

    banner: rbd diff v1
    export_format: 1
    from: first
    snap: second
    size: 104857600
    zero: offset: 230419, length: 12149
    zero: offset: 8379678, length: 8930
    data: offset: 8388608, length: 4194304
    data: offset: 12582912, length: 457699
    data: offset: 19155848, length: 1815672
    data: offset: 20971520, length: 4194304
    zero: offset: 25165824, length: 952115
    data: offset: 26561985, length: 2798143
    data: offset: 29360128, length: 4194304
    data: offset: 33554432, length: 2919371
    zero: offset: 40799568, length: 1143472
    zero: offset: 41943040, length: 565422
    data: offset: 43129817, length: 202932
    data: offset: 43575935, length: 1220628
    zero: offset: 45694610, length: 442734
    data: offset: 46137344, length: 4194304
    data: offset: 50331648, length: 2169674
    end
    eof

  1. expected area of zeros !!!
    hexdump -s 230419 -n 80 export-second-raw.txt

    0038413 6f6f 6f66 666f 6f6f 6f66 666f 6f6f 6f66
    0038423 666f 6f6f 6f66 666f 6f6f 6f66 666f 6f6f
    0038433 6f66 666f 6f6f 6f66 666f 6f6f 6f66 666f
    0038443 6f6f 6f66 666f 6f6f 6f66 666f 6f6f 6f66
    0038453 666f 6f6f 6f66 666f 6f6f 6f66 666f 6f6f

  1. expected area of zeros !!!
    hexdump -s 8379678 -n 80 export-second-raw.txt

    07fdd1e 6f66 666f 6f6f 6f66 666f 6f6f 6f66 666f
    07fdd2e 6f6f 6f66 666f 6f6f 6f66 666f 6f6f 6f66
    07fdd3e 666f 6f6f 6f66 666f 6f6f 6f66 666f 6f6f
    07fdd4e 6f66 666f 6f6f 6f66 666f 6f6f 6f66 666f
    07fdd5e 6f6f 6f66 666f 6f6f 6f66 666f 6f6f 6f66

  1. this part of dump is correct
    hexdump -s 25165824 -n 80 export-second-raw.txt

    1800000 0000 0000 0000 0000 0000 0000 0000 0000 *
    1800050

  1. expected area of zeros !!!
    hexdump -s 40799568 -n 80 export-second-raw.txt

    26e8d50 6f66 666f 6f6f 6f66 666f 6f6f 6f66 666f
    26e8d60 6f6f 6f66 666f 6f6f 6f66 666f 6f6f 6f66
    26e8d70 666f 6f6f 6f66 666f 6f6f 6f66 666f 6f6f
    26e8d80 6f66 666f 6f6f 6f66 666f 6f6f 6f66 666f
    26e8d90 6f6f 6f66 666f 6f6f 6f66 666f 6f6f 6f66

  1. this part of dump is correct
    hexdump -s 41943040 -n 80 export-second-raw.txt

    2800000 0000 0000 0000 0000 0000 0000 0000 0000 *
    2800050

  1. expected area of zeros !!!
    hexdump -s 45694610 -n 80 export-second-raw.txt

    2b93e92 666f 6f6f 6f66 666f 6f6f 6f66 666f 6f6f
    2b93ea2 6f66 666f 6f6f 6f66 666f 6f6f 6f66 666f
    2b93eb2 6f6f 6f66 666f 6f6f 6f66 666f 6f6f 6f66
    2b93ec2 666f 6f6f 6f66 666f 6f6f 6f66 666f 6f6f
    2b93ed2 6f66 666f 6f6f 6f66 666f 6f6f 6f66 666f

we've confirmed this issue on all latest versions (13, 14, 15).


Files

ceph-import-diff-issue-reproducer.tar.gz (132 KB) ceph-import-diff-issue-reproducer.tar.gz Nikola Ciprich, 06/12/2020 07:43 AM
rbd.log.gz (8.34 KB) rbd.log.gz Nikola Ciprich, 06/18/2020 05:53 AM

Related issues 2 (0 open2 closed)

Copied to rbd - Backport #46673: nautilus: importing rbd diff does not apply zero sequences correctlyResolvedJason DillamanActions
Copied to rbd - Backport #46674: octopus: importing rbd diff does not apply zero sequences correctlyResolvedJason DillamanActions
Actions

Also available in: Atom PDF