ValveSoftware / GameNetworkingSockets

Reliable & unreliable messages over UDP. Robust message fragmentation & reassembly. P2P networking / NAT traversal. Encryption.
BSD 3-Clause "New" or "Revised" License
8.12k stars 606 forks source link

Library fails on MacOS M1 (ARM64) after upgrading to Sequoia (macOS 15.1) #334

Closed gabeochoa closed 6 days ago

gabeochoa commented 1 week ago

After upgrading to Sequoia (macOS 15.1), the GameNetworkingSockets library no longer works for me on my MacOS M1 (ARM64) machine. I had no issues with my use case or the example programs prior to the upgrade.

I've compiled the example_chat program using the following command:

c++ -std=c++2a example_chat.cpp -lGameNetworkingSockets -Ivendor/ -L. -Lvendor/ The vendor directory contains the necessary includes.

When running the server:

$ ./a.out server --port 773
  0.000051 sockopt(IPPROTO_IP, IP_RECVTOS, 1) failed (0x16), will not be able to read TOS
  0.000107 Server listening on port 773

Client

$ ./a.out client 127.0.0.1:773
  0.000015 Connecting to chat server at 127.0.0.1:773
  0.001990 src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp(2471): Extra control data returned besides TOS?  0x0/0x1b
  0.002015 src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp(2477): No control data returned even though we asked for TOS?
zsh: killed     ./a.out client 127.0.0.1:773

Operating System: MacOS M1 (ARM64) macOS version: 15.1 (Sequoia) Compiler: c++ (clang) Library version: 7c9f441

gabeochoa commented 1 week ago

Just saw https://github.com/ValveSoftware/GameNetworkingSockets/pull/333 where you mention new TOS code, sounds like its a known issue and hopefully will be addressed soon :)

Edit: Looks like c7ae3cb3921... is the last commit that worked and something in e35a154b5d.. broke it.

Glad its not an OS issue, funnily i only ran into this because i got a new laptop and did a fresh clone, had i got the laptop a couple weeks ago I would've never run into this lol

zpostfacto commented 6 days ago

Hi @gabeochoa I reverted the TOS-reading code. Can you let me know if things are working for you?

The new MacOS CI test is still failing, but I think am not sure if the test actually was always just flaky on MacOS. The particular test that is failing might just be sensitive to timing.

zpostfacto commented 6 days ago

Welp, the latest MacOS test run passed. So I think this test is just timing sensitive / flaky, but only on MacOS for some reason.

https://github.com/ValveSoftware/GameNetworkingSockets/actions/runs/10777315919/job/29886132971

Please close this issue if you are fixed. If I don't hear back from you in a few weeks, I'll close it.

gabeochoa commented 6 days ago

I'll pull and checkout the new build when i get home, but im unblocked for now (just using a previous commit)