Symptoms:

        1) 100% loaded one cpu core (one rtpreceiver thread configured)
        2) rtp processing stopped(non empty receive queue on rtp sockets)
        netstat output:
                http://pastebin.com/embed_iframe.php?i=Y1d1Pu8i

Examining in GDB:
        gdb log with comments:
                http://pastebin.com/embed_iframe.php?i=fU4c9p4Q

so, we have strange infinite loop in PacketMem::newPacket() (AmRtpStream.cpp)

this situation may be caused when count of used entries differ from n_used

this can happen only when freePacket() called twice for(after) same newPacket()

        see code:

inline void PacketMem::freePacket(AmRtpPacket* p)
{
  if (!p)  return;

  used[p-packets] = false;
  n_used--;
}

if used[p-packets] already false then n_used become less than real used_entries.


to check this theory I change code of freePacket:

inline void PacketMem::freePacket(AmRtpPacket* p)
{
  if (!p)  return;

  int idx = p-packets;
  if(used[idx]){
        used[idx]  = false;
        n_used--;
  } else {
DBG("freePacket() free already empty entry n_used = %d, idx = %d",n_used,idx);
  }
}

and got following in syslog:

sems[11753]: [/usr/src/sems/core/AmRtpStream.cpp:1159] DEBUG: freePacket() free already empty entry n_used = 0, idx = 0

and many similar lines with n_used = 0 and different idx


after this little patch infinite loop no longer happens

I think that must to be found place where freePacket() called secondly or apply my patch.

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to