fix(testing): recover from lock poisoning in memoized! macro to preve… - #5846
Open
rohanranjan0902 wants to merge 2 commits into
Open
rohanranjan0902 wants to merge 2 commits into
rohanranjan0902 wants to merge 2 commits into
Conversation
Collaborator
|
Hi @rohanranjan0902, can you re-author these commits in a way that is linked to your github user, so that the CLA check can run properly? We don't merge community PRs without a signed CLA. |
Collaborator
|
Also, I would not say it's accurate to say that this fixes any CI flakes, since the nature of this error is that it only happens when there has already been a previous failure. |
…lockworklabs#5841) When a previous test panics while compiling a module, the cache Mutex becomes poisoned. This replaces .unwrap() with .unwrap_or_else() to recover the lock, ensuring subsequent tests surface their actual underlying errors rather than failing with a cascade of generic PoisonErrors.
rohanranjan0902
force-pushed
the
fix-ci-flake-poison-error
branch
from
September 19, 2026 09:36
99cc590 to
30242f4
Compare
Author
|
Hi @bfops , thanks for the review! I've made the updates you requested:
Let me know if there's anything else you need before this is ready to merge! |
bfops
enabled auto-merge
September 21, 2026 19:23
bfops
approved these changes
Sep 21, 2026
bfops
left a comment
Collaborator
There was a problem hiding this comment.
Seems good to me! Thank you!
Collaborator
|
@rohanranjan0902 are you able to make these verified commits? If not I can have our bot re-author them. |
This branch has not been deployed
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.
This PR allows the test harness to gracefully recover from lock poisoning (Issue #5841).
Previously, if a test panicked while compiling a module inside the memoized! macro, it would poison the Mutex holding the MEMOIZED compilation cache. Any subsequent tests attempting to access the cache would panic with a PoisonError, causing unrelated tests to fail and masking the original error.
This replaces .lock().unwrap() with .lock().unwrap_or_else(|e| e.into_inner()) on the cache mutex. This safely recovers the lock after a panic, allowing unrelated tests to continue compiling and running their own modules instead of failing in cascade.
Rollback safety impact
n/a