BUG SQLite Causes Asterisk Crash

drdrew

Guru
Joined
Jul 6, 2013
Messages
20
Reaction score
13
I ran into a problem last year that took a month to solve. Basically what would happen is Asterisk 11.5/11.6 would start crashing when we did more than 40 concurrent calls for extended periods of time. We were using G729 across the board, call recordings and IVRs.

We tried swopping the servers, reinstalling PIAF, updating source etc. Nothing worked.

Then we enabled don't optimise and better backtraces and recompiled Asterisk.

Turns out the culprit is SQLite. We disabled both the SQLite modules and the problem has never come back again. I couldn't find anything that uses SQLite and have not noticed any adverse effects. I recommend disabling it in future builds as it caused us major frustration!
 

beddo

New Member
Joined
Nov 26, 2013
Messages
7
Reaction score
0
Hi folks,

We've been having the same issue - we also rebuilt the whole system and were very disappointed when the problem carried over. For us, asterisk was core dumping except most of the time it didn't tell us that it was core dumping. After eventually catching one where it did tell us that it was core dumping I suddenly realised we had a core dump from every instance in /tmp and was able to start digging into the backtraces.

For us it looks like every core dump happens during the call hangup process at a variable point. Sometimes it is in the middle, sometimes right at the end and sometimes the system had enough time for mix_monitor to kick in and convert out recordings for Asternic.

I've disabled the sqlite modules and am hoping that solves our issue. I have 7 core dumps and although they all indicate call hangup issues only three of them directly have sqlite in the first part of the backtrace.
 

Capstone Works

New Member
Joined
Apr 1, 2014
Messages
24
Reaction score
0
We disabled the sqlite modules and the thing ran for more than two weeks (so far) under significant load without an issue… with 3-5 daily core dumps in the preceeding weeks immediately before disabling it. Unfortunately we may have lost a client over it, but at least we now know NOT to leave those enabled in the future! Perhaps we could get Nerd Uno and the gang to remove them by default - seems like a time bomb waiting to "get ya"!

 

beddo

New Member
Joined
Nov 26, 2013
Messages
7
Reaction score
0
We were on an earlier build, I'm not sure which. We rebuilt last week to green 32bit.

I've disabled the php modules and renamed any .config file in /etc/asterisk that has sqlite in the name to .disabled

I will be restarting asterisk to reload the configs soon as it will be out of hours.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
We were on an earlier build, I'm not sure which. We rebuilt last week to green 32bit.

I've disabled the php modules and renamed any .config file in /etc/asterisk that has sqlite in the name to .disabled

I will be restarting asterisk to reload the configs soon as it will be out of hours.


Using PIAF2 or PIAF3??
 

beddo

New Member
Joined
Nov 26, 2013
Messages
7
Reaction score
0
2.0.6.5.0 from the downloads page (pbxinaflash20650-i386.iso)

Turns out asterisk has cdr sqlite enabled by default and renaming the config files just makes it fall back to cdr_sqlite instead of cdr_sqlite3_custom.

I'm not sure how to properly disable it..
 

beddo

New Member
Joined
Nov 26, 2013
Messages
7
Reaction score
0
Got it, put the following in /etc/asterisk/modules.conf:

Code:
noload => res_config_sqlite.so
noload => res_config_sqlite3.so
noload => cdr_sqlite.so
noload => cel_sqlite3_custom.so
noload => cdr_sqlite3_custom.so

Now I don't see asterisk trying to call anything sqlite related when I restart it.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
2.0.6.5.0 from the downloads page (pbxinaflash20650-i386.iso)

Turns out asterisk has cdr sqlite enabled by default and renaming the config files just makes it fall back to cdr_sqlite instead of cdr_sqlite3_custom.

I'm not sure how to properly disable it..


Use the new PIAF3 installer. I think it's fixed there, but darmock will have to confirm. Don't remove SQLite 3. It's needed by Asterisk!
 

Capstone Works

New Member
Joined
Apr 1, 2014
Messages
24
Reaction score
0
64 bit Green - even recompiled Asterisk to latest to see if it helps - still segfaults above about 10 simultainous calls with sqllite modules loaded.
 

beddo

New Member
Joined
Nov 26, 2013
Messages
7
Reaction score
0
I didn't see the other thread and assumed we needed to turn everything off. I've undone all the changes and just left those two in place.

I don't think we want to attack PIAF3 for this server as the client has had enough inconvenience lately, maybe in the future..
 

Members online

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top