Skip to content

Fix crashes and a leaked client in the Avahi DNS-SD code. - #165

Merged
michaelrsweet merged 1 commit into
OpenPrinting:masterfrom
Abd002:master
Sep 16, 2026
Merged

michaelrsweet merged 1 commit into
OpenPrinting:masterfrom
Abd002:master

Conversation

@Abd002

@Abd002 Abd002 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

The main crash was caused by avahi_lock() skipping the mutex based on a context-wide in_callback flag. Another thread could then free Avahi objects while the monitor thread was using them, resulting in a crash.

Also fixes monitor-thread shutdown and cleanup by waiting for the poll loop to exit cleanly, and frees the Avahi client during teardown.

Verified with DNS-SD churn and repeated avahi-daemon restarts; no crashes or assertions, with sockets and threads returning to normal levels.

@michaelrsweet michaelrsweet self-assigned this Sep 16, 2026
@michaelrsweet michaelrsweet added bug Something isn't working platform issue Issue is specific to an OS or desktop labels Sep 16, 2026
@michaelrsweet michaelrsweet added this to the Stable milestone Sep 16, 2026
@michaelrsweet

Copy link
Copy Markdown
Member

Thanks, will be testing - was having some deadlock issues after the last changes...

@michaelrsweet
michaelrsweet merged commit db6bce7 into OpenPrinting:master Sep 16, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working platform issue Issue is specific to an OS or desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants