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

[WIP] Fix network hanging issues #8756

Closed
wants to merge 3 commits into from

Conversation

sepalani
Copy link
Contributor

@sepalani sepalani commented Apr 22, 2020

This PR should truly fix: https://dolp.in/i11867

What happened (assuming there is no timing issues):

  1. The receive thread is on a blocking RecvFrom call
  2. The game calls SOCleanup which:
    • fires IOCTL_NWC24_CLEANUP_SOCKET
    • calls IOS_Close on the network handle
    • sets soState = 1 (soState = 2 before this)
  3. The game calls SOClose but ioctlv isn't fired because soState = 1

In other words, RecvFrom won't get a response and will wait forever (since Dolphin doesn't receive IOCTL_SO_CLOSE), again...

It might require a hardware test to confirm that's the intended behaviour.

Ready to be reviewed.

@sepalani sepalani changed the title IOS/KD: Cleanup sockets on IOCTL_NWC24_CLEANUP_SOCKET [WIP] Fix network hanging issues Apr 22, 2020
@sepalani
Copy link
Contributor Author

@sepalani sepalani commented Apr 22, 2020

I added a timeout on blocking connect call based on this hardware test. Beware that it tries to connect to an ubisoft server (which timeout after ~3 minutes on hardware).

wii-connect-timeout.zip

I'll need to reverse IOS to confirm that behaviour, however.

@sepalani
Copy link
Contributor Author

@sepalani sepalani commented Apr 22, 2020

Since all these commits will require appropriate hwtest, I'll split them in different PRs.

@leoetlino leoetlino closed this Apr 27, 2020
@sepalani sepalani deleted the kd-cleanup branch Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants