linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] RTCP segfault


From: Kyle Dijkstra
Subject: [Linphone-developers] RTCP segfault
Date: Mon, 24 Apr 2017 10:48:46 -0400

I am having errors when using oRTP and trying to enable RTCP on a RECVONLY session. The error does not happen if the session is SENDRECV.

This is a backtrace of the segfault:

Thread 1 "rtp" received signal SIGSEGV, Segmentation fault.
0x00007ffff7bd0a53 in concatb (address@hidden, address@hidden)
    at /usr/src/debug/ortp-1.0.1-18/src/str_utils.c:337
337 while(newm->b_cont!=NULL) newm=newm->b_cont;
(gdb) bt
#0  0x00007ffff7bd0a53 in concatb (address@hidden, address@hidden)
    at /usr/src/debug/ortp-1.0.1-18/src/str_utils.c:337

#1  0x00007ffff7bc4ada in append_sdes (full=1 '\001', m=0x60fc00, session=0x60a610)
    at /usr/src/debug/ortp-1.0.1-18/src/rtcp.c:397

#2  rtp_session_create_and_send_rtcp_packet (address@hidden, 
    address@hidden '\001') at /usr/src/debug/ortp-1.0.1-18/src/rtcp.c:460

#3  0x00007ffff7bc4d3e in rtp_session_send_regular_rtcp_packet_and_reschedule (
    address@hidden, tc=596717386)
    at /usr/src/debug/ortp-1.0.1-18/src/rtcp.c:569

#4  0x00007ffff7bc4ebd in rtp_session_run_rtcp_send_scheduler (
    address@hidden) at /usr/src/debug/ortp-1.0.1-18/src/rtcp.c:604

#5  0x00007ffff7bc5085 in rtp_session_rtcp_process_recv (address@hidden)
    at /usr/src/debug/ortp-1.0.1-18/src/rtcp.c:620

#6  0x00007ffff7bca985 in rtp_session_recvm_with_ts (address@hidden, 
    address@hidden) at /usr/src/debug/ortp-1.0.1-18/src/rtpsession.c:1287

#7  0x00007ffff7bcab24 in rtp_session_recv_with_ts (session=0x60a610, 
    buffer=0x60b8d0 "\364Y\346 \351\341\031q\367s\335H\232\316z\235\243o\034\225.\346Px\263\221=\374\251y\177\377\364\034\210\235\260\244g\340\206\321\301XC(&\n\305\306\066\246\026\210\332\064\335T", len=160, ts=27840, have_more=0x7fffffffcf8c)
    at /usr/src/debug/ortp-1.0.1-18/src/rtpsession.c:1364

#8  0x0000000000402039 in rtpSession::rtp2disk(_RtpSession*, unsigned int, int, unsigned char*) ()

#9  0x0000000000402392 in rtpSession::recv(std::string) ()

#10 0x0000000000402770 in main ()

This makes it look as if there is a bug in the library in str_utils.c, but I may just be not setting up the RECVONLY session properly? 

The code is very similar to that in one of the examples: https://github.com/BelledonneCommunications/ortp/blob/1.0.1/src/tests/mrtprecv.c

This is the code that I use to initialize each session:
for (i=0;i<channels;i++){
printf("channel %d\n", i);
session[i]=rtp_session_new(mode);
rtp_session_set_scheduling_mode( session[i],1);
rtp_session_enable_rtcp(session[i],TRUE);
rtp_session_set_blocking_mode(session[i],0);
rtp_session_set_local_addr(session[i],"0.0.0.0”,localPort, localPort + 1);
if (mode != RTP_SESSION_RECVONLY) {
//set remote address for sendonly and sendrecv sessions
rtp_session_set_remote_addr(session[i],rs[i].address.c_str(), rs[i].port);
}
rtp_session_set_payload_type(session[i],payloadType);
    rtp_session_set_recv_buf_size(session[i],256);
if (ssrc!=NULL) rtp_session_set_ssrc(session[i],atoi(ssrc));
  }

Any help is appreciated.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]