Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zio_decompress_data always ASSERTs successful decompression #9612

Closed
PaulZ-98 opened this issue Nov 22, 2019 · 3 comments · Fixed by #9630
Closed

zio_decompress_data always ASSERTs successful decompression #9612

PaulZ-98 opened this issue Nov 22, 2019 · 3 comments · Fixed by #9630
Assignees
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@PaulZ-98
Copy link
Contributor

Describe the problem you're observing

zdb_read_block with the 'd' flag tries all the compression algorithms and some are expected to fail. So the ASSERT is triggered by zdb_read_block when it shouldn't be.

Describe how to reproduce the problem

# zdb -R tank 0:2a856400:600:id
Found vdev: /root/file1
Trying 00600 -> 00800 (inherit)
ret == 0 (0x16 == 0)
ASSERT at ../../module/zfs/zio_compress.c:162:zio_decompress_data()
#

Create an interface which zdb can call to decompress the data and avoid the ASSERT.

@PaulZ-98 PaulZ-98 self-assigned this Nov 22, 2019
@PaulZ-98
Copy link
Contributor Author

PaulZ-98 commented Nov 22, 2019

The zdb_read_block decompression code should also:

  • obey a new :v verbose option to include the decompression guessing output
  • try the more common decompression algorithms first
  • accept pool:vdev_specifier:offset:[lsize/]psize[:flags] to place an upper limit on the sizes attempted

@PaulZ-98
Copy link
Contributor Author

For zdb_read_block, the :p "Do I/O to physical offset" flag is not used and should be removed from the code.

@behlendorf behlendorf added the Type: Defect Incorrect behavior (e.g. crash, hang) label Nov 22, 2019
@PaulZ-98
Copy link
Contributor Author

Also fix uninitialized variable dmu_objset_stats_t dds in dump_objset which results in random false positive for inconsistent dataset in zdb output.

PaulZ-98 added a commit to datto/zfs that referenced this issue Nov 26, 2019
This intereferes with zdb_read_block trying all the decompression
alogirithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Fixes openzfs#9612
PaulZ-98 added a commit to datto/zfs that referenced this issue Nov 26, 2019
This interferes with zdb_read_block trying all the decompression
algirithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Fixes openzfs#9612
PaulZ-98 added a commit to datto/zfs that referenced this issue Dec 2, 2019
This interferes with zdb_read_block trying all the decompression
algorithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Fixes openzfs#9612
PaulZ-98 added a commit to datto/zfs that referenced this issue Dec 9, 2019
This interferes with zdb_read_block trying all the decompression
algorithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Fixes openzfs#9612
PaulZ-98 added a commit to datto/zfs that referenced this issue Dec 10, 2019
This interferes with zdb_read_block trying all the decompression
algorithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Fixes openzfs#9612
behlendorf pushed a commit that referenced this issue Dec 10, 2019
This interferes with zdb_read_block trying all the decompression
algorithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes #9612 
Closes #9630
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Dec 26, 2019
This interferes with zdb_read_block trying all the decompression
algorithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes openzfs#9612
Closes openzfs#9630
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Dec 27, 2019
This interferes with zdb_read_block trying all the decompression
algorithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes openzfs#9612
Closes openzfs#9630
tonyhutter pushed a commit that referenced this issue Jan 23, 2020
This interferes with zdb_read_block trying all the decompression
algorithms when the 'd' flag is specified, as some are
expected to fail.  Also control the output when guessing
algorithms, try the more common compression types first, allow
specifying lsize/psize, and fix an uninitialized variable.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes #9612
Closes #9630
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants