[Live-devel] Media server stack overflow when large number of streams started simultaneously

John Finlay j.finlay at indigovision.com
Mon Apr 18 07:35:25 PDT 2016


Hi

We are experiencing a stack overflow in Live555 Media Server (version 2016.04.01) when trying to simultaneously start a large number of streams that are all using the same H264 source file. In our test we are trying to simultaneously start 200 streams however I have observed the issue happening with as few as 40 being started simultaneously.

The issue seems to be occurring due to the way Live555 generates the SDP line it sends back to the client in response to the RTSP DESCRIBE request. When getAuxSDPLine in H264VideoFileServerMediaSubsession is called it makes a recursive call to doEventLoop, from what I understand this is done as it needs to process the first frame of the video to get the values required to generate the SDP line. The issue with this is that if there is another RTSP DESCRIBE request queued waiting to be processed it will result in another call to getAuxSDPLine and a further recursive call to doEventLoop. If there is a large enough number of RTSP DESCRIBE requests queued this recursive calling continues until a stack overflow occurs.

Obviously we could increase the size of the stack when building the application however this isn't really a scalable solution. If anyone has any suggestions of how we could stop this behaviour they would be greatly appreciated.

Thanks,
John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20160418/f71479cb/attachment.html>


More information about the live-devel mailing list