-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
EPERM on auth-profiles.json causes full gateway failure cascade (Windows) #62099
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Bug Report: EPERM on auth-profiles.json causes full gateway failure cascade
Summary
auth-profiles.jsoncan acquire a Windows ReadOnly attribute during concurrent config writes, causing every LLM request to fail withEPERM: operation not permitted. The error is treated as fatal rather than non-fatal, which cascades through the fallback chain and makes the gateway completely unresponsive.Environment
Steps to Reproduce
gemma4:26btoopenclaw.jsonmodels list)models.jsonandauth-profiles.jsonauth-profiles.jsonacquires the Windows ReadOnly file attributeObserved Behavior
Once ReadOnly is set on
auth-profiles.json:auth-profiles.json(viamarkAuthProfileGood)copyFileSyncfrom.tmpto target) fails withEPERMollama/glm-4.7-flash) → fallback model (e.g.,anthropic/claude-opus-4-6)Stack Trace
Expected Behavior
renameJsonFileWithFallbackshould detect the ReadOnly attribute and either clear it or log a warning rather than throwing a fatal error.Workaround
Then restart the gateway.
Impact
Probable Root Cause
Race condition in the atomic JSON file write logic (
renameJsonFileWithFallback) when multiple config files are being updated concurrently during hot-reload. On Windows, a failedrenamefalling back tocopyFileSyncmay leave the target file with a ReadOnly attribute under certain timing conditions, or Windows itself may set ReadOnly as a protective measure during concurrent file access.