arc: add a few invariant checks in release builds - #18840
Conversation
350c3c0 to
2afa094
Compare
|
|
@amotin, I'm not sure those asserts are checked in release builds, are they?
Thanks for that. Just to clarify, you mean this comment, right? Do you mean that when block free happens |
VERIFY() are built always. ASSERT() only in debug builds. But we can't assert everything production, that is why we have debug builds.
Yes and yes, but I haven't looked on the free path recently. |
|
Last couple of days I almost cracked my head staring at the code, chatting with different AIs and trying to figure out a possible scenario that could lead to the bug - no luck. But it was a good exercise to become familiar with the code! So yeah, converting a couple of ASSERTs to VERIFYs is the only thing we can do atm. |
Convert a couple ASSERTs invariants to VERIFYs to enforce them in release builds to be able to root-case openzfs#18782 kernel panic, whenever it happens again. Signed-off-by: Andriy Tkachuk <atkachuk@wasabi.com>
behlendorf
left a comment
There was a problem hiding this comment.
Yup, given how elusive this race has been promoting these checks to VERIFYs as a debugging change may result in some new evidence and insight.
Convert a couple ASSERTs invariants to VERIFYs to enforce them in release builds to be able to root-case #18782 kernel panic, whenever it happens again. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Andriy Tkachuk <atkachuk@wasabi.com> Closes #18840 (cherry picked from commit 023d44b)
Motivation and Context
There are these very-hard-to-reproduce kernel panics #18782 and #11338, so it would be nice to root-case them.
Description
Convert a couple ASSERTs invariants to VERIFYs to enforce them in release builds. They should help to understand the cause of the problem, whenever it happens again.
How Has This Been Tested?
CI tests here would be enough I guess.
Types of Changes
Checklist
Signed-off-by.