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

Ensure RPC Request thread safety #1570

Merged
merged 3 commits into from Feb 26, 2020

Conversation

joeljfischer
Copy link
Contributor

@joeljfischer joeljfischer commented Feb 24, 2020

Fixes #1564

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

Unit tests were run, but no new tests were added to the PR because threading issues like this are very difficult to unit test.

Core Tests

An app was run against Core and various functions were tested to ensure that RPC requests continued to function properly.

Core version / branch / commit hash / module tested against: Manticore v2.4.2 (Core v6.0.1)
HMI name / version / branch / commit hash / module tested against: Manticore v2.4.2 (Generic HMI 0.7.2)

Summary

This PR updates lifecycle manager RPC requests to always run on the lifecycle processing queue. This ensures that all access to protected resources will occur both synchronously and on the same queue.

Changelog

Bug Fixes
  • Fix occasional crashes or RPC failures due to accessing an unprotected resource from multiple threads simultaneously.

CLA

* Ensure that all RPC requests are sent on the processing queue to ensure protected resources are accessed synchronously from the same queue
@joeljfischer joeljfischer added bug A defect in the library manager-lifecycle Relating to the manager layer - lifecycle manager labels Feb 24, 2020
@joeljfischer joeljfischer self-assigned this Feb 24, 2020
@joeljfischer joeljfischer added this to In progress in v6.6.0 via automation Feb 24, 2020
@joeljfischer joeljfischer changed the title Ensure RPC Request thread safety WIP: Ensure RPC Request thread safety Feb 24, 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/SDLGlobals.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLGlobals.m Outdated Show resolved Hide resolved
v6.6.0 automation moved this from In progress to Waiting for Review Feb 25, 2020
@joeljfischer joeljfischer changed the title WIP: Ensure RPC Request thread safety Ensure RPC Request thread safety Feb 25, 2020
@joeljfischer joeljfischer linked an issue Feb 25, 2020 that may be closed by this pull request
v6.6.0 automation moved this from Waiting for Review to Reviewer approved Feb 26, 2020
@joeljfischer joeljfischer merged commit e012a54 into develop Feb 26, 2020
v6.6.0 automation moved this from Reviewer approved to Done Feb 26, 2020
@joeljfischer joeljfischer deleted the bugfix/issue-1564-correlationId-thread-safety branch February 26, 2020 14:52
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.

The correlationId is not thread safe
2 participants