netutils/mdns: raise responder stack size default to 8KiB#3630
Open
ricardgb wants to merge 1 commit into
Open
Conversation
acassis
approved these changes
Jul 11, 2026
Contributor
|
@ricardgb, please sign your commit message with |
CONFIG_NETUTILS_MDNS_STACKSIZE defaulted to DEFAULT_TASK_STACKSIZE, which resolves to as little as 2KiB on some targets. The bundled mjansson responder uses a deeper stack than that (DNS record parsing with name decompression, plus the send/receive buffers) and overflows on startup, taking the board down with a hardfault before it answers a single query. Default to 8KiB, the value that reliably runs the responder, and correct the help text, which previously claimed a 4KiB default that did not match DEFAULT_TASK_STACKSIZE. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Ricard Rosson <ricard@groundbits.com>
d4716e0 to
d024b03
Compare
linguini1
requested changes
Jul 12, 2026
linguini1
left a comment
Contributor
There was a problem hiding this comment.
Please use the Assisted-by: field from the contribution guide. Also, please attach your test logs from your testing on the Pico.
xiaoxiang781216
approved these changes
Jul 13, 2026
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.
Summary
CONFIG_NETUTILS_MDNS_STACKSIZEdefaulted toDEFAULT_TASK_STACKSIZE,which resolves to as little as 2KiB on some targets. The bundled mjansson
mDNS responder needs a deeper stack than that — DNS record parsing with
name decompression, plus the send/receive buffers — so on those targets it
overflows its stack and hardfaults at startup, before it can answer a
single query.
This raises the default to 8KiB (the value that reliably runs the
responder) and corrects the help text, which previously claimed a "4KiB"
default that did not match
DEFAULT_TASK_STACKSIZE.Impact
with a small
DEFAULT_TASK_STACKSIZE.unaffected.
Testing
Reproduced and fixed on a Raspberry Pi Pico 2 W (RP2350, NuttX). With the
old default (2KiB on this target) the responder overflowed its stack and
hardfaulted at startup; with the new 8KiB default it runs and answers mDNS
queries normally (verified with
avahi-resolve/avahi-browsefrom a host).Disclosure: this change was prepared by an AI agent (Claude Code) at the
direction of the author (@ricardgb), who reviewed it before submission.
🤖 Generated with Claude Code