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(IoT): Fixing a potential race condition in the timer ring queue #5461

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

ruisebas
Copy link
Member

@ruisebas ruisebas commented Nov 5, 2024

Issue #, if available:

Description of changes:
AWSMQTTSession.timerRing is a NSArray with each element being a NSSet. This can potentially cause a race condition that leads to a crash, if two different threads attempt to access/modify these collections at the same time.

I'm creating a new AWSMQTTTimerRing class that encapsulates these collections and protects their access with a NSLock, similar to what I previously did for AWSIoTAtomicDictionary

Check points:

  • Added new tests to cover change, if needed
  • All unit tests pass
  • All integration tests pass
  • Updated CHANGELOG.md
  • Documentation update for the change if required
  • PR title conforms to conventional commit style

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@harsh62 harsh62 temporarily deployed to IntegrationTest December 9, 2024 16:12 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest December 9, 2024 16:12 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest December 9, 2024 16:12 — with GitHub Actions Inactive
@ruisebas ruisebas requested a review from a team as a code owner December 10, 2024 18:41
@ruisebas ruisebas merged commit 80711f4 into main Dec 10, 2024
67 checks passed
@ruisebas ruisebas deleted the fix/timerring_crash branch December 10, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants