Denis,

Thanks for the detailed bug report.  I've commited a fix to the subversion 
trunk.

With subversion you can get it by:

svn co https://sipp.svn.sourceforge.net/svnroot/sipp/sipp/trunk sipp.trunk

Charles




denis tourasse <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
05/20/2008 09:45 AM

To
[email protected]
cc

Subject
[Sipp-users] Segmentation fault with SIPp 3.1






Hello

I have a problem, when I run my scenario SIPp 3.1 crash with a 
"segmentation fault"
Before installing SIPp 3.1 I used SIPp 3.0 with a simple scenario which 
establish a call, make a pause and close the call.
Now I want to use SIPp 3.1 because it allows to manage out of calls with 
a second scenario.

But when I run SIPp 3.1 with my scenario I have an error whereas he 
works with SIPp 3.0. I tried to discover with the debugger "gdb" what is 
the origin of this "segmentation fault" error.

Gdb returns that I try to send a message with a null source and a null 
message. It refers to the line 1894 of call.cpp :
for (int i = 0; i < src->numComponents(); i++) {
MessageComponent *comp = src->getComponent(i);
int left = buf_len - (dest - msg_buffer);
switch(comp->type) {
case E_Message_Literal:
if (supresscrlf) {
char *ptr = comp->literal;
while (isspace(*ptr)) ptr++;
dest += snprintf(dest, left, "%s", ptr);
supresscrlf = false;
} else {
dest += snprintf(dest, left, "%s", comp->literal);
}
break;
case E_Message_Remote_IP:
dest += snprintf(dest, left, "%s", remote_ip_escaped);
break;
case E_Message_Remote_Host:
dest += snprintf(dest, left, "%s", remote_host);
break;
...


I don't know if it's a problem due to SIPp 3.1 or my scenario.

Please find in attachment my scenario and the errors returned by gdb.



Best regards.


############### My scenario ##################
#### I run it with ./ sipp 192.168.1.130 -sf branchc_denis.xml -i 
192.168.1.142 -s 485 -m 1 ####

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">


<scenario name="branchc_denis">
<nop>
<action>
<exec command="echo [pid] > pid.txt"/>
</action>
</nop>

<send retrans="500">
<![CDATA[

INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
From: [service] 
<sip:[EMAIL PROTECTED]:[remote_port]>;tag=[call_number]
To: 122 <sip:[EMAIL PROTECTED]:[remote_port]>
Contact: <sip:[EMAIL PROTECTED]:[local_port];transport=udp>
Call-ID: [call_id]
CSeq: [cseq] INVITE
User-Agent: SIPp
Max-Forwards: 70
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE 


Content-Type: application/sdp
Content-Length: [len]

v=0
o=[service] 0 0 IN IP[local_ip_type] [local_ip]
s=SIPp
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [auto_media_port] RTP/AVP 0 8 9 18 3 101
a=sendrecv
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:9 G722/16000
a=rtpmap:18 G729/8000
a=rtpmap:3 GSM/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

]]>
</send>

<recv response="407" auth="true">
</recv>

<send>
<![CDATA[

ACK sip:[EMAIL PROTECTED]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: sipp <sip:[EMAIL PROTECTED]:[local_port]>;tag=[call_number]
To: 122 <sip:[EMAIL PROTECTED]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: <sip:[EMAIL PROTECTED]:[local_port]>
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0

]]>
</send>

<send retrans="500">
<![CDATA[

INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
From: [service] 
<sip:[EMAIL PROTECTED]:[remote_port]>;tag=[call_number]
To: 122 <sip:[EMAIL PROTECTED]:[remote_port]>
Contact: <sip:[EMAIL PROTECTED]:[local_port];transport=udp>
[authentication username=485 password=485]
Call-ID: [call_id]
CSeq: [cseq] INVITE
User-Agent: SIPp
Max-Forwards: 70
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE 


Content-Type: application/sdp
Content-Length: [len]

v=0
o=[service] 0 0 IN IP[local_ip_type] [local_ip]
s=SIPp
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [auto_media_port] RTP/AVP 0 8 9 18 3 101
a=sendrecv
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:9 G722/16000
a=rtpmap:18 G729/8000
a=rtpmap:3 GSM/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

]]>
</send>


<recv response="100" optional="true">
</recv>


<recv response="180" optional="true">
</recv>


<recv response="200" start_rtd="true" crlf="true">
</recv>


<send>
<![CDATA[

ACK sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [service] <sip:[EMAIL PROTECTED]:[local_port]>;tag=[call_number]
To: 122 <sip:[EMAIL PROTECTED]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: <sip:[EMAIL PROTECTED]:[local_port]>
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0

]]>
</send>

<pause distribution="uniform" min="2000" max="30000"/>


<send>
<![CDATA[

BYE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [service] <sip:[EMAIL PROTECTED]:[local_port]>;tag=[call_number]
To: 122 <sip:[EMAIL PROTECTED]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] BYE
Contact: <sip:[EMAIL PROTECTED]:[local_port]>
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0

]]>
</send>

<recv response="200" crlf="true" rtd="true">
</recv>

</scenario>



############ Errors returned by gdb ############

#0 0x080542d9 in std::vector<MessageComponent*, 
std::allocator<MessageComponent*> >::size (this=0x0) at 
/usr/include/c++/4.2/bits/stl_vector.h:397
No locals.
#1 0x080516ee in SendingMessage::numComponents (this=0x0) at 
message.cpp:530
No locals.
#2 0x080677fb in call::createSendingMessage (this=0x821f2c8, src=0x0, 
P_index=-2, msg_buffer=0x80e2e80 "", buf_len=65538) at call.cpp:1894
i = 0
length_marker = 0x0
auth_marker = 0x0
auth_comp = (MessageComponent *) 0x0
auth_comp_allocated = false
len_offset = 0
dest = 0x80e2e80 ""
supresscrlf = false
body = 0x0
my_auth_user = '\0' <repeats 2050 times>
my_auth_pass = '\0' <repeats 2050 times>
my_aka_OP = '\0' <repeats 2050 times>
my_aka_AMF = '\0' <repeats 2050 times>
my_aka_K = '\0' <repeats 2050 times>
#3 0x080680b2 in call::createSendingMessage (this=0x821f2c8, src=0x0, 
P_index=-2) at call.cpp:1879
msg_buffer = '\0' <repeats 65537 times>
#4 0x080694d5 in call::executeAction (this=0x821f2c8, msg=0x0, 
scenarioIndex=0) at call.cpp:3270
x = 0xbfe915cc "²\200\006\bÈò!\b"
l_pid = 4
i = 0
actions = (CActions *) 0x82107f8
currentAction = (CAction *) 0x8210808
#5 0x0806cb8a in call::run (this=0x821f2c8) at call.cpp:1385
bInviteTransaction = false
actionResult = 0
curmsg = (message *) 0x8210738
__PRETTY_FUNCTION__ = "virtual bool call::run()"
#6 0x0807f5cc in traffic_thread () at sipp.cpp:3383
userid = 0
call_ptr = (class call *) 0x821f2c8
first_open_tick = 101
l = 1
current_calls = 0
total_calls = 0
running_tasks = (task_list *) 0x81f3328
loops = 1000
last = (class task *) 0x0
iter = {_M_node = 0x81f3328}
calls_to_open = 0
new_time = 101
last_time = 101
firstPass = false
L_file_name = 
"branchc_denis_4079_screen.log\000à!é¿Xð!\bh\"é¿õÒÆ·\000\000\000\000\220ÁÈ·\n\000\000\0008\001\000\000'\000\000\000\210ñ!\b\000\000\000\000\000\000\000\000ô¯È·\000\000\000\0000\000\000\000Ø!é¿\220ÁÈ·A\035\001\000|ÁÈ·\n\000\000\000;\000\000\000H1ù·H\001\000\000ø!é¿\220ÁÈ·ô¿ý·\230\224\004\bhÆý·ô¯È·\000\000\000\000`ÁÈ·\030\"鿭ܺ·`ÁÈ·0\001\000\000\002\b\000\000à¼ý·\000\000\000\000\000\000\000\000dZ\a\b¬ñ!\b
 

