BTRFS: Testing restore of file compressed with lzo falied

Bug #1559836 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
btrfs-tools (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Problem Description
===================================
Using xfstests, testing btrfs/041 testcase which does btrfs-restore operation .

Analysis : This testcase create extents, write data to it, compress it then restore.But it is failing with lzo compression.

root@powerkvm5:~/xfstests# ./check btrfs/041
FSTYP -- btrfs
PLATFORM -- Linux/ppc64le powerkvm5 4.4.0-13-generic
MKFS_OPTIONS -- /dev/sdg2
MOUNT_OPTIONS -- /dev/sdg2 /mnt/scratch

btrfs/041 [failed, exit status 1] - output mismatch (see /root/xfstests/results//btrfs/041.out.bad)
    --- tests/btrfs/041.out 2016-03-15 01:28:12.782520209 -0500
    +++ /root/xfstests/results//btrfs/041.out.bad 2016-03-18 02:47:17.598581773 -0500
    @@ -11,30 +11,5 @@
     wrote 100/100 bytes at offset 99000
     XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
     67edd038aaa42adb5a1aa78f2eb1d2b6 SCRATCH_MNT/foo
    -67edd038aaa42adb5a1aa78f2eb1d2b6
    -Testing restore of file compressed with zlib
    -wrote 100000/100000 bytes at offset 0
    -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
    ...
    (Run 'diff -u tests/btrfs/041.out /root/xfstests/results//btrfs/041.out.bad' to see the entire diff)
Ran: btrfs/041
Failures: btrfs/041
Failed 1 of 1 tests

System : powerkvm5, Bare metal
OS : Ubuntu 16.04
Version : 4.4.0-13-generic

root@powerkvm5:~/xfstests# cat /root/xfstests/results//btrfs/041.out.bad
QA output created by 041
Testing restore of file compressed with lzo
wrote 100000/100000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 100000/100000 bytes at offset 100000
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 2/2 bytes at offset 10000
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 11/11 bytes at offset 33000
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 100/100 bytes at offset 99000
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
67edd038aaa42adb5a1aa78f2eb1d2b6 SCRATCH_MNT/foo
failed: '/bin/btrfs restore /dev/sdg2 /mnt/test/btrfs-test-041'
(see /root/xfstests/results//btrfs/041.full for details)
root@powerkvm5:~/xfstests# vi tests/btrfs/041
root@powerkvm5:~/xfstests# uname -a
Linux powerkvm5 4.4.0-13-generic #29-Ubuntu SMP Fri Mar 11 19:30:44 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux

Steps to reproduce :
======================================
1. Install xfstests.
2. Create 5 file images of 10gb each, using dd command
3. Create loop devices using above images
4. Create btrfs fs on these loop devices
5. test setup:
1. suites has already built with 2 directories : xfsprogs & xfstests
2. create /mnt/test and /mnt/scratch directories
3. cd xfstests and edit local.config file
sample file for btrfs test :

export TEST_DEV=/dev/loop0
export TEST_DIR=/mnt/test
export SCRATCH_DEV_POOL="/dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4"
export SCRATCH_MNT=/mnt/scratch

6. create fsgqa user : 'useradd fsgqa'
7. ./check btrfs/041

== Comment: #2 - Chandan B. Rajendra <email address hidden> - 2016-03-18 09:07:07 ==
The issue was recently fixed by Fiona. Please refer to the commit b025392ffca98b3a74947cf8f772535cf8bfceb3 in the git repository available at git://repo.or.cz/btrfs-progs-unstable/devel.git.

b025392ffca98b3a74947cf8f772535cf8bfceb3
Author: Feifei Xu <email address hidden>
AuthorDate: Thu Mar 10 16:43:20 2016 +0800
Commit: David Sterba <email address hidden>
CommitDate: Mon Mar 14 13:42:47 2016 +0100

btrfs-progs: Replace hardcoded PAGE_CACHE_SIZE with sectorsize.

PAGE_CACHE_SIZE is hardcoded to 4K in cmds-restore.c. Correct
value should be sector size. Fix this through replacing
hardcoded 4K to sectorsize.

Signed-off-by: Feifei Xu <email address hidden>
Signed-off-by: David Sterba <email address hidden>

We should mirror this bug to Canonical and request them to apply the commit to their btrfs-progs package.

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-139295 severity-high targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
vaishnavi (vaishnavi)
affects: ubuntu → btrfs (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

Accepting this as a medium-priority bug for Ubuntu. We do not use btrfs as the default filesystem in Ubuntu for reasons far beyond a single backup/restore test failure; we do not commit to fixing this bug for 16.04 release.

affects: btrfs (Ubuntu) → btrfs-tools (Ubuntu)
Changed in btrfs-tools (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
bugproxy (bugproxy)
tags: added: targetmilestone-inin16041
removed: targetmilestone-inin---
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-07-07 02:40 EDT-------
== comment from Pavithra ==
Hi,

Issue could be reproduced in 16.04.01 build.

ubuntu@tuleta4u-lp14:~$ uname -a
Linux tuleta4u-lp14 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:25:36 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux

Log
===
root@tuleta4u-lp14:/home/ubuntu/xfstests# ./check btrfs/041
FSTYP -- btrfs
PLATFORM -- Linux/ppc64le tuleta4u-lp14 4.4.0-24-generic
MKFS_OPTIONS -- /dev/loop1
MOUNT_OPTIONS -- /dev/loop1 /mnt/scratch

btrfs/041 [failed, exit status 1] - output mismatch (see /home/ubuntu/xfstests/results//btrfs/041.out.bad)
--- tests/btrfs/041.out 2016-06-15 07:26:04.347320804 -0400
+++ /home/ubuntu/xfstests/results//btrfs/041.out.bad 2016-06-15 08:00:41.948122839 -0400
@@ -11,30 +11,5 @@
wrote 100/100 bytes at offset 99000
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
67edd038aaa42adb5a1aa78f2eb1d2b6 SCRATCH_MNT/foo
-67edd038aaa42adb5a1aa78f2eb1d2b6
-Testing restore of file compressed with zlib
-wrote 100000/100000 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
...
(Run 'diff -u tests/btrfs/041.out /home/ubuntu/xfstests/results//btrfs/041.out.bad' to see the entire diff)
Ran: btrfs/041
Failures: btrfs/041
Failed 1 of 1 tests

Thanks,
Pavithra

Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Taco-screen-team still assigned, although as per comment #1, the bug has been screened, assessed and triaged.

Changed in btrfs-tools (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → nobody
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-02-17 04:36 EDT-------
Hi Canonical,

Can you please include the commit b025392ffca98b3a74947cf8f772535cf8bfceb3 that fixes this issue ?

Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.