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

Race condition for chunkmap access in payloadQueue #114

Closed
cohosh opened this issue Feb 25, 2020 · 4 comments
Closed

Race condition for chunkmap access in payloadQueue #114

cohosh opened this issue Feb 25, 2020 · 4 comments

Comments

@cohosh
Copy link
Contributor

cohosh commented Feb 25, 2020

Your environment.

  • Version: v1.7.5
  • Browser: N/A (Snowflake)
  • Other Information - see Tor ticket #33211

What did you do?

There are more details in the ticket, but we found our application going into a CPU-intensive infinite loop. Profiling pointed us towards the markAllToRetransmit function in payload_queue.go: https://github.com/pion/sctp/blob/master/payload_queue.go#L163

I'm not sure whether the infinite loop behaviour we saw was due to this race condition but it seems plausible.

@enobufs
Copy link
Member

enobufs commented Feb 26, 2020

@cohosh Thanks for your report and the PR.
I recently fixed a bug (#109) that was causing 100% CPU usage which was fixed in v1.7.5. Looking at the Tor ticket #33211, at the very bottom, I see the identical logs reported in #109 and I am wondering if that has already been solved...

You reported above that your environment was pion/sctp v1.7.5 which is supposed to have the fix. Could you please double-check if the Snowflake version experiencing the problem was actually using pion/sctp v1.7.5? (The last tag for pion/webrtc is v2.2.0 which still uses pion/sctp v1.7.4).

@Sean-Der
Copy link
Member

Hey @cohosh @enobufs!

I tagged v2.2.1 I am working on profiling stuff (ICE performance) and coincidentally tagged it.

thanks!

@cohosh
Copy link
Contributor Author

cohosh commented Feb 26, 2020

Hey @enobufs I think you're right. I wasn't actually able to reproduce the bug myself using the latest version. I'm guessing this is the issue. Thanks for that!

@enobufs
Copy link
Member

enobufs commented Feb 27, 2020

@cohosh Let me close this case. (If it happens with pion/[email protected], please reopen this.)

@enobufs enobufs closed this as completed Feb 27, 2020
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 a pull request may close this issue.

3 participants