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

Deadlock in ReliableSequencedChannel.HandleAck(ArraySegment<byte> payload) #40

Open
THplusplus opened this issue May 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@THplusplus
Copy link

Describe the bug
Endless loop due to wrong data type in counter variable i.

To Reproduce
I don't have enough understanding of the inner workings to tell how exactly to reproduce this. However it's obvious that the for loop in ReliableSequencedChannel.HandleAck(ArraySegment<byte> payload) can never complete when bits is greater than 255. Not sure IF bits should ever be greater than 255, but it is in my case. The debugger shows a value of 4128 in my case.
Same issue may probably occur in ReliableChannel as well.

Expected behavior
It shouldn't lock up. Either the counter i should be of type int or it should be guaranteed that bits can never exceed 255.

Environment (please complete the following information):

  • OS: Debian 11
  • Unity Version: N/A (this is a pure .NET 7 application)
  • Ruffles Version: 11.1.9
  • Ruffles Commit: aab94e4

Additional context
The deadlock occurs after a few minutes during loadtests of my game server. It is possible that the game server is sending or receiving too much data which may increase the chance of this issue ocurring.

@THplusplus THplusplus added the bug Something isn't working label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant