connect() iOS 18.5 Developer Beta (22EF5042g)

Hello! 👋

I am noticing new failures in the iOS 18.5 Developer Beta build (22EF5042g) when calling the system call connect() (from C++ source, in network extension).

When using cell/mobile data (Mint & T-Mobile) this returns with EINTR (interrupted system call) right away. When I switch over to wifi, everything works fine.

Note: I have not tested on other mobile carriers; which could make a difference since T-Mobile/Mint are IPv6 networks.

FWIW, this is working in the previous developer beta (18.4).

Anyone have any ideas?

Answered by DTS Engineer in 833847022

While I agree with darkpaw’s advice in general — if your app suddenly stops working on a beta seed, filing a compatibility bug is always a good idea — the connect system call is documented to return EINTR and your BSD Sockets code should be handling that error.

[searches for an explanation of this]

Oh, wow, it seems that Past Quinn™ did me a solid and wrote this up in depth: Understanding `EINTR`.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Have you raised a Feedback report? If not, please do so at https://feedbackassistant.apple.com/ then post the FB number here.

While I agree with darkpaw’s advice in general — if your app suddenly stops working on a beta seed, filing a compatibility bug is always a good idea — the connect system call is documented to return EINTR and your BSD Sockets code should be handling that error.

[searches for an explanation of this]

Oh, wow, it seems that Past Quinn™ did me a solid and wrote this up in depth: Understanding `EINTR`.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Past Quinn™…and Present Quinn for the response (and countless others I have read over the years, while of lurking in the corner)

We are handling EINTR, there is no crash and we do retry. Let me do some more research and maybe write a test driver and see if I can narrow this down. Our app has worked for years and started acting up on this seed.

I have tried many things, here and I am starting to suspect a bug in the beta.

After getting EINTR once, I retry only to get EADDRINUSE over and over; before I give up. I have also tried setting the socket option SO_REUSEADDR and this does not help.

I have also tried with and without O_NONBLOCK, no luck.

While on mobile data, its always:

  • connect()->EINTR->EADDRINUSE

Switching to wifi (without restarting the app) and things start to work.

This is happening from the "Packet Tunnel" network extension part of the app... something subtle has changed somwhere - Hopefully the beta developers are aware or have some insight.

Accepted Answer

Update - The new 18.5 Beta 2 build from today 22F5053f completely resolves the issue.

connect() iOS 18.5 Developer Beta (22EF5042g)
 
 
Q