Repository navigation
Conversation
Provision replaced the shared certificate cache's GetConfigForCert callback with one pointing at the app being provisioned. If cache maintenance ran during that window it consulted a partially provisioned app (nil automation config), panicking while holding the cache read lock. A config that failed to load also left the cache pointing at it. Only create the cache in Provision; switch its options to the new app in Start, once the config is actually becoming active. Fixes caddyserver#8231 (Caddy side; the leaked read lock needs a CertMagic fix)
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.
Provision replaced the shared cache's GetConfigForCert callback with the app still being provisioned. If maintenance ran in that window it read a partially
provisioned app (nil automation) and panicked. A failed load also left the callback pointing at the failed app.
Provision now only creates the cache if none exists; the callback switches to the new app in Start, once the config is becoming active. Includes a regression test.
The leaked read lock is fixed separately in caddyserver/certmagic#428.
Fixes #8231
AI disclosure: written with the help of Claude Opus 5.5 (Claude Code); reviewed and tested by me.