-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Fix shutdown blocked client not being properly reset after shutdown cancellation #14420
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
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
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.
Pull Request Overview
This PR fixes an issue where clients blocked during shutdown operations were not being properly reset after shutdown cancellation, preventing them from handling subsequent commands normally.
- Moved client reset logic from
unblockClienttoprocessUnblockedClientsto handle all unblocked clients consistently - Added client duration reset for shutdown-blocked clients to ensure proper state cleanup
- Added integration test to verify clients can handle commands normally after shutdown cancellation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/blocked.c | Relocated client reset logic and added duration reset for shutdown-blocked clients |
| tests/integration/shutdown.tcl | Added test case to verify client functionality after shutdown cancellation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
CI with smoking test commit: https://github.com/sundb/redis/actions/runs/18363002628 crash report |
|
@oranagra i fixed another issue in the commit eca9db7 reproduce steps:
So when the client has CLIENT_UNBLOCKED, we should also skip the command parsing. crash report BTW, VK also skip parsing in this case. |
This issue was introduced by #10440
In that PR, we avoided resetting the current user during processCommand, but overlooked the fact that this client might not be the current one, it could be a client that was previously blocked due to shutdown.
If we don’t reset these clients, and the shutdown is canceled, then when these clients continue executing other commands, they will trigger an assertion.
This PR delays the operation of resetting the client to processUnblockedClients and no longer skips SHUTDOWN_BLOCKED clients.