[SR-Users] Kamailio Unexpectedly Terminating

Akan forums at akan.net
Thu Jun 28 05:45:44 CEST 2012


Daniel,

i did a repull from git, compiled, installed and re-test of Kamailio and 
got the same error in the same program's location as previous (in 
tm_funcs.c). Here are the commands that I entered to make sure I did 
everything correctly:

mkdir -p /usr/local/src/kamailio/kamailio-3.2-noalignment
cd /usr/local/src/kamailio/kamailio-3.2-noalignment
git clone --depth 1 git://git.sip-router.org/sip-router kamailio
cd kamailio
|gmake proper
gmake prefix=/opt/kamailio-3.2 FLAVOUR=kamailio cfg
vi modules.lst
| gmake prefix=/opt/kamailio-3.2 Q=0 CC_EXTRA_OPTS=|-mno-faster-structs all
|gmake prefix=/opt/kamailio-3.2 Q=0 CC_EXTRA_OPTS=|-mno-faster-structs 
install

Makefile:363: config.mak: No such file or directory
normal Makefile.defs exec
target architecture <sparc64>, host architecture <sparc64>
generating autover.h ...
making config...
Makefile.defs defs skipped
gcc -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc 
-fno-strict-overflow -ftree-vectorize -Wall -mno-faster-structs   
-DNAME='"ser"' -DVERSION='"3.2.3"' -DARCH='"sparc64"' -DOS='solaris_' 
-DOS_QUOTED='"solaris"' -DCOMPILER='"gcc 4.6.2"' -D__CPU_sparc64 
-D__OS_solaris -DSER_VER=3002003 
-DCFG_DIR='"/opt/kamailio-3.2/etc/ser/"' -DPKG_MALLOC -DSHM_MEM 
-DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP 
-DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER 
-DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DDBG_QM_MALLOC -DUSE_TLS 
-DTLS_HOOKS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 
-DCC_GCC_LIKE_ASM -DSPARC64_MODE -DHAVE_GETIPNODEBYNAME 
-DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION 
-DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H   -c endianness.c -o 
endianness.o -MMD -MP
gcc -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc 
-fno-strict-overflow -ftree-vectorize -Wall -mno-faster-structs   
-DNAME='"ser"' -DVERSION='"3.2.3"' -DARCH='"sparc64"' -DOS='solaris_' 
-DOS_QUOTED='"solaris"' -DCOMPILER='"gcc 4.6.2"' -D__CPU_sparc64 
-D__OS_solaris -DSER_VER=3002003 
-DCFG_DIR='"/opt/kamailio-3.2/etc/ser/"' -DPKG_MALLOC -DSHM_MEM 
-DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP 
-DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER 
-DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DDBG_QM_MALLOC -DUSE_TLS 
-DTLS_HOOKS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 
-DCC_GCC_LIKE_ASM -DSPARC64_MODE -DHAVE_GETIPNODEBYNAME 
-DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION 
-DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H   -c select_buf.c -o 
select_buf.o -MMD -MP

||
Thanks

Nathaniel

|
On 6/25/2012 3:05 AM, Daniel-Constantin Mierla wrote:
> Hello,
>
> thanks for troubleshooting further -- as I expected, it is a memalign 
> problem, but some confusing reports by not using always the patches I 
> made to registrar module to align the structure, made thinking is 
> something else. Now is no longer in registrar, but in another module.
>
> There might be many of these, can you try to compile first without 
> strict alignment to 8 bytes? Checking quickly to gcc, the option 
> should be |-mno-faster-structs
>
> So try:
>
> make proper
> make FLAVOUR=kamailio cfg|
> make Q=0 CC_EXTRA_OPTS=|-mno-faster-structs all|
> ...
>
> By providing Q=0, you will see all compile flags, verify that 
> |-mno-faster-structs is there.
>
> Cheers,
> Daniel
> |
> On 6/22/12 3:26 PM, Akan wrote:
>> Hello,
>>
>> After doing some research, this is what I found out. On Solaris Sparc 
>> 64bit system, there is a mandatory alignment of memory accesses and 
>> also for data types. I went thru the core dump, disassembled the code 
>> and located the instruction that produced the error. The registers 
>> addresses in questioned are on a 4 byte alignment but not an 8 byte 
>> or 16 byte alignment. .The earlier patch must have forced the 
>> alignment which is why the error did not occur in the program 
>> common.c. It looks like there is a similar situation in t_funcs.c.
>>
>> Here is a link that I found that can better explain:
>> http://blog.jgc.org/2007/04/debugging-solaris-bus-error-caused-by.html
>>
>> Core was generated by `/opt/kamailio-3.2/sbin/kamailio'.
>> Program terminated with signal 10, Bus error.
>> #0  0xffffffff7bd2b7bc in t_relay_to (p_msg=0x10047c698, proxy=0x0, 
>> proto=0, replicate=0) at t_funcs.c:352
>> 352                     if (!t_reply( t, p_msg , 100 ,
>>
>>   0xffffffff7bd2b7b0 <+976>:   ldx  [ %l7 + %g1 ], %g1
>>    0xffffffff7bd2b7b4 <+980>:   ldx  [ %g1 ], %g1
>>    0xffffffff7bd2b7b8 <+984>:   call  0xffffffff7be9bc80 <t_reply at plt>
>> *=> 0xffffffff7bd2b7bc <+988>:   ldx  [ %g1 + 0x38 ], %o3*
>>    0xffffffff7bd2b7c0 <+992>:   cmp  %o0, 0
>>    0xffffffff7bd2b7c4 <+996>:   be,pn   %icc, 0xffffffff7bd2bb14 
>> <t_relay_to+1844>
>>    0xffffffff7bd2b7c8 <+1000>:  ldx  [ %fp + 0x7f7 ], %o0
>>    0xffffffff7bd2b7cc <+1004>:  b  %xcc, 0xffffffff7bd2b460 
>> <t_relay_to+128>
>>
>> End of assembler dump.
>> (gdb) info registers g1
>> g1             0xffffffff7666c3e4       -2308520988
>> (gdb) info registers o3
>> o3             0x18f3d0 1635280
>>
>> I hope this helps in trying to resolve this problem and to find a 
>> solution. Also, if you need a sparc system to test with, just let me 
>> know. We can help from a sparc perspective.
>>
>> Thanks
>>
>> Nathaniel
>>
>>
>
>
> -- 
> Daniel-Constantin Mierla -http://www.asipto.com
> http://twitter.com/#!/miconda  -http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 -http://asipto.com/u/katu
> Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 -http://asipto.com/u/kpw
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2012.0.2180 / Virus Database: 2437/5091 - Release Date: 06/24/12
>





More information about the sr-users mailing list