Skip to content

[yaws_sup] Fix RSS startup deadlock by reordering child specs#504

Open
QuinnWilton wants to merge 1 commit intoerlyaws:masterfrom
QuinnWilton:fix/rss-startup-ordering
Open

[yaws_sup] Fix RSS startup deadlock by reordering child specs#504
QuinnWilton wants to merge 1 commit intoerlyaws:masterfrom
QuinnWilton:fix/rss-startup-ordering

Conversation

@QuinnWilton
Copy link

@QuinnWilton QuinnWilton commented Feb 10, 2026

Note that this issue was found while running a static analysis tool I'm working on. It seems like a legitimate finding, but it isn't something I observed while operating yaws, and so there might be some nuance I'm missing.

yaws_server:init calls yaws_config:load, which calls yaws_rss:open/2 when the config contains an section. yaws_rss:open blocks in wait_for_server if yaws_rss is not registered. Move yaws_sup_restarts (parent of yaws_rss) before yaws_server in the child spec list so yaws_rss is available when config loading needs it.

Add regression tests that drive through yaws_config:load with a real RSS config file, proving the deadlock occurs without yaws_rss and resolves with it running.

yaws_server:init calls yaws_config:load, which calls yaws_rss:open/2
when the config contains an <rss> section. yaws_rss:open blocks in
wait_for_server if yaws_rss is not registered. Move yaws_sup_restarts
(parent of yaws_rss) before yaws_server in the child spec list so
yaws_rss is available when config loading needs it.

Add regression tests that drive through yaws_config:load with a real
RSS config file, proving the deadlock occurs without yaws_rss and
resolves with it running.
@vinoski vinoski self-assigned this Feb 11, 2026
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.

2 participants