Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Is KQueue still broken on Darwin?

 
   Mac (Home) -> General Discussion RSS
Next:  Per-target names for Xcode stlib project  
Author Message
SM Ryan

External


Since: Aug 18, 2005
Posts: 16



(Msg. 1) Posted: Mon Apr 16, 2007 4:04 pm
Post subject: Is KQueue still broken on Darwin?
Archived from groups: comp>unix>programmer, others (more info?)

I have a program that gets in an uninterruptible wait for
hours and days. I'm using sockets and kqueue. I have never
had problems with sockets before, but kqueue used to crash
the kernel. Does anyone know if kqueue still borks the machine?

kill -KILL doesn't work. of course, but a killall -KILL kills
a related program to which it has a socket connection, but
leaves the program as a zombie which launchd does not reap
or restart.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
She broke your heart and inadvertently drove men to deviant lifestyles.
Back to top
Login to vote
Gregory Weston

External


Since: Jun 06, 2005
Posts: 660



(Msg. 2) Posted: Mon Apr 16, 2007 4:04 pm
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: comp>sys>mac>programmer>misc (more info?)

In article <13277khfed5tv24.TakeThisOut@corp.supernews.com>,
SM Ryan <wyrmwif.TakeThisOut@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:

> I have a program that gets in an uninterruptible wait for
> hours and days. I'm using sockets and kqueue. I have never
> had problems with sockets before, but kqueue used to crash
> the kernel. Does anyone know if kqueue still borks the machine?

It never has for me. What's the nature and circumstance of the
misbehavior you're seeing?
Back to top
Login to vote
Sherm Pendley

External


Since: Dec 12, 2006
Posts: 27



(Msg. 3) Posted: Mon Apr 16, 2007 5:06 pm
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: comp>unix>programmer, others (more info?)

SM Ryan <wyrmwif RemoveThis @tango-sierra-oscar-foxtrot-tango.fake.org> writes:

> I have a program that gets in an uninterruptible wait for
> hours and days. I'm using sockets and kqueue. I have never
> had problems with sockets before, but kqueue used to crash
> the kernel. Does anyone know if kqueue still borks the machine?

Never heard about it crashing the kernel before, but kqueue received a
substantial overhaul in Tiger. Spotlight uses it to index updated files,
Finder to update its display immediately, etc.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Back to top
Login to vote
Gregory Weston

External


Since: Jun 06, 2005
Posts: 660



(Msg. 4) Posted: Mon Apr 16, 2007 6:12 pm
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: comp>sys>mac>programmer>misc (more info?)

In article <m27iscyqon.fsf DeleteThis @local.wv-www.com>,
Sherm Pendley <spamtrap DeleteThis @dot-app.org> wrote:

> SM Ryan <wyrmwif DeleteThis @tango-sierra-oscar-foxtrot-tango.fake.org> writes:
>
> > I have a program that gets in an uninterruptible wait for
> > hours and days. I'm using sockets and kqueue. I have never
> > had problems with sockets before, but kqueue used to crash
> > the kernel. Does anyone know if kqueue still borks the machine?
>
> Never heard about it crashing the kernel before, but kqueue received a
> substantial overhaul in Tiger. Spotlight uses it to index updated files,
> Finder to update its display immediately, etc.

I know about Finder, but do you have any reference for Spotlight using
kqueue? That seems really wrong and/or fragile.

G
Back to top
Login to vote
Michael Ash

External


Since: Mar 21, 2006
Posts: 164



