Project

General

Profile

Bug #3299

osmo_ortp: scheduler is not started

Added by dexter over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
05/29/2018
Due date:
% Done:

100%

Spec Reference:

Description

Apparently the scheduler of ortp is not started. Presumably older versions did not require starting the scheduler explicitly, so we just do not call the relevant function:

Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(101600): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(80640): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(101760): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(80800): ERROR!
Tue May 29 15:41:00 2018 <0000> rsl.c:2633 (bts=0,trx=0,ts=3,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP
Tue May 29 15:41:00 2018 <0000> rsl.c:2550 (bts=0,trx=0,ts=3,ss=0) chan_num:11 Tx MEAS RES valid(2), flags(03)
Tue May 29 15:41:00 2018 <0000> rsl.c:2568 (bts=0,trx=0,ts=3,ss=0) Send Meas RES: NUM:20, RXLEV_FULL:63, RXLEV_SUB:63, RXQUAL_FULL:0, RXQUAL_SUB:0, MS_PWR:56, UL_TA:0, L3_LEN:18, TimingOff:0
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(101920): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:0 Cannot use the scheduled mode: the scheduler is not started. Call ortp_scheduler_init() at the begginning of the application.Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:0 can't guess current timestamp because session is not scheduled.Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:145 osmo-ortp(16386): timestamp_jump, new TS 0, resyncing
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(80960): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:0 Cannot use the scheduled mode: the scheduler is not started. Call ortp_scheduler_init() at the begginning of the application.Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:0 can't guess current timestamp because session is not scheduled.Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:145 osmo-ortp(16384): timestamp_jump, new TS 0, resyncing
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(102080): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(81120): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(102240): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(81280): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(102400): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(81440): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(102560): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(81600): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(102720): ERROR!
Tue May 29 15:41:00 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(82080): ERROR!

Associated revisions

Revision 7632278e (diff)
Added by dexter over 2 years ago

ortp: make sure the ortp scheduler is started

the function osmo_rtp_init() is initializing ortp at the start of the
application. However, it does not start the scheduler of ortp, which
leads into error log messages in some situatios.

- make sure that ortp_scheduler_init() is called with osmo_rtp_init()

Change-Id: I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Related: OS#3299

Revision 28eeb6bc (diff)
Added by dexter over 2 years ago

ortp: reset rtp session on SSRC changes

When libortp detects a timestamp jump, we resynchronize the session
in order to restore proper rtp frame reception. However, we do not
resynchronize on an SSRC change. An SSRC change usually indicates
the change of an RTP stream source, which is a much more profound
event than a timestamp change, so we should even reset the session
on SSRC changes.

Also, not resynchronizing the session on an SSRC change causes
problems when the jitter buffer feature is used. In those cases
it takes libortp a long time until it finally detects the timestamp
jump and the session resyhcornization happens late.

- reset the ession on SSRC changes by calling rtp_session_reset()

Change-Id: I8688a55cd20d0e14493c357db80754851e12f2fb
Related OS#3299

Revision c81b68f3 (diff)
Added by dexter over 2 years ago

ortp: detect ssrc changes immediately

libortp detects an ssrc jump using a packet count thresold. This
threshold is set to 50 by default. This means that libortp has
to see 50 rtp packets with the new SSRC before it accepts the
new stream. In our application we want to detect the changed
SSRC (Handover) as fast as possible. So we should change the
threshold to zero.

- use rtp_session_set_ssrc_changed_threshold() to set a thresold
of 0 packets when osmo_rtp_socket_create() is called.

Change-Id: Id88c2c44d29a409affc2e47fdb932e1187020593
Related: OS#3299

Revision 5a236ce1 (diff)
Added by dexter over 2 years ago

ortp: enable scheduled mode on rtp socket creation

we use some functionalities of libortp that require to use rtp sessions
with the scheduled mode enabled. Since we do not enable the scheduled mode,
yet, we receive error messages in the log that complain about a non enabled
scheduled mode.

- Turn on scheduled mode using rtp_session_set_scheduling_mode() when
osmo_rtp_socket_create() is called.

Note: this patch is related to chane:
I3a63c23f5ede47773b6a249a48ecebd5d3b45ace Unfortunately we observed a
segfault with ortp version 0.25.0 (ARM), which seems to be related to an
unintialized scheduling mode. We expect this patch to fix the problem.

Change-Id: I4b8f0349d5503bbe53745cc8903beb26f149f219
Closes: OS#3299

Revision 05de362c (diff)
Added by dexter over 2 years ago

Revert "ortp: make sure the ortp scheduler is started"

We discovered that enabling the scheduler caused a segfault on the
ARM build of osmo-bts. So we have to revert the following two changes:
Change-Id I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Change-Id I4b8f0349d5503bbe53745cc8903beb26f149f219

This reverts commit 7632278ea36c25eaa0d8e35fa0ee102ec05dc802.

Change-Id: Ie375b9eb0dc8ec4f8d4ca12940a7bc5dfc1f6235
Related: OS#3299

Revision e7761c6f (diff)
Added by dexter over 2 years ago

Revert "ortp: enable scheduled mode on rtp socket creation"

We discovered that enabling the scheduler caused a segfault on the
ARM build of osmo-bts. So we have to revert the following two changes:
Change-Id I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Change-Id I4b8f0349d5503bbe53745cc8903beb26f149f219

This reverts commit 5a236ce1d414625476d0c0f652ecbe0eb2bbeaf1.

Change-Id: Ic81062d79a304038a50658b955f7d05edb3fa28e
Related: OS#3299

History

#1 Updated by dexter over 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 40

I now make sure that ortp_scheduler_init() is called at application start:

https://gerrit.osmocom.org/#/c/libosmo-abis/+/9360 ortp: make sure the ortp scheduler is started

Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(78080): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(78240): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(78400): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(78560): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(78720): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:0 can't guess current timestamp because session is not scheduled.Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:145 osmo-ortp(16384): timestamp_jump, new TS 0, resyncing
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(78880): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(79040): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(79200): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(79360): ERROR!
Tue May 29 15:59:59 2018 <0015> trau/osmo_ortp.c:180 osmo_rtp_socket_poll(79520): ERROR!

The log now looks better, but there seem still to be problems.

See also OS#3297

#2 Updated by dexter over 2 years ago

  • % Done changed from 40 to 100

I have checked back if we do enable the scheduled mode or not. Apparently we never enable it. I have added now a call to rtp_session_set_scheduling_mode(rs->sess, TRUE); in osmo_rtp_socket_create(). There is no noticeable difference in the behaviour, but the log text now looks clean:

Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(79680): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(102560): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(79840): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(102720): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(80000): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:143 osmo-ortp(16384): timestamp_jump, new TS 1212560905, resyncing
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(102880): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(80160): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(103040): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(80320): ERROR!
Wed May 30 14:27:18 2018 <0015> trau/osmo_ortp.c:178 osmo_rtp_socket_poll(103200): ERROR!

See also:
https://gerrit.osmocom.org/#/c/libosmo-abis/+/9388 ortp: enable scheduled mode on rtp socket creation

#3 Updated by dexter over 2 years ago

  • % Done changed from 100 to 90

There were reported problems that this patch causes problems on ARM. We will have to look closer into this.

#4 Updated by dexter over 2 years ago

  • Status changed from In Progress to Stalled

#5 Updated by dexter over 2 years ago

  • % Done changed from 90 to 10

#6 Updated by laforge about 1 year ago

  • Status changed from Stalled to Closed
  • % Done changed from 10 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)