8.8.8.8 as preferred DNS server causes SkyrimTogetherServer.exe to crash clients
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 throwingServer could not reach the server list! Connectionerror 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
- Set 8.8.8.8 (or any other IP which can't resolve this) as a preferred DNS server on a host machine.
- Start SkyrimTogetherServer.exe.
- Start SkyrimTogether.exe on clients.
- Load saved games with fresh characters standing outside of Helgen cave a few meters apart.
- Connect to the server.
- 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.
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