(Msg. 5) Posted: Mon Apr 16, 2007 6:12 pm
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston <uce.TakeThisOut@splook.com> wrote:
> In article <m27iscyqon.fsf.TakeThisOut@local.wv-www.com>,
> Sherm Pendley <spamtrap.TakeThisOut@dot-app.org> wrote:
>
>> SM Ryan <wyrmwif.TakeThisOut@tango-sierra-oscar-foxtrot-tango.fake.org> writes:
>>
>> > I have a program that gets in an uninterruptible wait for
>> > hours and days. I'm using sockets and kqueue. I have never
>> > had problems with sockets before, but kqueue used to crash
>> > the kernel. Does anyone know if kqueue still borks the machine?
>>
>> Never heard about it crashing the kernel before, but kqueue received a
>> substantial overhaul in Tiger. Spotlight uses it to index updated files,
>> Finder to update its display immediately, etc.
>
> I know about Finder, but do you have any reference for Spotlight using
> kqueue? That seems really wrong and/or fragile.

It is wrong. Spotlight uses fsevent, a private API which is presumably
related to kqueue in some fashion. Kqueue simply wouldn't work for
spotlight since it doesn't allow monitoring entire trees of a filesystem
without opening a file descriptor on every directory within, which is
impractical when doing the entire hard drive.

For more details on what Spotlight is doing, see this page:

http://www.kernelthread.com/software/fslogger/

--
Michael Ash
Rogue Amoeba Software
Back to top
Login to vote
Sherm Pendley

External


Since: Dec 12, 2006
Posts: 27



(Msg. 6) Posted: Mon Apr 16, 2007 6:45 pm
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston <uce.RemoveThis@splook.com> writes:

> In article <m27iscyqon.fsf.RemoveThis@local.wv-www.com>,
> Sherm Pendley <spamtrap.RemoveThis@dot-app.org> wrote:
>
>> SM Ryan <wyrmwif.RemoveThis@tango-sierra-oscar-foxtrot-tango.fake.org> writes:
>>
>> > I have a program that gets in an uninterruptible wait for
>> > hours and days. I'm using sockets and kqueue. I have never
>> > had problems with sockets before, but kqueue used to crash
>> > the kernel. Does anyone know if kqueue still borks the machine?
>>
>> Never heard about it crashing the kernel before, but kqueue received a
>> substantial overhaul in Tiger. Spotlight uses it to index updated files,
>> Finder to update its display immediately, etc.
>
> I know about Finder, but do you have any reference for Spotlight using
> kqueue? That seems really wrong and/or fragile.

I can't recall where I first read that, but at the time I didn't know too
much about kqueue and simply accepted it as read. Googling for "spotlight
kqueue" wasn't very enlightening - lots of people saying it uses it, and
lots of people saying it doesn't.

Now that you mention it though, it does seem wrong; to use kqueue, Spotlight
would have had to register interest in every last file and directory, which
I can't imagine that it does.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Back to top
Login to vote
SM Ryan

External


Since: Aug 18, 2005
Posts: 16



(Msg. 7) Posted: Mon Apr 16, 2007 7:06 pm
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston <uce DeleteThis @splook.com> wrote:
# In article <13277khfed5tv24 DeleteThis @corp.supernews.com>,
# SM Ryan <wyrmwif DeleteThis @tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
#
# > I have a program that gets in an uninterruptible wait for
# > hours and days. I'm using sockets and kqueue. I have never
# > had problems with sockets before, but kqueue used to crash
# > the kernel. Does anyone know if kqueue still borks the machine?
#
# It never has for me. What's the nature and circumstance of the
# misbehavior you're seeing?

It hangs on customer machines not mine where I cannot examine it
too closely (no gdb, etc). It monitors the file system, running
kqueue on up to 2000 disk inodes. It has a unix domain socket
to another process. When I look at with ps -x the status is Us.
If I kill the companion process, one of the threads will abort
the entire process on a broken pipe; then the status is Es and
it's still hung.

This can persist for days, until someone notices it. The only
recovery I know of is a reboot. I do know kqueue panicked 10.3.
I wonder if it's still broken or 10.4.9 broke it.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
Why are we here?
whrp
Back to top
Login to vote
Gregory Weston

External


Since: Jun 06, 2005
Posts: 660



