Libpri (q931.c) crashed (segv)


#1

Hi guys,

(Apologies if this post is a repeat or in the wrong place.)

I have a SEGV from libpri in q931.c, stack trace as follows:

(gdb) where
#0 0x00ba9bc9 in pri_disconnect_timeout (data=0xb6801fb0) at q931.c:2619
#1 0x00ba429d in __pri_schedule_run (pri=0x9e4ae00, tv=0xb7c50508) at prisched.c:98
#2 0x00ba4302 in pri_schedule_run (pri=0x9e4ae00) at prisched.c:110
#3 0x007f270e in pri_dchannel (vpri=0x80c418) at chan_zap.c:8189
#4 0x00928341 in start_thread (arg=0xb7c51bb0) at pthread_create.c:261
#5 0x0072bfee in clone () from /lib/tls/libc.so.6

#0 0x00ba9bc9 in pri_disconnect_timeout (data=0xb6801fb0) at q931.c:2619
2619 if (pri->debug & PRI_DEBUG_Q931_STATE)
(gdb) print pri
$53 = (struct pri ) 0x0
(gdb) up
#1 0x00ba429d in __pri_schedule_run (pri=0x9e4ae00, tv=0xb7c50508) at prisched.c:98
98 callback(data);
(gdb) info locals
x = 3
callback = (void (
)(void *)) 0xba9ba5 <pri_disconnect_timeout>
data = (void *) 0xb6801fb0
e = (pri_event *) 0x0
(gdb) print pri->pri_sched[3]
$55 = {when = {tv_sec = 1148081935, tv_usec = 604702}, callback = 0, data = 0x0}


Somehow the pri is null. Is there another thread setting the value to null? Even the callback is null.

my system is:
libpri-1.2.2
asterisk-1.2.7.1
etc that comes with it…
Centos 4.1 smp (fresh install)
fujitsu primergy tx200 s2
I cpu (2 logical)
512M ram
wct4xxp (te210p)
wctdm (tdm04b - 2fxo 2fxs)
glibc-debuginfo-2.3.4-2.9.i686.rpm (to add debugging)

I am running a load test 30 outgoing on pri loop => 30 incoming, 2 outgoing on analog loop => 2 incoming. The test is a perl script connecting using AMI then initiating a call on the zap trunk. The dial plan sends digits from the B party which the A party (the caller) checks against.

Does anyone know how to fix? is it fixed? can I mod the code to check for the null condition and return? Now it crash then restart (which is good) but if I do the mod will things hang (which is bad)?

Thanks