Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The DNS-SD Resolve callback logic must be executed in the Matter task context #13258

Closed
selissia opened this issue Dec 28, 2021 · 1 comment · Fixed by #13370
Closed

The DNS-SD Resolve callback logic must be executed in the Matter task context #13258

selissia opened this issue Dec 28, 2021 · 1 comment · Fixed by #13370
Labels
p1 priority 1 work

Comments

@selissia
Copy link
Contributor

selissia commented Dec 28, 2021

Problem

In the current implementation of a Matter node running over Thread a successful DNS-SD resolution can result in CASE session establishment code to be executed in the Thread task context (see attached stack trace). This is problematic as the Tread task is not generally expected to have sufficient stack to handle Matter processing. Another issue is that this may result in a semaphore block during an attempt to send a Thread message from the context of receiving a Thread message.

More info in this discussion thread: https://csamembers.slack.com/archives/G014G30SVV0/p1640643472300200

Proposed Solution

The Matter processing resulting from OnDnsResolveResult
(and probably other DNS-SD events) must be handed off to the Matter processing context.

Stack:
stack_top
stack_bottom

@selissia selissia added the p1 priority 1 work label Dec 28, 2021
@doru91
Copy link
Contributor

doru91 commented Jan 6, 2022

Always reproductible on NXP platform. Also left a comment in the Slack thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1 priority 1 work
Projects
None yet
2 participants