Complete system hang, graphics-card related ("IntelAccelerator: bad busy count (255,1)")

I have just upgraded my machine to Yosemite (as of three hours ago), and I have encountered my first hang (on this laptop, which is about a week old). The system locked up quite hard, with only the mouse pointer movable; after a few seconds, the mouse pointer stopped moving too.

After waiting for the fans to spin down, I rebooted and was told my GPU crashed. The system console log shows endless repeats of the following:

10/17/14 5:30:57.000 AM kernel[0]: Trying restart GPU ...
10/17/14 5:30:57.000 AM kernel[0]: IntelAccelerator: bad busy count (255,1)
10/17/14 5:30:57.000 AM kernel[0]: Backtrace 0xffffff80008aff15 0xffffff80008afcd3 0xffffff7f822cd564 0xffffff7f822a6936 0xffffff7f822ae1c1 0xffffff7f822ae15d 0xffffff7f822c2999
10/17/14 5:30:57.000 AM kernel[0]: Kernel Extensions in backtrace:
10/17/14 5:30:57.000 AM kernel[0]: com.apple.iokit.IOAcceleratorFamily2(156.4)[20DDCE61-E3EC-3CC1-8B79-170CEF2B603A]@0xffffff7f822a4000->0xffffff7f82310fff
10/17/14 5:30:57.000 AM kernel[0]: dependency: com.apple.iokit.IOPCIFamily(2.9)[766FC23F-452C-3B74-951C-598BB17BCF06]@0xffffff7f80b24000
10/17/14 5:30:57.000 AM kernel[0]: dependency: com.apple.iokit.IOGraphicsFamily(2.4.1)[6D99A3BE-D531-3780-880B-13F2FC894A4A]@0xffffff7f80eb0000
...
10/17/14 5:30:58.000 AM kernel[0]: SYSCONFIG_GTVTD13                   : 0xffffffff
10/17/14 5:30:58.000 AM kernel[0]: SYSCONFIG_GTVTD14                   : 0xffffffff
10/17/14 5:30:58.000 AM kernel[0]: SYSCONFIG_GTVTD15                   : 0xffffffff
10/17/14 5:30:58.000 AM kernel[0]: ===========================================================================
10/17/14 5:30:58.000 AM kernel[0]: End Hang Analysis
10/17/14 5:30:58.000 AM kernel[0]: ===========================================================================
10/17/14 5:30:58.000 AM kernel[0]: Trying restart GPU ...
10/17/14 5:30:58.000 AM kernel[0]: IntelAccelerator: bad busy count (255,1)

Evidently, it was attempting to restart the GPU once per second, to no avail.

Has anyone previously encountered this issue? Are there any known workarounds?


Solution 1:

This is related to graphics card switching. As @nneonneo said, disabling "Automatic graphics switching" is one option but the better option is to use "gfxCardStatus" application and make Yosemite stick to integrated (Intel) card which will prevent auto graphics switching and won't drain your battery and run hot as it would if you did the "Automatic graphics switching" way (because it sticks to discrete card).

BTW: I can reproduce the problem on my MBPR Jun 2012. Go to this website in Safari, which triggers the automatic graphic switching. Refresh the page a few times and you will crash Yosemite. It seems to happen when it switches to discrete and back to integrated in quick succession.

Edit: Using that website, it won't crash as often as before. Because it was a WebGL component causing the switch and one of the updates did something related to WebGL.

Solution 2:

I can't say I've fixed the issue, but I disabled "Automatic graphics switching" in the Energy Saver preferences, and haven't had a crash like this for over a month.

Since 10.10.1 was just released, I may try re-enabling that setting and seeing if it crashes any more...