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

When encountering EZFS_UNKNOWN, print the error text buffer anyway #10632

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

allanjude
Copy link
Contributor

Signed-off-by: Allan Jude allan@klarasystems.com

Motivation and Context

While working on #10631 the error message was simply: "internal error: Invalid argument"
When analyzing the core dump, there was a useful error message string, but it was not displayed.

Description

Rather than just saying there was an internal error, provide any context we might have to the user to help them understand the issue.

How Has This Been Tested?

Prior to the #10631 fix that avoided the call to abort(), this is how I displayed the error message.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jul 28, 2020
@codecov
Copy link

codecov bot commented Jul 28, 2020

Codecov Report

Merging #10632 into master will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10632      +/-   ##
==========================================
- Coverage   79.64%   79.50%   -0.15%     
==========================================
  Files         394      394              
  Lines      124645   124645              
==========================================
- Hits        99278    99102     -176     
- Misses      25367    25543     +176     
Flag Coverage Δ
#kernel 80.17% <ø> (+<0.01%) ⬆️
#user 64.54% <ø> (-1.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/libzfs/libzfs_util.c 73.01% <ø> (ø)
module/zcommon/zfs_fletcher.c 68.09% <0.00%> (-10.20%) ⬇️
module/lua/lmem.c 83.33% <0.00%> (-4.17%) ⬇️
cmd/ztest/ztest.c 75.11% <0.00%> (-3.93%) ⬇️
lib/libzpool/kernel.c 64.53% <0.00%> (-2.98%) ⬇️
module/zcommon/zfs_fletcher_superscalar.c 97.05% <0.00%> (-2.95%) ⬇️
module/zfs/dsl_synctask.c 92.40% <0.00%> (-2.54%) ⬇️
module/zfs/vdev_removal.c 94.62% <0.00%> (-2.29%) ⬇️
module/zfs/vdev_indirect.c 72.66% <0.00%> (-2.00%) ⬇️
lib/libzfs/libzfs_changelist.c 84.26% <0.00%> (-1.88%) ⬇️
... and 62 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02fced3...2b9fa43. Read the comment docs.

lib/libzfs/libzfs_util.c Outdated Show resolved Hide resolved
Rather than just saying there was an internal error, provide any
context we might have to the user to help them understand the issue.

Signed-off-by: Allan Jude <allan@klarasystems.com>
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jul 30, 2020
@behlendorf behlendorf merged commit 24f98ed into openzfs:master Jul 31, 2020
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Rather than just saying there was an internal error, provide any
context we might have to the user to help them understand the issue.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes openzfs#10632
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
Rather than just saying there was an internal error, provide any
context we might have to the user to help them understand the issue.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes openzfs#10632
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants