Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed in FEC crash when a large number of dropped packets occur causi… #892

Merged
merged 2 commits into from Sep 30, 2019

Conversation

RobEwbank
Copy link
Contributor

…ng celloff to become negative and therefore accessing out of bounds for rcv.cells deque. This crash can be reproduced by putting Clumsy.exe (Dropped packet / latency simulator) between two machines and turning on lag (200ms will do it) and then turning it off, this causes a consistent crash of SRT.

Following this, SRT does not recover it outputs the following errors:
17:04:49.149217E:SRT.c: FEC/V: OFFSET=22 exceeds maximum col container size, SHRINKING container by 10
17:04:49.149331
E:SRT.c: FEC/V: IPE: removal of 10 rows ships no same seq: rowbase=%2098878350 colbase=%2098878250 -> %2098878058 - RESETTING ROWS

OR:
17:28:48.626315E:SRT.c: FEC/V: OFFSET=29 exceeds maximum col container size, SHRINKING container by 10
17:28:48.626404
E:SRT.c: FEC/V: IPE: removal of 10 rows ships no same seq: rowbase=%601155798 colbase=%601155698 -> %601155504 - RESETTING ROWS

Where it gets into an non working state.

…ng celloff to become negative and therefore accessing out of bounds for rcv.cells deque. This crash can be reproduced by putting Clumsy.exe (Dropped packet / latency simulator) between two machines and turning on lag (200ms will do it) and then turning it off, this causes a consistent crash of SRT.
srtcore/fec.cpp Outdated
@@ -696,7 +696,7 @@ bool FECFilterBuiltin::receive(const CPacket& rpkt, loss_seqs_t& loss_seqs)
// be simultaneously also retransmitted. This may confuse the tables.
int celloff = CSeqNo::seqoff(rcv.cell_base, rpkt.getSeqNo());
bool past = celloff < 0;
bool exists = celloff < int(rcv.cells.size()) && rcv.cells[celloff];
bool exists = celloff < int(rcv.cells.size()) && celloff >= 0 && rcv.cells[celloff];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change it to !past as the first condition in the definition of exists. At least it makes it more readable.

@rndi rndi merged commit c39b88a into Haivision:master Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants