Bug 1727010

Summary: nbdkit replies with incorrect extents
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Richard W.M. Jones <rjones>
Component: nbdkitAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: knoel, mxie, mzhan, rjones, tzheng, xiaodwan, zili
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nbdkit-1.12.5-1.module+el8.1.0+3868+35f94834 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-06 07:17:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2019-07-04 09:03:59 UTC
Description of problem:

nbdkit in RHEL 8 produces an incorrect list of extents.
This is most easily observed by downloading and compiling
libnbd:

git clone https://github.com/libguestfs/libnbd
cd libnbd
autoreconf -i
./configure
make
make check

One test will fail:

../test-driver: line 107: 24114 Aborted                 (core dumped) "$@" > $log_file 2>&1
FAIL: meta-base-allocation

Looking at the tests/test-suite.log file:

extent: id=1, metacontext=base:allocation, offset=0, nr_entries=10, error=0
        0       length=0, status=0
        2       length=0, status=1
        4       length=0, status=3
        6       length=0, status=2
        8       length=0, status=0
lt-meta-base-allocation: meta-base-allocation.c:151: check_extent: Assertion `entries[0] == 8192' failed.

The length fields are all 0 which is incorrect.

Version-Release number of selected component (if applicable):

nbdkit-1.12.1-2.module+el8.0.1+3338+906ce030.x86_64

How reproducible:

100% as above.

Additional info:

This is fixed in nbdkit commit:
https://github.com/libguestfs/nbdkit/commit/80033669319dcc4c06292d5aa72694897b66aefa

Comment 4 Richard W.M. Jones 2019-08-22 08:07:38 UTC
This fix was already included in nbdkit 1.12 branch so we're good with
the current build.

Comment 6 liuzi 2019-08-27 03:44:30 UTC
Reproduce the bug with builds:
nbdkit-1.12.1-3.module+el8.0.1+3755+6782b0ed.x86_64

Steps:
1.Download libnbd source code from github
#git clone https://github.com/libguestfs/libnbd

2.After finishing download,execute compile command and check the result.
# autoreconf -i
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
[...]
config.status: executing depfiles commands
config.status: executing libtool commands

# ./configure 
checking for gcc... gcc
[...]
config.status: executing depfiles commands
config.status: executing libtool commands

# make
make  all-recursive
[...]
make[2]: Leaving directory '/home/libnbd/interop'
make[1]: Leaving directory '/home/libnbd'

# make check
Making check in generator
[...]
PASS: synch-parallel.sh
../test-driver: line 107: 21880 Aborted                 (core dumped) "$@" > $log_file 2>&1
FAIL: meta-base-allocation
PASS: closure-lifetimes
============================================================================
Testsuite summary for libnbd 0.9.9
============================================================================
# TOTAL: 37
# PASS:  34
# SKIP:  2
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
============================================================================
[...]

3.Check related info in the tests/test-suite.log
extent: id=1, metacontext=base:allocation, offset=0, nr_entries=10, error=0
	0	length=0, status=0
	2	length=0, status=1
	4	length=0, status=3
	6	length=0, status=2
	8	length=0, status=0

Result:As above.



Verify the bug with builds:
nbdkit-1.12.5-1.module+el8.1.0+3868+35f94834.x86_64

Steps:
1.Download libnbd source code from github
#git clone https://github.com/libguestfs/libnbd

2.After finishing download,execute compile command and check the result.
# autoreconf -i
# ./configure 
# make
# make check
[...]
PASS: meta-base-allocation
PASS: closure-lifetimes
============================================================================
Testsuite summary for libnbd 0.9.9
============================================================================
# TOTAL: 36
# PASS:  32
# SKIP:  4
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/tmp/libnbd/tests'
[...]

3.Check related info in the tests/test-suite.log
========================================
   libnbd 0.9.9: tests/test-suite.log
========================================

# TOTAL: 36
# PASS:  32
# SKIP:  4
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2
[...]

Result:No failure message printed during the compilation,so change bug from ON_QA to VERIFIED.

Comment 7 Richard W.M. Jones 2019-08-27 11:07:20 UTC
Yes, I agree with the verification steps above.

Comment 9 errata-xmlrpc 2019-11-06 07:17:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3723