Аn object of this class AppExtension was not given externally without protection. Therefore, I will change the return type from Extensions () to DataAccessor . Where the desired mutex is captured.
ApplicationManagerImpl had unprotected deletion of objects used in other threads. Also, I found a duplicate of the is_stopping method. I deleted this one and left the IsStopping method.
ResumeCtrlImpl captured the mutex queuelock, which belongs to it, and the mutex from ApplicationManagerImpl, when calling the application(..) method. This created a deadlock, and not a secure use of the application object. So I added getting all the apps and working with this list.
It consists of two different crash of the program. The first crash when remove mobile_requestlist. The second is when deleting mobile requests from waiting_forresponse. This was due to the use of smart pointers in different threads. They are copied into threads, so we have to delete them in the thread in which we finish working with it. Since these requests are processed in a separate thread, I delete them there if the core stops working during the processing of these requests. Also added a check to see if the core stopped working while adding such requests to the list.
This is a drop while processing data in one thread and deleting it in another thread. I created a separate mutex to protect this data. Because using the existing one, we do not invest in the time allotted to the timer to perform certain work.
Fixes #3857
Original PR: https://github.com/smartdevicelink/sdl_core/pull/3928
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Submitted ATF test for issue
Summary
Fixes the following problems:
CLA