I determined that my system crash was not due to an endless loop - rather due to a very inefficient algorithm. MacRuby seems to run at such a high priority that it can cause the system to crash - especially if a streaming video is running. Can I lower the priority of my MacRuby application? Thanks, Bob Rice
An app should NOT be able to destabilize the OS enough to cause it to crash. That is a serious OS-level bug. It should be reported (with details) to bugreport.apple.com. -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, system design
On Nov 6, 2010, at 4:19 PM, Robert Rice wrote:
I determined that my system crash was not due to an endless loop - rather due to a very inefficient algorithm. MacRuby seems to run at such a high priority that it can cause the system to crash - especially if a streaming video is running.
MacRuby does not run at any particular elevated priority itself. If you're doing something like producing or consuming A/V streams in real-time, on the other hand, then any number of real-time threads may be created on your behalf by the various Frameworks responsible for doing that sort of processing, but that's no different a scenario than calling them from ObjC and the priority of your application itself will still be irrelevant in such a scenario. It may be that you're [mis]using the APIs such that more work is being done than necessary. You may wish to review some of the sample code that most directly corresponds to whatever it is you're doing. Also, as others have intimated, if you were able to panic your system for any reason (and I do mean panic and not some other hang or application-specific crash) then that's a bug that really needs to be reported since Apple takes panic reports pretty seriously. - Jordan
Hi Robert, What do you mean by making the system crash? Does a kernel panic happen, or does the system just become unusable? If a kernel panic happen, or if any core service segfaults because of your app, then you should report this via http://bugreporter.apple.com as others indicated. If the system becomes unusable your app is probably using too much resources. You should profile it using Shark (or Instruments) and see what's going on. Feel free to upload the profile somewhere if you want us to have a look. Laurent On Nov 6, 2010, at 4:19 PM, Robert Rice wrote:
I determined that my system crash was not due to an endless loop - rather due to a very inefficient algorithm. MacRuby seems to run at such a high priority that it can cause the system to crash - especially if a streaming video is running.
Can I lower the priority of my MacRuby application?
Thanks, Bob Rice
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hi Laurent: I'm not sure what the definition of a "kernel panic" is. My system Finder becomes unresponsive. A/V streams stop displaying video but continue to play audio and my MacRuby app continues to run to completion. I have a busy CPU running a DisplayLink USB monitor connection and I suspect the DisplayLink driver could be involved if it doesn't get enough CPU resources. I will test it again with a newer DisplayLink driver and with the USB monitor connection. But it seems that MacRuby runs at a high priority since I can't reproduce the problem when I run the CPU up to 100% with other applications. Thanks, Bob Rice On Nov 6, 2010, at 10:23 PM, Laurent Sansonetti wrote:
Hi Robert,
What do you mean by making the system crash? Does a kernel panic happen, or does the system just become unusable?
If a kernel panic happen, or if any core service segfaults because of your app, then you should report this via http://bugreporter.apple.com as others indicated. If the system becomes unusable your app is probably using too much resources. You should profile it using Shark (or Instruments) and see what's going on. Feel free to upload the profile somewhere if you want us to have a look.
Laurent
On Nov 6, 2010, at 4:19 PM, Robert Rice wrote:
I determined that my system crash was not due to an endless loop - rather due to a very inefficient algorithm. MacRuby seems to run at such a high priority that it can cause the system to crash - especially if a streaming video is running.
Can I lower the priority of my MacRuby application?
Thanks, Bob Rice
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On Sun, 07 Nov 2010 10:48:07 -0500 Robert Rice <rice.audio@pobox.com> wrote:
Hi Laurent:
I'm not sure what the definition of a "kernel panic" is.
It means your kernel dies and invokes its panic() function, resulting in the system rebooting. You describe a situation that is not a kernel panic, it is not even strictly speaking a crash.
My system Finder becomes unresponsive. A/V streams stop displaying video but continue to play audio and my MacRuby app continues to run to completion.
This is not a system crash, especially since (presumably) the machine returns to normal after your app exits. In a system crash,the machine dies and needs to be rebooted -- you are not experiencing that. The exact nature of what is going wrong is difficult to assess without knowing much about what your Ruby code is doing.
I have a busy CPU running a DisplayLink USB monitor connection and I suspect the DisplayLink driver could be involved if it doesn't get enough CPU resources. I will test it again with a newer DisplayLink driver and with the USB monitor connection. But it seems that MacRuby runs at a high priority since I can't reproduce the problem when I run the CPU up to 100% with other applications.
Your other applications do not behave the same way that your Ruby app does so there is no particular reason to assume this has anything to do with scheduler priorities at all. It seems much more likely that this is related to the specific behavior of your ruby app and is independent of scheduling priority. For example, you could be tying up other resources needed by the finder or A/V subsystems, such as disk bandwidth or memory. -- Perry E. Metzger perry@piermont.com
At 7:19 PM -0400 11/6/10, Robert Rice wrote:
Can I lower the priority of my MacRuby application?
There are some commands that mess with the scheduling priority, but this (AFAIK) only deals with CPU activity. It sounds like the problem you're having is related to I/O bandwidth. That said, here are some man pages: % man nice ... nice -- execute a utility with an altered scheduling priority ... % man renice ... renice -- alter priority of running processes ... -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, system design
participants (5)
-
Jordan K. Hubbard
-
Laurent Sansonetti
-
Perry E. Metzger
-
Rich Morin
-
Robert Rice