õ\020\b\200\000"...
#7 0x080832e4 in main (argc=10, argv=0xbfea26b4) at sipp.cpp:5029
argi = 10
media_sockaddr = {ss_family = 2, __ss_align = 2382473408, __ss_padding = 
"\000\000\000\000\000\000\000\000ô¯È·V\027\005\bð\233\t\b¸%ê¿ 
â¶·Ðÿÿÿà¼ý·Ø%ê¿2\027\005\bV\027\005\b\000\000\000\000$Õ\v\bß 
Á·\000\000\000\000\230¾È·è%ê¿S\027\005\b\001\000\000\000ÿÿ\000\000ø%ê¿¥\234\t\bø\227\004\bhÑ\v\b\b&ê¿\234±\004\b(&ê¿hÑ\v\b(&ê¿"}
 


pthread_id = 0
pthread2_id = 0
pthread3_id = 0
L_maxSocketPresent = 0
generic_count = 0
slave_masterSet = false
__PRETTY_FUNCTION__ = "int main(int, char**)"

-- 

Denis TOURASSE ? Stagiaire R&D
Tél.: 04.76.18.56.42
Email : [EMAIL PROTECTED]

?????????????????????????????????????????????????
Telnowedge SA
2 chemin des Prés
38240 MEYLAN
FRANCE

http://www.telnowedge.com/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to