Synchronous afb calls can result in an error when done from an event handler

Description

In some occasion, using an 'afb_api_call_sync'/'afb_api_call_sync_legacy' results in an crash when there are launched from an application framework event handler function (registered using 'afb_api_on_event' function).
Error returned before crash : CRITICAL("Can't enter dispatch while in dispatch!").

The changes to prevent these errors in 'libappcontroller' by using asynchronous calls are already in review (https://gerrit.automotivelinux.org/gerrit/#/c/20323/).

But, even if it's not recommended to use synchronous calls in event handler, can something be done in the application framework to prevent this type of issue to happen ?

Environment

None

Activity

Walt Miner 
April 9, 2019 at 2:45 PM

Close for GG 7.0.1

jose bollo 
March 7, 2019 at 4:36 PM

If the events are managed by jobs, the commit https://gerrit.automotivelinux.org/gerrit/20491 can be reverted.

Fixed

Details

Assignee

Reporter

Labels

Contract ID

Components

Affects versions

Priority

Created February 28, 2019 at 2:32 PM
Updated September 19, 2019 at 12:06 PM
Resolved March 29, 2019 at 10:19 AM