Re: NSPipe eating up all available pipes on system.
Re: NSPipe eating up all available pipes on system.
- Subject: Re: NSPipe eating up all available pipes on system.
- From: "Mr. Gecko" <email@hidden>
- Date: Wed, 20 Feb 2013 16:56:07 -0600
Looks like every pipe is leaking. I cannot see a way to prevent the leak myself as I know the NSPipes are being released. It doesn't seem to crash with Auto Reference Counting… But boy, it eats memory and still leaks. So I would think this is an Apple bug.
On Feb 20, 2013, at 4:31 PM, Ken Thomases <email@hidden> wrote:
> On Feb 20, 2013, at 4:10 PM, Mr. Gecko wrote:
>
>> I have written a daemon that listens for an incoming connection, runs a process using NSTask, and sends the output to the connection. After a couple of hours of receiving connections at varying lengths of time… The system has all of it's pipes taken, and the process stops sending responses to the connections. I know that the pipes are all taken because... If I was to run something in terminal such as "cat Makefile | less", less will not output anything. If I was to run git log, I would not get anything (git log outputs the history of a repository to less via a pipe).
>>
>> I made a test which shows the issue with an exception… Can someone help me find out how to close the pipes or something of the sort?
>
> Run your program under the Object Allocations and Leaks instruments and see if it can identify NSPipe objects that are still alive after you think they shouldn't be. Then use the object retain/release history to try to figure out why.
>
> I didn't immediately see any memory management bugs. Can't hurt to have the static analyzer check, too.
>
> Regards,
> Ken
>
_______________________________________________
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