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

Add synchronization around SDLResponseDispatcher #1552

Merged
merged 5 commits into from Feb 25, 2020

Conversation

joeljfischer
Copy link
Contributor

Fixes #1515

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).

Unit Tests

No unit tests were added, they were run and pass.

Core Tests

  • Tested example app with numerous menu cells, submenu cells, soft buttons, etc. to stress test RPCs waiting for synchronization.

Core version / branch / commit hash / module tested against: Sync 3.0 (19205_DEVTEST), Manticore v2.4.2 (SDL Core v6.0.1)
HMI name / version / branch / commit hash / module tested against: Sync 3.0 (19205_DEVTEST), Manticore v2.4.2 (Generic HMI v0.7.2.)

Summary

  • Methods that alter the internal dictionaries and map tables of the SDLResponseDispatcher are now synchronized.

Changelog

Bug Fixes
  • Fix concurrent setting to dictionaries and map tables causing crashes by synchronizing setter access.

CLA

* Methods that alter the internal dictionaries and map tables are now synchronized
@joeljfischer joeljfischer added bug A defect in the library manager-lifecycle Relating to the manager layer - lifecycle manager labels Feb 10, 2020
@joeljfischer joeljfischer self-assigned this Feb 10, 2020
@joeljfischer joeljfischer added this to In progress in v6.6.0 via automation Feb 10, 2020
v6.6.0 automation moved this from In progress to Waiting for Review Feb 12, 2020
Copy link
Contributor

@NicoleYarroch NicoleYarroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

SmartDeviceLink/SDLResponseDispatcher.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLResponseDispatcher.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLResponseDispatcher.m Outdated Show resolved Hide resolved
* Use dispatch_barrier_async for writes and dispatch_sync for reads
@NicoleYarroch
Copy link
Contributor

I am getting anything random failing test cases (between 3 and 8 total) in SDLResponseDispatcherSpec.

Copy link
Contributor

@NicoleYarroch NicoleYarroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment about failing test cases

@joeljfischer
Copy link
Contributor Author

There were issues due to directly accessing properties for a value that was stored in storeRequest: which stores it asynchronously. I re-did the tests to be "eventually" instead.

v6.6.0 automation moved this from Waiting for Review to Reviewer approved Feb 25, 2020
@joeljfischer joeljfischer merged commit bf64195 into develop Feb 25, 2020
v6.6.0 automation moved this from Reviewer approved to Done Feb 25, 2020
@joeljfischer joeljfischer deleted the bugfix/issue-1515-SIGABRT-crash branch February 25, 2020 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library manager-lifecycle Relating to the manager layer - lifecycle manager
Projects
No open projects
v6.6.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants