-
Notifications
You must be signed in to change notification settings - Fork 243
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
SDL crashes in EventDispatcherImpl. #2709
Comments
As you stated in the issue, this was fixed with #2101. If you need it in SDL Core 4.2.0, you will need to apply the patch yourself, as that version is no longer supported. |
Hi @jacobkeeler Scenario mentioned in #2101 is different from the scenario mentioned in current issue . we have mentioned one of the scenario above in issue description . We have already applied the patch #2101 , which has solved Duplicate correlation ID crash issue but we are still getting crash in other scenarios. Could you please provide your support ?? Thanks |
Reopened with agreement with @lauratonwe.
In issue #2101,
In current issue #2709,
|
Please take a look at the probable fix for this issue |
Hi @LitvinenkoIra , Still I feel that the issue can happen with the fix 29c586c. Reason:void EventDispatcherImpl::raise_event(const Event& event) { … Lets say that the context switch happens and it executes the function EventDispatcherImpl::remove_observer_from_vector(EventObserver& observer) ================================================ Thanks. |
@Nilesh-harman Let me explain how I understand the flow after 29c586c: |
I think that the root cause of your crash was in |
@Nilesh-harman also could you please specify what branch or tag do you use.
in backtrace, but in all 4.2.* tags Thanks |
Closing due to no response. @Nilesh-harman feel free to reopen if you are still experiencing the issue on the latest release. |
Hi,
We are observing a crash in SDL. Version used is SDL 4.2
Crash Scenario:
Our analysis:
ApplicationManagerImpl create shared object of Mobile RPC Commands and give object to RequestController to Add in request Set. Hence If RequestController
remove the object from list then command object will get deleted from memory .
Each Mobile RPC Command inherit CommandRequestImpl , which inherit EventObserver . Some of the RPC's class subscribe events using subscribe_on_event of EventObserver.
EventObserver subscribe for these events with EventDispatcherImpl which internally keep RAW pointer of Mobile RPC command.
Now here we are maintaing memory using RAII (Shared Pointer) and on another place keeping raw pointer of it , which is leading to crash in various scenarios.
Example :
Alert(alert_request.cc)
SetMediaClockTimer
PerformInteraction etc ..
Backtrace:
Above Analysis is based on below gdb BackTrace of all threads, thread1 is accessing Object at the same time thread2 is deleting:
Note:
Same root cause Issue was reported earlier also and it was solved by blocking duplicate request from mobile:
https://github.com/smartdevicelink/sdl_core/pull/2101/commits
Thanks.
The text was updated successfully, but these errors were encountered: