TiltedEvolution icon indicating copy to clipboard operation
TiltedEvolution copied to clipboard

8.8.8.8 as preferred DNS server causes SkyrimTogetherServer.exe to crash clients

Open snakecase opened this issue 3 years ago • 1 comments

Description

Two PCs on LAN with identical Skyrim installations:

  • [x] No mods
  • [x] No SKSE
  • [x] Skyrim Together Reborn is the latest version (1.2.0) and was deployed according to wiki
  • [x] Firewall rules identical
  • [x] Windows Defender settings identical
  • [x] Default server settings

But!

  • [ ] PC A has 8.8.8.8 set as a preferred DNS server in Network Adapter properties and PC B has it empty (provided by ISP).

Two scenarios:

  • PC A server & client + PC B client: SkyrimTogetherServer.exe has periods when it stops accepting connections and data for ~1 minute then proceeds working for ~5 minutes, rinse and repeat. It also starts throwing Server could not reach the server list! Connection error several times. After both players connect successfully it's a matter of a few minutes unti one of them (randomly) or rarely both crash. Server keeps running and even accepts further connections but keeps throwing the error and clients keep crashing.

  • PC B server & client + PC A client: No problems. No above-mentioned error.

Steps to reproduce

  1. Set 8.8.8.8 (or any other IP which can't resolve this) as a preferred DNS server on a host machine.
  2. Start SkyrimTogetherServer.exe.
  3. Start SkyrimTogether.exe on clients.
  4. Load saved games with fresh characters standing outside of Helgen cave a few meters apart.
  5. Connect to the server.
  6. Wait until one of the clients or even both crash to Desktop.

Reproduction rate

  • [x] Consistent: I can reproduce this bug by following the steps to reproduce 100% of the time (every time)

Note: it's consistent as long as 8.8.8.8 doesn't resolve skyrim-reborn-list.skyrim-together.com OR my ISP meddles in this particular address somehow. 1.1.1.1 works fine for example.

Culprit

ServerListService.cpp's client.Post("/announce", params) for some reason hangs server long enough to crash clients if it can't get (response) consistently.

snakecase avatar Aug 19 '22 22:08 snakecase

Looks like server announcements should only happen every minute and when a player connects/disconnects. Interesting thing here: the TTL for skyrim-reborn-list is 5 minutes, so your system should reach out to DNS only every 5 minutes. The exact time where the network enters a blocking state may match the timeout before switching to secondary DNS.

What is the secondary DNS server for your system?

I recommend testing a DNS lookup from your system directly to see what sort of response time you get. On windows: (Measure-Command {Resolve-DnsName -Name skyrim-reborn-list.skyrim-together.com -Server 8.8.8.8}).TotalSeconds On linux: dig @8.8.8.8 skyrim-reborn-list.skyrim-together.com

BrysonZimmerman avatar Sep 24 '22 20:09 BrysonZimmerman