After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790762 - rtpsession: do not report internal sources
rtpsession: do not report internal sources
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.8.3
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 790795
 
 
Reported: 2017-11-23 16:42 UTC by Miguel París Díaz
Modified: 2018-11-03 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpsession: do not report internal sources (3.76 KB, patch)
2017-11-23 16:42 UTC, Miguel París Díaz
none Details | Review
rtpsession: do not report internal sources (3.75 KB, patch)
2017-11-24 09:49 UTC, Miguel París Díaz
none Details | Review
0001 rtpsession: do not report internal sources (933 bytes, patch)
2017-11-30 13:31 UTC, Miguel París Díaz
none Details | Review
0002 (test)rtpsession: make test harness always sender and receiver (9.09 KB, patch)
2017-11-30 13:32 UTC, Miguel París Díaz
none Details | Review
0003 (test)rtpsession: fix test_multiple_senders_roundrobin_rbs (4.55 KB, patch)
2017-11-30 13:32 UTC, Miguel París Díaz
none Details | Review
0004 (test)rtpsession: do not report internal sources (3.93 KB, patch)
2017-11-30 13:33 UTC, Miguel París Díaz
none Details | Review

Description Miguel París Díaz 2017-11-23 16:42:28 UTC
Created attachment 364282 [details] [review]
rtpsession: do not report internal sources

I have noticed that the report blocks (RB) generated also include the reports of internal sources, when only the remote ones must be.

The attached patch fixes this issue and adds a test about it.
On the other hand, it makes test_multiple_senders_roundrobin_rbs to fail because this test is based on the wrong logic of adding RBs of internal sources.
Comment 1 Sebastian Dröge (slomo) 2017-11-23 18:05:03 UTC
Review of attachment 364282 [details] [review]:

::: gst/rtpmanager/rtpsession.c
@@ +3420,3 @@
 
+  if (source->internal) {
+    GST_DEBUG ("source %08x not internal", source->ssrc);

There's a "not" too much here :)

The internal sources are the ones that we produce, right? So for a sender these would be the ssrcs with which data is sent, and those should surely be included here? And for a receiver they're the sources we use for sending RTCP?
Just trying to confirm that my memory is correct first.
Comment 2 Miguel París Díaz 2017-11-24 09:48:13 UTC
Hello Sebastian,
I understand better (I hope for you too) the internal meaning considering:
  - internal sources are related to LOCAL RTP SSRCs
  - non-internal sources are related to REMOTE RTP SSRCs

Taking this into account:
  - internal sources are created to send RTP packets or to be used as (sender-SSRC) in RR reports [1].
  - non-internal sources are created to receive RTP packets.

Hence, following [2], the Reception Report Blocks MUST be only use non-internal sources (remote RTP SSRCs).

Refs
[1] https://tools.ietf.org/search/rfc3550#section-6.4.1
[2] https://tools.ietf.org/search/rfc3550#section-6.4
Comment 3 Miguel París Díaz 2017-11-24 09:49:12 UTC
Created attachment 364311 [details] [review]
rtpsession: do not report internal sources

Fix wrong log.
Comment 4 Sebastian Dröge (slomo) 2017-11-24 12:12:47 UTC
(In reply to Miguel París Díaz from comment #2)
> Hello Sebastian,
> I understand better (I hope for you too) the internal meaning considering:
>   - internal sources are related to LOCAL RTP SSRCs
>   - non-internal sources are related to REMOTE RTP SSRCs
> 
> Taking this into account:
>   - internal sources are created to send RTP packets or to be used as
> (sender-SSRC) in RR reports [1].
>   - non-internal sources are created to receive RTP packets.

And what's a "sender" (the field on the RTP source) in this context? Something that actually sends RTP packets, and not just an RTCP sender? Is every "sender" always an internal source?
I guess this should be documented in a comment in rtpsource.h next to those fields. Would you mind making another commit for that?


I agree that RBs must only contain SSRCs from which packets were actually received. It doesn't make any sense otherwise.
Comment 5 Sebastian Dröge (slomo) 2017-11-28 14:33:56 UTC
Miguel?
Comment 6 Miguel París Díaz 2017-11-28 16:35:47 UTC
Hello Sebastian,
sorry for the delayed response, but I am focus on testing in our system this issue once I have fixed it (together [1] and [2]) and it seems that the problems we experienced have disappeared.

They provoked a real impact in our system and I am sure that for other users too, so seen that closing them implies long tasks like testing and doc I would prioritize them:
  (1) - Fix them (it seems that it is already done by the patches I proposed).
  (2) - Perform unit tests to avoid future regressions.
  (3) - Update doc in order to improve the understanding of the code.

In relation to (2) I will try to develop the best tests I can in relation with these 3 issues.

Regarding (3), I totally agree with you and I will document it once (1) and (2) are finished. Answering your questions:
  - A SENDER RtpSource represents a SSRC used to send RTP packets.
  - It could be remote (non-internal) or local (internal).

Refs
[1] https://bugzilla.gnome.org/show_bug.cgi?id=790661
[2] https://bugzilla.gnome.org/show_bug.cgi?id=790795
Comment 7 Miguel París Díaz 2017-11-30 13:31:55 UTC
Created attachment 364670 [details] [review]
0001 rtpsession: do not report internal sources

Split fix from test to ease management.
Comment 8 Miguel París Díaz 2017-11-30 13:32:39 UTC
Created attachment 364671 [details] [review]
0002 (test)rtpsession: make test harness always sender and receiver
Comment 9 Miguel París Díaz 2017-11-30 13:32:59 UTC
Created attachment 364672 [details] [review]
0003 (test)rtpsession: fix test_multiple_senders_roundrobin_rbs
Comment 10 Miguel París Díaz 2017-11-30 13:33:18 UTC
Created attachment 364673 [details] [review]
0004 (test)rtpsession: do not report internal sources
Comment 11 Håvard Graff (hgr) 2017-12-01 12:19:55 UTC
Hi!

First, good work Miguel and team, this looks like real improvements to the RTP stack!

What I really really would like is for the following patch to be merged first, and then have the test-changes (and potentially the new tests) use the new SessionHarness instead:
https://bugzilla.gnome.org/show_bug.cgi?id=791070

As an example, the whole crank_harness_rtcp block would just be a matter of calling the provided session_harness_produce_rtcp.

The patch "make test harness always sender and receiver" would conflict horribly with the SessionHarness changes, and I think it achieves exactly the same thing but with much less code to worry about. (SessionHarness does set up both rtcp and rtp send/recv)

Would this be acceptable to you Miguel? I am happy to help out converting your test to the new SessionHarness, and I think you will find it only makes things clearer and easier?
Comment 12 Håvard Graff (hgr) 2017-12-01 12:51:26 UTC
Also, it turns out we have the same fix internally, so maybe we could discuss what the *best* approach is:
https://github.com/pexip/gst-plugins-good/commit/5661107a93c062612b8d087429d855487e8cbbc5
Comment 13 Sebastian Dröge (slomo) 2017-12-06 08:37:13 UTC
Miguel, what do you think? Also the tests need to be updated now
Comment 14 Miguel París Díaz 2017-12-09 19:33:37 UTC
Hello Håvard and Sebastian,
first of all thanks for helping with this RtpSession issues.

Regarding using GstHarness, I totally agree with Håvard, using it makes tests quite easier. Actually, I used it in the new tests I did for RtpSession.
Hence, I will rebase my changes onto the test refactoring and I will use the SessionHarness abstraction.

Apart of that, I am happy that we both have found and fixed the issue independently, which demonstrates that there was a really bug.
In relation to your fix, I am not sure if removing the next check could cause an unexpected behavior, we should check it:

-  /* only report about other sender */
-  if (source == data->source)

Anyway, independently your solution or mine is merged I would add both tests to have a wider coverage.
Could you please attach your patches here?
Comment 15 GStreamer system administrator 2018-11-03 15:23:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/416.