You changed the source code, so send the diff, not the entire files, in order to be easier to see what code you wrote.

Anyhow, the log messages say there is a buffer overflow -- you wrote more into the buffer than the buffer size.

Cheers,
Danie

On 01/10/15 20:04, jery john wrote:
11(12454) : <core> [mem/q_malloc.c:149]: qm_debug_frag(): BUG: qm_*: fragm. 0x7f9e8fcb2448 (address 0x7f9e8fcb2478) end overwritten(c0c0c000, abcdefed)!
13(12456) CRITICAL: <core> [pass_fd.c:293]: receive_fd(): EOF on 20
 0(12443) ALERT: <core> [main.c:784]: handle_sigs(): child process 12454 exited by a signal 6
 0(12443) ALERT: <core> [main.c:787]: handle_sigs(): core was generated
 0(12443) INFO: <core> [main.c:799]: handle_sigs(): terminating due to SIGCHLD
13(12456) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
12(12455) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 9(12452) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
10(12453) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 8(12451) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 4(12447) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 3(12446) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 7(12450) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 6(12449) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 5(12448) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 2(12445) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 1(12444) INFO: <core> [main.c:850]: sig_usr(): signal 15 received
 0(12443) INFO: <core> [sctp_core.c:48]: sctp_core_destroy(): SCTP API not initialized



using kamailio 4.2
with modified tcp_read.c and tcp_main.c files for buffer manipulation both files attached

gdb output

Reading symbols from /usr/local/sbin/kamailio...done.

warning: exec file is newer than core file.
[New LWP 15502]

warning: Error reading shared library list entry at 0x79e8c789480056e4

warning: Error reading shared library list entry at 0x482a50b70fd8458b
Core was generated by `/usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/ka'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000061f73d in _shm_resize (p=0x61f729 <_shm_resize+541>, s=32767, file=0x3f <error: Cannot access memory at address 0x3f>, func=0x0, line=-1433800800)
    at mem/shm_mem.c:111
111            DBG("WARNING:vqm_resize: resize(0) called\n");







_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat