[MP] Improve the stability for controllers and improve log clarity#2883
Merged
ApostaC merged 1 commit intoLMCache:devfrom Mar 27, 2026
Merged
[MP] Improve the stability for controllers and improve log clarity#2883ApostaC merged 1 commit intoLMCache:devfrom
ApostaC merged 1 commit intoLMCache:devfrom
Conversation
…rove the logs Signed-off-by: ApostaC <yihua98@uchicago.edu>
Contributor
There was a problem hiding this comment.
Code Review
This pull request improves error handling and observability across several modules, including the NIXL store adapter, prefetch and store controllers, and multiprocess server components. The changes primarily involve replacing standard error or warning logs with logger.exception to ensure stack traces are captured and wrapping critical processing loops in try...except blocks to prevent unhandled exceptions from crashing the background threads. I have no feedback to provide as no review comments were submitted.
jooho-XCENA
pushed a commit
to xcena-dev/LMCache
that referenced
this pull request
Apr 2, 2026
…MCache#2883) [add] better error handling in prefetch and store controller, and improve the logs Signed-off-by: ApostaC <yihua98@uchicago.edu>
jooho-XCENA
pushed a commit
to xcena-dev/LMCache
that referenced
this pull request
Apr 2, 2026
…MCache#2883) [add] better error handling in prefetch and store controller, and improve the logs Signed-off-by: ApostaC <yihua98@uchicago.edu>
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.
What this PR does / why we need it:
Improves MP mode resilience and debuggability:
Main loop protection: Wraps internal dispatch calls in
_prefetch_loop(PrefetchController) and_store_loop(StoreController) with try-except blocks so that an unexpected exception in one iteration does not crash the background thread.Stack trace logging: Switches
logger.error/logger.warningtologger.exceptionat exception catch sites inmultiprocess/anddistributed/so that full stack traces are logged instead of just the exception message. Also adds missing logging for the silentexcept Exceptioninnixl_store_l2_adapter.pystore path.Special notes for your reviewers:
The catch-all in the main loops intentionally uses bare
except Exception(not specific types) because the goal is to prevent any internal bug from killing the background thread. The exception is still logged with full traceback vialogger.exception.If applicable: