Skip to content

fix: disable loguru variable inspection so runner exceptions surface - #2290

Open
abendrothj wants to merge 1 commit into
exo-explore:mainfrom
abendrothj:fix/loguru-diagnose
Open

fix: disable loguru variable inspection so runner exceptions surface#2290
abendrothj wants to merge 1 commit into
exo-explore:mainfrom
abendrothj:fix/loguru-diagnose

Conversation

@abendrothj

Copy link
Copy Markdown

Problem

loguru's diagnose=True (the default) annotates tracebacks by calling repr() on every local variable in every frame. On the MLX CUDA backend, repr() of some device objects can segfault the interpreter while the exception is being logged.

The result is that the real error never reaches the log — the runner dies with an opaque signal 11 instead. I hit this while validating a heterogeneous Metal + CUDA cluster: a straightforward missing-CUDA_HOME error surfaced as an unexplained SIGSEGV, and the actual message was only recoverable by disabling diagnose.

This is a diagnosability trap: it corrupts exactly the information you need at exactly the moment you need it, and the more unusual the failure, the more likely the locals are to be unreprable.

Fix

Pass diagnose=False on all three sinks in logger_setup.

Variable inspection is a debugging nicety; tracebacks (backtrace=True) are unaffected and still show the full call chain. Nothing else changes.

loguru's diagnose mode calls repr() on every local in a traceback; repr of
MLX CUDA objects can segfault mid-log, replacing the actual runner exception
with an opaque signal 11. Observed masking a missing-CUDA_HOME error as a
crash during heterogeneous ring validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant