[asterisk-dev] segfault if res_timing_pthread.so loaded

Miguel Molina mmolina at millenium.com.co
Thu Jun 17 18:16:38 CDT 2010

El 12/06/10 21:14, Tilghman Lesher escribió:
> On Saturday 12 June 2010 13:23:21 Katerin wrote:
>> Hello, everyone
>> I am using asterisk ver with res_timing_pthread.so loaded. I need
>> this for conference feature (with confbridge). If I start asterisk
>> everything is alright (no errors, warnings in logs), it can also be running
>> for one or two weeks and then suddenly crashes with segfault and the
>> following message in log file:
>> Jun 11 21:08:23 asterisk kernel: [77781101.505303] asterisk[15055]:
>> segfault at ac ip b79b3e30 sp b46a1cec error 4 in
>> res_timing_pthread.so[b79b3000+3000]
>> I don'd know why this happens. Without res_timing_pthread.so asterisk
>> does not crash. I did not have too many calls on it (100-200) at the
>> time of crush. There were also no unusual requests coming and what's
>> more the confbridge exten was not used...So. If anybody knows how I
>> can use this module without asterisk being crashed please share your
>> experience.
> There are other timing modules in 1.6.2 that are preferred over the pthread
> timers, and as you have experienced, it seems that the pthread timers aren't
> always reliable.  If using Linux, using the DAHDI timers is perhaps the best
> available, followed closely by timerfd (which requires a more advanced kernel
> than many distributions are yet providing).  Also coming up in trunk are
> res_timing_kqueue (for *BSD) and res_timing_mach (for Mach-based kernels).
Sorry to continue this non-dev question, but I have set up a medium load 
test between two asterisks (75-80 active SIP calls between 
them) and in less than 20 minutes one of the asterisks (the one that 
generates the calls) died with this segfault:

Core was generated by `/usr/sbin/asterisk -f'.
Program terminated with signal 11, Segmentation fault.
#0  0x00ba0cb4 in ao2_unlock at plt () from 
(gdb) bt
#0  0x00ba0cb4 in ao2_unlock at plt () from 
#1  0x00ba18d2 in pthread_timer_disable_continuous (handle=1092) at 
#2  0x0809a98a in __ast_read (chan=0xa575de0, dropaudio=0) at channel.c:2797
#3  0x00227880 in wait_for_answer (chan=0xaceccd0, data=<value optimized 
out>, peerflags=0xb38a6e50, continue_exec=0x0) at app_dial.c:906
#4  dial_exec_full (chan=0xaceccd0, data=<value optimized out>, 
peerflags=0xb38a6e50, continue_exec=0x0) at app_dial.c:1880
#5  0x0022b089 in dial_exec (chan=0xaceccd0, data=0xb38a8f04) at 
#6  0x080ff091 in pbx_exec (c=0xaceccd0, app=0xb7977230, 
data=0xb38a8f04) at pbx.c:1348
#7  0x0810af1b in pbx_extension_helper (c=0xaceccd0, con=0x0, 
context=0xacecf44 "marcador-pruebas_carga-gencall", exten=0xacecf94 
"93484322", priority=2,
     label=0x0, callerid=0xb161ff0 "3484322", action=E_SPAWN, 
found=0xb38ab348, combined_find_spawn=1) at pbx.c:3711
#8  0x0810fd1f in ast_spawn_extension (c=0xaceccd0, args=0x0) at pbx.c:4181
#9  __ast_pbx_run (c=0xaceccd0, args=0x0) at pbx.c:4275
#10 0x081118b0 in pbx_thread (data=0xaceccd0) at pbx.c:4562
#11 0x0815181b in dummy_start (data=0xa6f1b08) at utils.c:968
#12 0x00a0173b in start_thread () from /lib/libpthread.so.0
#13 0x00323cfe in clone () from /lib/libc.so.

How do I enable another timing module instead of res_timing_pthread.so? 
Does CentOS 5.X have the timerfd module? Or... this is a bug I need to 

Thanks for any help.


Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center

More information about the asterisk-dev mailing list