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

[OTA-R] mProviderRetryCount is not implemented correctly #18824

Closed
isiu-apple opened this issue May 25, 2022 · 0 comments · Fixed by #18908
Closed

[OTA-R] mProviderRetryCount is not implemented correctly #18824

isiu-apple opened this issue May 25, 2022 · 0 comments · Fixed by #18908
Assignees
Labels

Comments

@isiu-apple
Copy link
Contributor

Problem

So the current code doesn't properly reset mProviderRetryCount after a successful download but image is not applied. Given that we now have two retry counters and they are incremented in different locations, we could be incrementing mProviderRetryCount even on an invalid session error:

  1. Requestor successfully sends QueryImage (CASE established and mProviderRetryCount incremented to 1)
  2. Provider is restarted
  3. Requestor sends QueryImage -> invalid session detected -> CASE torn down
  4. mInvalidSessionRetryCount incremented to 1 in HandleIdleStateEnter
  5. mProviderRetryCount incremented to 2 in SendQueryImage

Given the current example app, after (5), we could get a successful query/download but never applied the image. The next time we attempt to query (and if it were busy), mProviderRetryCount already started at 2 instead of 0 and it would at most retry one more time.

Proposed Solution

Increment and reset mProviderRetryCount properly to reflect actual provider retry attempts.

@isiu-apple isiu-apple self-assigned this May 25, 2022
@isiu-apple isiu-apple added the ota label May 25, 2022
isiu-apple added a commit to isiu-apple/connectedhomeip that referenced this issue May 27, 2022
carol-apple pushed a commit that referenced this issue Jun 2, 2022
* Implemented fix for Issue #18824.

* - Remove debug code.
- scripts/helpers/restyle-diff.sh

* Code review changes.

* Code review changes.

- Remove reset from DefaultOTARequestorDriver::UpdateDownloaded()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant