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

Fix caching of the description CRCs in the backup RAM #1413

Merged
merged 1 commit into from Jan 22, 2018

Conversation

@sergeuz
Copy link
Member

commented Oct 24, 2017

Problem

This PR fixes #1172 by ensuring that the application/system description checksums stored in the backup RAM don't get overwritten by invalid values when DTLS context is updated.

Steps to Test

  1. Flash a blank application with enabled logging to an Electron.
  2. Toggle the power off and on to ensure that the persistent session data is invalidated.
  3. Check that the device sends the HELLO message.
  4. Flash the same application binary to the device OTA.
  5. Check that the device skips sending the HELLO message.

References

  • [CH8911]

Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@sergeuz sergeuz added the bug label Oct 24, 2017

@sergeuz sergeuz added this to the 0.8.0 milestone Oct 24, 2017

@sergeuz sergeuz requested a review from technobly Oct 24, 2017

@m-mcgowan m-mcgowan self-requested a review Oct 24, 2017

@m-mcgowan
Copy link
Contributor

left a comment

Wow, some crazy errors in the original code!

The original report mentioned this only happened with debug builds - were you able to confirm that and find out why?

@sergeuz

This comment has been minimized.

Copy link
Member Author

commented Oct 24, 2017

The original report mentioned this only happened with debug builds - were you able to confirm that and find out why?

In my tests the issue was reproducible regardless of DEBUG_BUILD.

@m-mcgowan
Copy link
Contributor

left a comment

The crux of the issue stems from inconsistency between the copy of the data in RAM and in backup RAM.

@m-mcgowan m-mcgowan modified the milestones: 0.8.0, 0.8.0-rc.2 Jan 18, 2018

@m-mcgowan m-mcgowan merged commit 2c34614 into develop Jan 22, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@m-mcgowan m-mcgowan deleted the fix/issue_1172 branch Jan 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.