Skip to content

Infinite loop -> OOM in SampleBuilder edge case #1810

@kcking

Description

@kcking

If the s.buildSample call inside of purgeBuffers happens to find a complete packet, s.active is updated to s.consume.tail

s.active.head = consume.tail
, but then the loop condition is triggered again in purgeBuffers and s.active is reset back to s.filled, causing the same packet to be unmarhsaled over and over in a tight loop. I changed the continue to return which seems to fix this behavior for me, but there might be a more correct solution

Your environment.

  • Version: webrtc master d625f6f
  • Browser: Chrome
  • Using samplebuilder in ion-avp

What did you do?

Saw this issue in SampleBuilder used in ion-avp connected to ion-sfu, caused by a vp8 stream sent from chrome specifically when some minor packet reordering occurred.

What did you expect?

Reconstruct packets even with reordering

What happened?

Infinite loop + OOM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions