-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix panic on debug build #8736
fix panic on debug build #8736
Conversation
Signed-off-by: Igor Kozhukhov <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #8736 +/- ##
==========================================
- Coverage 78.97% 78.92% -0.06%
==========================================
Files 381 381
Lines 117797 117802 +5
==========================================
- Hits 93034 92978 -56
- Misses 24763 24824 +61
Continue to review full report at Codecov.
|
} | ||
|
||
/* | ||
* There were no decompressed bufs, so there should not be a | ||
* checksum on the hdr either. | ||
*/ | ||
EQUIV(!copied, hdr->b_l1hdr.b_freeze_cksum == NULL); | ||
if (cnt > 0) | ||
EQUIV(!copied, b_freeze_cksum == NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ikozhukhov given that b_l1hdr.b_freeze_cksum
can only be set when ZFS_DEBUG_MODIFY
is enabled (see arc_cksum_compute()
. I think this EQUIV
is only valid when ZFS_DEBUG_MODIFY
is set, and we should instead wrap it with a conditional that checks for the flag. For the same reason, the ASSERT
after the call to arc_buf_try_copy_decompressed_data()
in arc_buf_fill()
looks wrong to me as well.
My suspicion is we've never seen this in testing because by default for debug builds we enable ZFS_DEBUG_MODIFY
. It would be great to get @grwilson's thoughts on this, since I may be misunderstanding the intent of b_freeze_cksum
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, b_freeze_cksum
should only have data when ZFS_DEBUG_MODIFY
is enabled. So if I understand the original problem then wrapping the EQUIV
with if (zfs_flags & ZFS_DEBUG_MODIFY)
would fix the problem.
i have panic on DEBUG build on DilOS with test
send_mixed_raw
Motivation and Context
Description
based on research and comments, we should to check b_freeze_cksum in loop
How Has This Been Tested?
test
send_mixed_raw
PASS after changesTypes of changes
Checklist:
Signed-off-by
.