(Msg. 8) Posted: Mon Apr 16, 2007 7:06 pm
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <1327i8uinfdkk99 DeleteThis @corp.supernews.com>,
SM Ryan <wyrmwif DeleteThis @tango-sierra-oscar-foxtrot-tango.fake.org> wrote:

> Gregory Weston <uce DeleteThis @splook.com> wrote:
> # In article <13277khfed5tv24 DeleteThis @corp.supernews.com>,
> # SM Ryan <wyrmwif DeleteThis @tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
> #
> # > I have a program that gets in an uninterruptible wait for
> # > hours and days. I'm using sockets and kqueue. I have never
> # > had problems with sockets before, but kqueue used to crash
> # > the kernel. Does anyone know if kqueue still borks the machine?
> #
> # It never has for me. What's the nature and circumstance of the
> # misbehavior you're seeing?
>
> It hangs on customer machines not mine where I cannot examine it
> too closely (no gdb, etc). It monitors the file system, running
> kqueue on up to 2000 disk inodes. It has a unix domain socket
> to another process. When I look at with ps -x the status is Us.
> If I kill the companion process, one of the threads will abort
> the entire process on a broken pipe; then the status is Es and
> it's still hung.
>
> This can persist for days, until someone notices it. The only
> recovery I know of is a reboot. I do know kqueue panicked 10.3.
> I wonder if it's still broken or 10.4.9 broke it.

I've got a few thousand users running a program that's been reliant on
kqueue for ... about 2.5 years now. Seems like there's got to me more
detail than "kqueue panicked 10.3."

What I'm kind of getting at is that maybe you're not looking at the
right culprit.
Back to top
Login to vote
SM Ryan

External


Since: Aug 18, 2005
Posts: 16



(Msg. 9) Posted: Tue Apr 17, 2007 12:05 am
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston <uce RemoveThis @splook.com> wrote:
# In article <1327i8uinfdkk99 RemoveThis @corp.supernews.com>,
# SM Ryan <wyrmwif RemoveThis @tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
#
# > Gregory Weston <uce RemoveThis @splook.com> wrote:
# > # In article <13277khfed5tv24 RemoveThis @corp.supernews.com>,
# > # SM Ryan <wyrmwif RemoveThis @tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
# > #
# > # > I have a program that gets in an uninterruptible wait for
# > # > hours and days. I'm using sockets and kqueue. I have never
# > # > had problems with sockets before, but kqueue used to crash
# > # > the kernel. Does anyone know if kqueue still borks the machine?
# > #
# > # It never has for me. What's the nature and circumstance of the
# > # misbehavior you're seeing?
# >
# > It hangs on customer machines not mine where I cannot examine it
# > too closely (no gdb, etc). It monitors the file system, running
# > kqueue on up to 2000 disk inodes. It has a unix domain socket
# > to another process. When I look at with ps -x the status is Us.
# > If I kill the companion process, one of the threads will abort
# > the entire process on a broken pipe; then the status is Es and
# > it's still hung.
# >
# > This can persist for days, until someone notices it. The only
# > recovery I know of is a reboot. I do know kqueue panicked 10.3.
# > I wonder if it's still broken or 10.4.9 broke it.
#
# I've got a few thousand users running a program that's been reliant on
# kqueue for ... about 2.5 years now. Seems like there's got to me more
# detail than "kqueue panicked 10.3."

http://www.google.com/search?hl=en&safe=off&client=safari&rls=en&q=kqu...+kernel

It's well known kqueue was broken on 10.3. I still start whenever
a window fills with grey top to bottom.

# What I'm kind of getting at is that maybe you're not looking at the
# right culprit.

Problem for me is I really don't know what the culprit is
or how to track it down. Something is putting the process
into uninterruptible wait. Usually that means broken I/O,
but attached disks look fine.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
She broke your heart and inadvertently drove men to deviant lifestyles.
Back to top
Login to vote
Gregory Weston

External


Since: Jun 06, 2005
Posts: 660



