-
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
reporting::CheckedImpl::RetrieveClusterData crashes when attribute read fails #35306
Comments
On Linux we were using the "check" mode, but it's buggy in ways that cause app crashes (see project-chip#35306). Just disabling it for now so this is not an issue for SVE.
Disabling this in #35307 for now to work around SVE problems. |
Reproduced via python script by: attr = await devCtrl.ReadAttribute(
node_id, [Clusters.WaterHeaterManagement.Attributes.HeaterTypes]
) (wrote a test script in https://github.com/andy31415/chip-repl-tests/blob/main/energy_management_read.py). |
It seems the logic in the code states that we do not compare data length for non-unit-tests because it is not reliable (time-dependent sizes may differ). However the logic for this seems broken as |
…roject-chip#35307) On Linux we were using the "check" mode, but it's buggy in ways that cause app crashes (see project-chip#35306). Just disabling it for now so this is not an issue for SVE.
…#35307) On Linux we were using the "check" mode, but it's buggy in ways that cause app crashes (see project-chip/connectedhomeip#35306). Just disabling it for now so this is not an issue for SVE.
Reproduction steps
Then run
./out/debug/chip-energy-management-app
, commission it, and do:The app crashes. This happens because that attribute read fails in both the "data model" and "ember" versions of read, but the "ember" version does the equivalent of
AttributeReportBuilder::PrepareAttribute
before it tries the part that fails, while the "data model" version does them in the opposite order. So whilestatusEmber != statusDm
tests false,lengthWrittenEmber != reportBuilder.GetWriter()->GetLengthWritten()
is true and we hit the fatal assert.There's a comment there that says:
but that's just not true. The StatusIB encoding is done by the caller of
RetrieveClusterData
(Engine::BuildSingleReportDataAttributeReportIBs
) after rolling back the TLV in error cases. Except forIsOutOfSpaceEncodingResponse()
situations.So presumably either the logic in Read-Checked needs to be fixed to be looser in its assertions or the two RetrieveClusterData implementations need to be changed to produce equivalent output as this code expects.
Bug prevalence
Always
GitHub hash of the SDK that was being used
ebc4237
Platform
core
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: