[Live-devel] A question about thread safety.

Jeff Shanab jshanab at smartwire.com
Sat Apr 6 08:58:12 PDT 2013


I know live555 is an event model application and thread safety must be added if needed.

I pull and record from hundreds of cameras. Because of some OS limitaitions I can only wait on a maximum of 64 events.

So I have threads called processors for each group of 60 sources. Each of these has their own UsageEnvironment and TaskScheduler and event loop.

Is this a reliable architecture?

I do have an occasional access violation in Medium::~Medium() in units in the field, but today's problem is distinctly different.
It only occurs with one brand of camera.
    Am I correct in assuming no camera, no matter how bad the stream, should be able to crash live555?

The access violation always occurs in the same location.
 On the delete packet; line of

 ReorderingPacketBuffer::freePacket(BufferedPacket* packet){

    if (packet != fSavedPacket) {

      delete packet;

    } else {

      fSavedPacketFree = True;

    }

  }



In all inspections of memory the packet, whose pointer is not null, appears to already be destructed. The fBuf and vPtr are a special value 0xdddddddd which is Microsofts way of saying this memory was explicitly deleted.



The call stack always shows we are a few frames down from MultiFramedRTPSource::networkReadHandler1() and I was trying to figure it out.

I came across a question. Given the implementation of bytesAvailable() should the line "if bPacket->bytesavailable() == 0)..." be if bPacket->bytesavailable() <= 0)..."



I am looking for suggestions on where to look for the source of this problem. Simple or scaled down examples do not have a problem. Valgrind like tools on windows have a high overhead and also seem to effect the occurrence. (Indicates a race!)



Thanks


   Jeff Shanab, Manager-Software Engineering
   D 630.633.4515 | C 630.453.7764 | F 630.633.4815 | jshanab at smartwire.com<mailto:jshanab at smartwire.com>
[MVSSig]






This message and any attachments contain confidential and proprietary information, and may contain privileged information, belonging to one or more affiliates of Windy City Wire Cable & Technology Products, LLC. No privilege is waived by this transmission. Unauthorized use, copying or disclosure of such information is prohibited and may be unlawful. If you receive this message in error, please delete it from your system, destroy any printouts or copies of it, and notify the sender immediately by e-mail or phone.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130406/a3aade56/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 18265 bytes
Desc: image001.gif
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130406/a3aade56/attachment-0001.gif>


More information about the live-devel mailing list