(Msg. 10) Posted: Tue Apr 17, 2007 12:05 am
Post subject: Re: Is KQueue still broken on Darwin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <13283qfb2h7a4de.DeleteThis@corp.supernews.com>,
SM Ryan <wyrmwif.DeleteThis@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:

> Gregory Weston <uce.DeleteThis@splook.com> wrote:
> # In article <1327i8uinfdkk99.DeleteThis@corp.supernews.com>,
> # SM Ryan <wyrmwif.DeleteThis@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
> #
> # > Gregory Weston <uce.DeleteThis@splook.com> wrote:
> # > # In article <13277khfed5tv24.DeleteThis@corp.supernews.com>,
> # > # SM Ryan <wyrmwif.DeleteThis@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
> # > #
> # > # > I have a program that gets in an uninterruptible wait for
> # > # > hours and days. I'm using sockets and kqueue. I have never
> # > # > had problems with sockets before, but kqueue used to crash
> # > # > the kernel. Does anyone know if kqueue still borks the machine?
> # > #
> # > # It never has for me. What's the nature and circumstance of the
> # > # misbehavior you're seeing?
> # >
> # > It hangs on customer machines not mine where I cannot examine it
> # > too closely (no gdb, etc). It monitors the file system, running
> # > kqueue on up to 2000 disk inodes. It has a unix domain socket
> # > to another process. When I look at with ps -x the status is Us.
> # > If I kill the companion process, one of the threads will abort
> # > the entire process on a broken pipe; then the status is Es and
> # > it's still hung.
> # >
> # > This can persist for days, until someone notices it. The only
> # > recovery I know of is a reboot. I do know kqueue panicked 10.3.
> # > I wonder if it's still broken or 10.4.9 broke it.
> #
> # I've got a few thousand users running a program that's been reliant on
> # kqueue for ... about 2.5 years now. Seems like there's got to me more
> # detail than "kqueue panicked 10.3."
>
> http://www.google.com/search?hl=en&safe=off&client=safari&rls=en&q=kqueue+kern
> el+panic&btnG=Search

About 98% of those results don't seem to involve OS X.
A random sample of those that remain suggest that few of them actually
implicate kqueue in kernel panics.
Those that do implicate kqueue in kernel panics describe a fairly
specific scenario that's not particularly common.

That last would be the "more detail" I was interested in. And it doesn't
particularly look like it would be either intermittent or delayed when
it does happen, so it doesn't sound like a good candidate for the source
of your issue.

> It's well known kqueue was broken on 10.3.

To whom? Honestly, I have a hard time accepting that a problem is fairly
described as "well known" if I can support a deployed product that
relies fundamentally on the implicated technology for years without
hearing of it.

G
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Darwin kernel hang -- how to diagnose? - I have program that somehow gets the process into uninterruptible wait status (U is in the ps -x display), and the process is hung and unkillable. The machine then hangs on shutdown requiring a power cycle to restart. I doubt Apple will provide any help...

[BINDINGS] NSTableView vs. NSUserDefaultsController - I've already posted the following message to Apple's cocoa-dev mailing list, so if you subscribe to that list or are a regular reader of CocoaBuilder.com, you've already seen this. I'm posting here since I've appeared to have violated list..

Any tame MAC users out there ? - Hi all, could anyone tell me why the HTML generated from an XSL/XML merge would not display on an apple Mac. http://www.bedfords.co.uk/pages/search/search.asp (and just click "search") The page works fine on IE5,IE6, Mozilla and Firefox. Th...

[ANN] ADHOC/MacHack sessions announcement & the Transition.. - Apple is moving to Intel -- Don't Panic! Come to ADHOC and learn what developers need to do. Held in Dearborn, Michigan from July 27th through 31st (a little over a month after WWDC), ADHOC has always been focused on giving developers the edge when i...

Use of stty - Has anyone here used stty to set the baud rate of a serial port in a script or just from the command line ? I am trying to use "screen <ser port path>" which gives you a serial (VT100) terminal through the selected port. In my case I am...
       Mac (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact