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

CCB: Fix for a potential SDL crash on boot #3163

Closed
LitvinenkoIra opened this issue Dec 6, 2019 · 1 comment
Closed

CCB: Fix for a potential SDL crash on boot #3163

LitvinenkoIra opened this issue Dec 6, 2019 · 1 comment
Assignees

Comments

@LitvinenkoIra
Copy link
Contributor

Bug Report

SmartDeviceLink crash

Detailed analysis:

One of the reasons why SDL is crashing on start is related to lazy initialization of the HMI/Mobile/v4 API classes. These classes are initialized on demand when some of the threads are trying to get the object of that class first time. Most likely, at SDL start might be a situation when HMI/Mobile/v4 API classes are constructing in the one thread and at that moment another thread is trying to get access to the inner data of not-yet-fully-constructed object and this causes a core crash with ~ISchemaItem() calls in stack trace. That is possible because access to these factories is not synchronized.

To avoid such situation, factory creation should be moved to AM ctor and all other sub-components should just use getters when they need to get access to API instances.

Reproduction Steps
  1. Simulate ignition OFF followed by door open and door close. Wait until SYNC is fully powered down
  2. Wait 2 minutes
  3. Simulate door open, door close followed by ignition on.
  4. Wait 5 seconds
  5. Simulate gear change to R
  6. Wait 5 seconds
  7. Simulate gear change to D
  8. After 10 seconds, simulate gear change to P.
  9. Wait 2 minutes.
  10. Repeat 1 - 9 for 36 hours.
Expected Behavior

No crashes

Observed Behavior

Detected SmartDeviceLink core dump (once)

OS & Version Information

@iCollin
Copy link
Collaborator

iCollin commented Jan 15, 2021

Closed via #3581

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

No branches or pull requests

3 participants