Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
RE: ReflectorSession leakage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ReflectorSession leakage



Hi Basil.

This issue happens on multi-cast only, or on uni-cast as well?

Regards.



From: streaming-server-dev-bounces+stas=email@hidden
[mailto:streaming-server-dev-bounces+stas=email@hidden] On
Behalf Of Basil Achermann
Sent: Wednesday, August 26, 2009 7:53 PM
To: email@hidden
Subject: ReflectorSession leakage

Hi,

There's a bug in the reflector module that prevents ReflectorSession
from being deleted. While the impact on memory and CPU is low, a much
bigger issue is that multicast groups aren't left when clients
disconnect. This means that all streams ever requested/reflected are
being routed to the server node forever, wasting bandwidth and money.

See also:
http://lists.apple.com/archives/Streaming-server-users/2008/Apr/msg00117
.html


The problem is that a session is created for RTSP DESCRIBE even though
describe has nothing to do with the RTSP session life cycle and
therefore shouldn't affect reflector sessions. This is however just a
design oddity; the bug is that even though no session reference is kept,
(and rightfully so as it would be a potential leak too) the reference
isn't released at the end of DoDescribe. So, typically, we have:

DESCRIBE (count: 1)
SETUP (count: 2)
TEARDOWN (count: 1) <- should be 0
--
DESCRIBE (count: 2)
SETUP (count: 3)
TEARDOWN (count: 2) <- should be 0

.... and so on. The ref count increases with every stream played,
eventually even causing an assertion failure in OSRefTable::Release.

The solution is to release the session reference at the end of
DoDescribe and delete the session unless referenced by RTP outputs.

Patch against 6.0.3 is attached: The multicast group is now left as
expected and routing stops after regular teardown or session timeout.

Cheers,
Basil

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Streaming-server-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ReflectorSession leakage (From: "Basil Achermann" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.