Repository navigation
Leave the racy ratelimit KUnit test out of the initramfs - #90
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A KUnit run of 7.2.8 X64 on server2 had three splats only in the rucc kernel log:
refcount_t: addition on 0; use-after-freeinkthread_stop, called fromtest_ratelimit_stressrefcount_t: underflow; use-after-freeat the same place__put_task_structthat follows from the two aboveThe cause is the test and not the compiler.
test_ratelimit_stresssetsdoneflag, which its threads stop on, and then callskthread_stopon each thread. A thread that sees the flag and exits beforekthread_stopgets to it frees its task, sokthread_stoptakes a reference on a freed task. The reference kernel can hit the same race, and it depends only on how the vCPUs are scheduled. Upstream fixes the test by making the threads wait forkthread_should_stop()(Jia He, "lib/tests: test_ratelimit: fix stress test thread lifecycle and leak", v3 on LKML in May 2026).The fragment cannot turn the test off, because
KUNIT_ALL_TESTS=mhides the prompt ofRATELIMIT_KUNIT_TEST. This change makesrk testleavelib/tests/test_ratelimit.koout of the initramfs for both kernels, as it already turns offKUNIT_FAULT_TESTfor both. The module only exists in 7.2.x.Tested on server2 with
cargo test -p rk testrun,cargo fmt --checkandcargo clippy.