I have been working with Asterisk 13 in the last months, I believed i have passed all doubts and problems but right now i am facing something very difficult to identify.
I am using Asterisk 13.18.cert2. I have developed a server responsible for communicating with Asterisk using ARI. In my first version, everything seems to be working fine and its already in production, but now i refactored my server and the classes responsible for communicating with asterisk and I am getting FRACK errors and Asterisk server seems to be crashing (and the service restarts).
- ERROR astobj2.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x7fe66c003c68 (0)
I already read a few related issues in this community to make sure it wouldn’t be a duplicate question, and as far as I understood, the problem is related to memory being accessed after it was freed. And I understand I need to send you detailed information of the backtrace logs and the configuration files.
Anyway, I can send you that in the future as soon as you request them.
In my investigations I also saw a common request to upgrade the servers because maybe the problem was already fixed.
Do you think I should upgrade my asterisk 13 ? To what version should I upgrade?
My server sends a lot of async http requests to Asterisk. I believe it’s related to the problems happening. Do you think Asterisk 13.18 might be crashing because of multiple requests being sent by different threads at the same time? For example I sometimes send a channel to be muted and to be put on hold. Or I send a create bridge and I add a channel to that bridge at the same time. Should Asterisk handle this easily? Or should I wait for a ChannelCreated respose before adding a channel to that bridge for example?
ps. I mentioned the first version of my server is running fine already in production, and this problem is only happening in my new refactored version. The difference between them is basically my httpclient. In my initial version I also had threads firing different POSTs/DELETEs but i was sure they would happen in the order I send it.
in my new implementation, my http client is using c++ beast library to send the requests and receive the responses. So it is a little bit more complex but more flexible and with better performance. But sometimes the order of requests I send are not sequential.
In this case (and its a real case), I saw the add channel being sent by the socket before the create bridge request. I fixed that but that showed me I have a potential problem while sending posts in sequence that needs to keep an order.
My doubt is if that behavior can crash the Asterisk. Maybe not the createBridge and addChannelToBridge example, but maybe a recording on a snoop channel, with a mute, with adding a new channel to this bridge to monitor the call, with moving a call from one bridge to another while all that is happening.
Thanks in advance.