Segfault crashing asterisk at seemingly random intervals

About 1 month ago, I installed asterisk 1.6 on an Ubuntu server (here’s the uname -a string: Linux phone 2.6.32-24-server #41-Ubuntu SMP Thu Aug 19 02:47:08 UTC 2010 x86_64 GNU/Linux). I did the installation by downloading out the source code for DAHDI and asterisk and building it from scratch, since I needed ilbc support, which was not provided by default. I downloaded from here:

asterisk: asterisk.org/downloads/aster … ent.tar.gz
dahdi: downloads.asterisk.org/pub/telep … 4.0.tar.gz

and later the addons from here:

downloads.asterisk.org/pub/telep … 2.1.tar.gz

Things seemed to be running okay until the system started crashing, logging things like the following in /var/log/messages:
/var/log/messages:Sep 21 13:49:38 phone kernel: [376413.794521] asterisk[11366]: segfault at 0 ip 00007f2edc644b44 sp 00007f2edb3e0e38 error 4 in libc-2.11.1.so[7f2edc5be000+17a000]
/var/log/messages:Sep 23 10:57:11 phone kernel: [538866.244287] asterisk[32707]: segfault at 0 ip 00007fcd18d50b44 sp 00007fcd17aece38 error 4 in libc-2.11.1.so[7fcd18cca000+17a000]
/var/log/messages.1:Sep 13 11:45:53 phone kernel: [508909.197875] asterisk[24562]: segfault at 0 ip 00007f024b58ab44 sp 00007f024a326e38 error 4 in libc-2.11.1.so[7f024b504000+17a000]
/var/log/messages.1:Sep 17 15:25:00 phone kernel: [36535.529827] asterisk[1457]: segfault at 0 ip 00007f0cdd2a3b44 sp 00007f0cdc03fe38 error 4 in libc-2.11.1.so[7f0cdd21d000+17a000]

I did a little research, and found some indicators that perhaps I had introduced some sort of version skew into my kit. I then went back and looked for errors, found some messages that indicated that it did not like some of the built modules because they had not been built by the current build and might cause compatibility issues. I then used SVN to check out the latest trunk code for both DAHDI and asterisk, and rebuilt them, now having the following versions, as reported from the Asterisk CLI:

Asterisk SVN-trunk-r286427 built by root @ phone on a x86_64 running Linux on 2010-09-13 17:07:44 UTC

and

DAHDI Version: SVN-trunk-r9319 Echo Canceller: MG2

Given that the issue seems to lie with libc, I made sure that I had the latest apt-gettable version of that file, prior to the
rebuild and re-install above.

I would appreciate any pointers,advice, etc. that might help me resolve this problem. I am currently thinking that I may need to rebuild everything from scratch and start over, but given the random nature of the problem, I don’t want to have the thing fall over a week after I’ve “fixed” it.

I look forward to your thoughts and input.

Patrick W. Foster
Bradford, MA 01835

See doc/backtrace.txt

Done…and done…As soon as it crashes again, I will post the relevant portions of the core dump (the bt and bt.full) as specified in the document you asked me to read. Whilst I am replying, I am guessing errors in the dahdiscan module are irrelevant if they are so severe as to cause the module not to load. Also the lack of the /device/dahdi/transcode file doesn’t seem relevant either, based on what I’ve found so far in this forum.