Re: Networking framework crash

2015-02-05 Thread Kyle Sluder
On Thu, Feb 5, 2015, at 06:40 PM, Roland King wrote: > > > On 6 Feb 2015, at 8:29 am, Graham Cox wrote: > > > > > >> On 6 Feb 2015, at 11:18 am, Roland King wrote: > >> > >> whatever Graham did to launch his process in this case got 256, which I > >> haven’t yet found a way to get a process

Re: Networking framework crash

2015-02-05 Thread Roland King
> On 6 Feb 2015, at 8:29 am, Graham Cox wrote: > > >> On 6 Feb 2015, at 11:18 am, Roland King wrote: >> >> whatever Graham did to launch his process in this case got 256, which I >> haven’t yet found a way to get a process on 10.10 to do by default yet >> barring making launchd launch it. >

Re: Networking framework crash

2015-02-05 Thread Graham Cox
> On 6 Feb 2015, at 11:18 am, Roland King wrote: > > whatever Graham did to launch his process in this case got 256, which I > haven’t yet found a way to get a process on 10.10 to do by default yet > barring making launchd launch it. I simply double-clicked it in the Finder. This is on 10.10

Re: Networking framework crash

2015-02-05 Thread Kyle Sluder
On Thu, Feb 5, 2015, at 05:54 PM, Graham Cox wrote: > > > On 6 Feb 2015, at 6:48 am, Greg Parker wrote: > > > > You can use getrlimit(RLIMIT_NOFILE, …) to query the limit in your process, > > and setrlimit(RLIMIT_NOFILE, …) to attempt to raise it. The default limit > > may be as low as 256, de

Re: Networking framework crash

2015-02-05 Thread Roland King
> >> >> If you hit that limit you should see errors from various network API. File a >> bug report if you find some API that causing weird crashes instead of >> failing gracefully or halting with an appropriate error message when you run >> out of file descriptors. > > Well I'm seeing EXC_GUA

Re: Networking framework crash

2015-02-05 Thread Greg Parker
> On Feb 5, 2015, at 3:54 PM, Graham Cox wrote: > > This is great. Running from XCode I get 7168, archiving and exporting a final > build of my app, I get 256... bingo! Only the built version was seeing this > crash, another reason I was having a lot of trouble debugging it. > > With 50 tasks

Re: Networking framework crash

2015-02-05 Thread Graham Cox
> On 6 Feb 2015, at 6:48 am, Greg Parker wrote: > > You can use getrlimit(RLIMIT_NOFILE, …) to query the limit in your process, > and setrlimit(RLIMIT_NOFILE, …) to attempt to raise it. The default limit may > be as low as 256, depending on OS version and on how the process is launched. > (No

Re: Networking framework crash

2015-02-05 Thread Greg Parker
> On Feb 4, 2015, at 8:21 PM, Graham Cox wrote: > > 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

Re: Networking framework crash

2015-02-05 Thread Jens Alfke
> On Feb 5, 2015, at 7:22 AM, Roland King wrote: > > all of which seems to indicate processes have plenty more than 256 file > descriptors available by default. I thought 256 was left behind as a default > long ago because it was way too small. It was definitely 256 as recently as OS X 10.8

Re: Networking framework crash

2015-02-05 Thread Michael Nickerson
> On Feb 5, 2015, at 10:22 AM, Roland King wrote: > > >> >> Everything is a file descriptor. Open files, sockets, loaded frameworks & >> bundles, even STDIN/OUT/ERROR. >> >> You can check if you're hitting the limit of file descriptors by >> (temporarily) raising the number you can have ope

Re: Networking framework crash

2015-02-05 Thread Roland King
> > Everything is a file descriptor. Open files, sockets, loaded frameworks & > bundles, even STDIN/OUT/ERROR. > > You can check if you're hitting the limit of file descriptors by > (temporarily) raising the number you can have open with setrlimit(). If you > raise it and your app stops crash

Re: Networking framework crash

2015-02-05 Thread Michael Nickerson
>> On Feb 4, 2015, at 9:49 PM, Graham Cox wrote: >> On 5 Feb 2015, at 12:20 pm, Roland King wrote: >> >> You should google EXC_GUARD, it’s interesting. >> >> 0x400200fe >> >> the 02 in the middle says the guard is in dup(), which it is. The 0xfe at >> the end tells you what file des

Re: Networking framework crash

2015-02-05 Thread Roland King
> > 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 k

Re: Networking framework crash

2015-02-04 Thread Graham Cox
> On 5 Feb 2015, at 2:14 pm, Roland King wrote: > >> >> >> I am googling EXC_GUARD but haven't found anything that breaks it down - >> just a bunch of people asking what it is. >> > > Really? Google sent me to twitter sent me to devforums sent me to eskimo1. eg > > https://devforums.apple.

Re: Networking framework crash

2015-02-04 Thread Roland King
> > > I am googling EXC_GUARD but haven't found anything that breaks it down - just > a bunch of people asking what it is. > Really? Google sent me to twitter sent me to devforums sent me to eskimo1. eg https://devforums.apple.com/message/914791#914791

Re: Networking framework crash

2015-02-04 Thread Michael Crawford
> No disrespect, but after 30+ years of developing, I am roughly conversant > with debugging strategies. My apologies, I sent my spam before noting who I was sending it to. Of course I know you've been a coder, actually for quite a longer time than I have. There are some other considerations tha

Re: Networking framework crash

2015-02-04 Thread Graham Cox
> On 5 Feb 2015, at 1:53 pm, Michael Crawford wrote: > > This Spam Has Been Brought To You By: No disrespect, but after 30+ years of developing, I am roughly conversant with debugging strategies. This is not an easy one to isolate, because there's very little information on EXC_GUARD that I

Re: Networking framework crash

2015-02-04 Thread Michael Crawford
There are all kinds of ways that your bug could be somewhere else, other than where the processor finds an illegal instruction that generates an exception that yields your panic. There are a number of strategies for dealing with this that are quite a lot easier than single-stepping with a debugger

Re: Networking framework crash

2015-02-04 Thread Graham Cox
> On 5 Feb 2015, at 12:28 pm, Alex Zavatone wrote: > > Hard to tell without the code that surrounds it. That's the problem - there is no code that surrounds it. I'm using the NSURLSession/NSURLSessionDataTask interface. This internally calls down into operation queues, low level networking,

Re: Networking framework crash

2015-02-04 Thread Alex Zavatone
Hard to tell without the code that surrounds it. On Feb 4, 2015, at 8:00 PM, Graham Cox wrote: > Anyone seen this? My fault, or...? > > OS Version:Mac OS X 10.10.2 (14C109) > Report Version:11 > Anonymous UUID:41C0442D-1002-83C7-8C29-1DCC8E683B2F > > Sleep/Wake UUID:

Re: Networking framework crash

2015-02-04 Thread Roland King
You should google EXC_GUARD, it’s interesting. 0x400200fe the 02 in the middle says the guard is in dup(), which it is. The 0xfe at the end tells you what file descriptor it’s on. (0xfe .. really, seems unusually if not impossibly large for a file descriptor, you got that many files op

Networking framework crash

2015-02-04 Thread Graham Cox
Anyone seen this? My fault, or...? OS Version:Mac OS X 10.10.2 (14C109) Report Version:11 Anonymous UUID:41C0442D-1002-83C7-8C29-1DCC8E683B2F Sleep/Wake UUID: 5DE82D59-D0D8-4695-A86E-23F6ABBFAEAB Time Awake Since Boot: 30 seconds Time Since Wake: 6200