[asterisk-dev] Scheduler problem

Kaloyan Kovachev kkovachev at varna.net
Wed Oct 23 05:32:57 CDT 2013


Hello list,
i have some crashes from time to time accessing the data from a callback 
function and can't find any reason.

The scheduler thread is created from a wrapper around ast_bridge_call() 
function and is running while the channels are bridged. After 
ast_bridge_call() returns the schedule is removed with ast_sched_del() 
inside a scheduler thread lock, then it is unlocked to run some other 
code and just after that, the datastore (and the structure passed to the 
callback it contains) is freed. This is also done inside a scheduler 
thread lock and a channel lock.

I can't think of any way the callback is called without the datastore 
(and it's callback data) being present, but still there is a crash 
inside the callback when the callback data is accessed ... What i am 
missing here?!





More information about the asterisk-dev mailing list