OSX kernel panic

I'm working on a new program on OSX, and twice now I've had it cause a
kernel panic, forcing my computer to reboot. This...really shouldn't
be possible. And due to the nature of the failure, I'm not really
comfortable trying to come up with a "minimal test app" -- repeatedly
causing kernal panics strikes me as unwise.

Both times I've had the crash have come shortly after I created a new
GLCanvas instance, so I'm pretty sure that's related. But I can't
narrow it down any closer than that. I've used identical code on a
Windows computer without any difficulties.

Any ideas how I can go about figuring out what's going wrong and what
to do about it? I find it hard to believe that this is specifically
wxPython's fault, but it's my entry point into the deeper levels of
the computer, so to speak, so I'm starting here.

I put the panic log up here: http://pastebin.com/vHwqSu0G

And I'd be happy to supply the offending program -- it's about 3k
lines of Python, with the only external dependencies being wxPython
and pyOpenGL.

-Chris

Both times I've had the crash have come shortly after I created a new
GLCanvas instance, so I'm pretty sure that's related. But I can't
narrow it down any closer than that. I've used identical code on a
Windows computer without any difficulties.

Any ideas how I can go about figuring out what's going wrong and what
to do about it? I find it hard to believe that this is specifically
wxPython's fault, but it's my entry point into the deeper levels of
the computer, so to speak, so I'm starting here.

I put the panic log up here: Interval Since Last Panic Report: 20927 secPanics Since Last Report: - Pastebin.com

Kernel panics usually are related to hardware issues - if, by change,
you have a friend that
have a similar mac, you can test you program and if it also crash,
probably it is not a hardware
issue.

Could be, also, a bug in a driver, in your case, the graphics driver I guess.

This thread (macos - Mac OS X Leopard Kernel Panics getting absurd - Super User)
has some steps that can help you to trace it.

You can also try to run other opengl software to check if it panics.

If I were to bet I would bet that you are hitting a corner case - due
to the way you
are using OpenGL - that exposes some uncommon driver bug.

I think you will have to be a Sherlock Holmes :slight_smile:

http://www.dreamspear.co.uk/blog/how-to-think-like-sherlock-holmes/

Sometimes, for those who believe, a witch can give good results. :stuck_out_tongue:

And I'd be happy to supply the offending program -- it's about 3k
lines of Python, with the only external dependencies being wxPython
and pyOpenGL.

I don't have a Mac so I can not test your application and take my
words with a grain of salt.

Ricardo

···

On Mon, Sep 10, 2012 at 11:07 PM, Chris Weisiger <cweisiger@msg.ucsf.edu> wrote:

I think I figured it out. I was performing OpenGL operations outside
of the main thread. I'm still surprised that this resulted in a kernel
panic, but at least it's not surprising that it didn't work. A quick
wx.CallAfter fixed the problem, or at least it hasn't recurred.

-Chris

···

On Mon, Sep 10, 2012 at 4:55 PM, Ricardo Pedroso <rmdpedroso@gmail.com> wrote:

On Mon, Sep 10, 2012 at 11:07 PM, Chris Weisiger <cweisiger@msg.ucsf.edu> wrote:

Both times I've had the crash have come shortly after I created a new
GLCanvas instance, so I'm pretty sure that's related. But I can't
narrow it down any closer than that. I've used identical code on a
Windows computer without any difficulties.

Any ideas how I can go about figuring out what's going wrong and what
to do about it? I find it hard to believe that this is specifically
wxPython's fault, but it's my entry point into the deeper levels of
the computer, so to speak, so I'm starting here.

I put the panic log up here: Interval Since Last Panic Report: 20927 secPanics Since Last Report: - Pastebin.com

Kernel panics usually are related to hardware issues - if, by change,
you have a friend that
have a similar mac, you can test you program and if it also crash,
probably it is not a hardware
issue.

Could be, also, a bug in a driver, in your case, the graphics driver I guess.

This thread (macos - Mac OS X Leopard Kernel Panics getting absurd - Super User)
has some steps that can help you to trace it.

You can also try to run other opengl software to check if it panics.

If I were to bet I would bet that you are hitting a corner case - due
to the way you
are using OpenGL - that exposes some uncommon driver bug.

I think you will have to be a Sherlock Holmes :slight_smile:
http://lesswrong.com/lw/919/how_to_draw_conclusions_like_sherlock_holmes/
http://www.dreamspear.co.uk/blog/how-to-think-like-sherlock-holmes/

Sometimes, for those who believe, a witch can give good results. :stuck_out_tongue:

And I'd be happy to supply the offending program -- it's about 3k
lines of Python, with the only external dependencies being wxPython
and pyOpenGL.

I don't have a Mac so I can not test your application and take my
words with a grain of salt.

Ricardo

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Chris Weisiger wrote:

Any ideas how I can go about figuring out what's going wrong and what
to do about it? I find it hard to believe that this is specifically
wxPython's fault, but it's my entry point into the deeper levels of
the computer, so to speak, so I'm starting here.

This is a bug in the Intel HD3000 graphics driver. As you say, a
user-mode program should never be able to trigger a kernel panic. You
might see if there is an update available.

Most graphics is done in user mode, but OpenGL requires DMA, and that
requires a kernel component.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.