• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Networking framework crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Networking framework crash


  • Subject: Re: Networking framework crash
  • From: Roland King <email@hidden>
  • Date: Thu, 05 Feb 2015 17:38:34 +0800

>
> Yep, I found that just after I sent my previous. Interesting, though a little difficult to relate exactly to my crash. I guess tcp_connection_get_socket() creates a file handle for the socket stream (?? guessing) and that's the one tripping the EXC_GUARD.
>
> Do you or anyone else know if there's some inherent limit to the number of simultaneous sockets that can be opened? I'm supposing that there's a 1:1 correspondence between a NSURLSession and a socket, because of the description against [NSURLSession resetWithCompletionHandler:] says:

Yes there is an inherent limit to the number of sockets which can be opened. 	It's limited by the number of filehandles you can have open which you fin by running ulimit -n and on my machine that gives 2560 when run from a shell (oh how things have changed!), so you're probably not running into that.

I really can't decide whether the filehandle you're getting the exception on, 254, is high or not. You have probably 50 sockets open but I have no idea how many filehandles a generic process 'just uses' in the course of being a generic process. Since OSX doesn't have a /proc filesystem, it's not that easy to tell.

>
> "This method empties all cookies, caches and credential stores, removes disk files, flushes in-progress downloads to disk, and ensures that future requests occur on a new socket"
>
> This implies that there's a socket associated with the session.
>
> Since I have also a 1:1 correspondence between my app's individual tasks and NSURLSession, I'm opening 1 socket per task as my app starts. So around 50 in my current test situation.
>
>
>> if you aren’t opening your own files/creating your own filehandles I suspect you have a bugreport in your future.
>>
>> You might also try a post in CoreOS on devforums or on the networking apple mail list as that’s where Quinn hangs out.
>
>
> That sounds like a good thing to try.
>
> --Graham
>
>


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Networking framework crash (From: Graham Cox <email@hidden>)
 >Re: Networking framework crash (From: Alex Zavatone <email@hidden>)
 >Re: Networking framework crash (From: Graham Cox <email@hidden>)
 >Re: Networking framework crash (From: Roland King <email@hidden>)
 >Re: Networking framework crash (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Self describing NSObjects.
  • Next by Date: Re: Networking framework crash
  • Previous by thread: Re: Networking framework crash
  • Next by thread: Re: Networking framework crash
  • Index(es):
    • Date
    • Thread