Re: Weirdness in my PowerBook. /bin/ps spawned by NSTask never exits
Re: Weirdness in my PowerBook. /bin/ps spawned by NSTask never exits
- Subject: Re: Weirdness in my PowerBook. /bin/ps spawned by NSTask never exits
- From: Dirk Stegemann <email@hidden>
- Date: Sun, 2 Apr 2006 13:43:01 +0300
Hello,
did you by any change hit the maximum limit for running processes?
It happened once in a while on my PB (until I increased it manually),
usually after some weeks of uptime (sometimes earlier); the symptoms
are usually more global than yours, though: different programs "hang"
while launching, others don't (maybe because some applications'
launching results in launching child processes, others don't).
I'd try to verify by opening a couple of Terminal windows, each
hosting a new process ("top", or whatever).
Best regards,
Dirk Stegemann
Am 02.04.2006 um 07:20 schrieb Jerry Krinock:
My app needs info about other running processes when it launches,
and due to
the limitations of NSWorkspace, I create an NSTask to do
/bin/ps -xca -o pid -o command -o user
and then -waitUntilExit. All in the main thread. Released this
code 6
months ago, no problems.
Today, while testing an update, I found my app hanging on -
waitUntilExit.
After much head-scratching, I launched our latest public release
and it
hangs upon launch too. OH MY GOSH!!
What could cause this? This powerbook is otherwise running OK,
except that
I see that it has a couple dozen zombie processes named
"(smbclient)" and
"(nmblookup)". I imagine a restart would "fix" it, but of course I
want to
nail this bug before it happens to a real user.
Prior to this NSTask, the app launches another NSTask to do
/usr/bin/uuidgen. That task works fine.
But this is some kind of Cocoa problem, because if I paste that /
bin/ps...
command into a Terminal window and hit return it works fine there.
Also, if I do a "ps" in Terminal, I see that the other "ps" spawned
by my
app is indeed stuck in state (STAT) Ss, which means that it is in
interruptible sleep, waiting for some child process to complete,
and has
made itself a session leader. If I kill it, my app un-hangs and
continues
as expected.
I'll take any little clues I can get. Of course, I could spawn a
thread to
monitor this NSTask, time out, and notify the user of the problem.
But I
want to say more than "DUHHHHH. Try a restart?"
Jerry Krinock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden