-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[BUG] The command handler state tracking does not work properly for the groupcast messages. #30472
[BUG] The command handler state tracking does not work properly for the groupcast messages. #30472
Comments
I think the suggestion that was proposed in slack is instead of plumbing a flag through |
The command handler status is added for the response purposes even in case of invoking commands targeted to the group. In case of using more than one endpoint on a single Matter node that was added to the same group, it leads to the application crash. The direct reason is a state check, that succeeds only for the first endpoint and fails for the subsequent calls. Added a new state flag, which informs if the command that is currently handled origins from groupcast communication or not. In case of targeting the group, application returns prematurely and do not try to add status. Fixes: project-chip#30472
The command handler status is added for the response purposes even in case of invoking commands targeted to the group. In case of using more than one endpoint on a single Matter node that was added to the same group, it leads to the application crash. The direct reason is a state check, that succeeds only for the first endpoint and fails for the subsequent calls. Added a new state flag, which informs if the command that is currently handled origins from groupcast communication or not. In case of targeting the group, application returns prematurely and do not try to add status. Fixes: project-chip#30472
The command handler status is added for the response purposes even in case of invoking commands targeted to the group. In case of using more than one endpoint on a single Matter node that was added to the same group, it leads to the application crash. The direct reason is a state check, that succeeds only for the first endpoint and fails for the subsequent calls. Added a new state flag, which informs if the command that is currently handled origins from groupcast communication or not. In case of targeting the group, application returns prematurely and do not try to add status. Fixes: #30472
TODO: Add yaml tests covering the scenario of using multiple endpoints belonging to the same group and existing on a single Matter node. |
The command handler status is added for the response purposes even in case of invoking commands targeted to the group. In case of using more than one endpoint on a single Matter node that was added to the same group, it leads to the application crash. The direct reason is a state check, that succeeds only for the first endpoint and fails for the subsequent calls. Added a new state flag, which informs if the command that is currently handled origins from groupcast communication or not. In case of targeting the group, application returns prematurely and do not try to add status. Fixes: project-chip#30472
…30484) The command handler status is added for the response purposes even in case of invoking commands targeted to the group. In case of using more than one endpoint on a single Matter node that was added to the same group, it leads to the application crash. The direct reason is a state check, that succeeds only for the first endpoint and fails for the subsequent calls. Added a new state flag, which informs if the command that is currently handled origins from groupcast communication or not. In case of targeting the group, application returns prematurely and do not try to add status. Fixes: project-chip#30472
Reproduction steps
The
DispatchCommand
is called the same way for both groupcast and unicast scenarios:mpCallback->DispatchCommand(*this, concretePath, dataReader);
and it doesn't pass the information about the originator of this call. It results in attempts of updating the status (withAddStatus
method) for the invoking response purposes.For the groupcast scenario updating status does not make sense, as response will not be sent anyway and additionally it leads to the application being killed if more than one endpoint existing on a single Matter node was added to the same group.
In such case receiving the groupcast command invokes the status update, which works well for the first endpoint from a list, but it fails for the following ones on a following check:
VerifyOrDie(FallibleAddStatus(aCommandPath, aStatus, context) == CHIP_NO_ERROR);
This issue affects all devices that would like to configure single group on more than one endpoint within the single Matter node and also bridge devices that may represent several different bridged devices belonging to a single group.
Bug prevalence
Always
GitHub hash of the SDK that was being used
Tested with 181b0cb, but it applies to master as well.
Platform
core
Platform Version(s)
All
Anything else?
The potential solution could be adding
isGroupcastInvoked
-like boolean flag to theDispatchCommand
method, forward it up to theAddStatus
call and then conditionally return without updating the status in case of groupcast scenario.The text was updated successfully, but these errors were encountered: