kernel: IOSurface: buffer allocation size is zero? What’s that?

Have you noticed this error in your console.log?

kernel: IOSurface: buffer allocation size is zero

There are several possible reasons for this:

  • It maybe a bug in the Hardware Acceleration that Adobe Flash is using (Disabling Hardware Acceleration, appears to stop the issue)
  • Caused by an Apple supplied framework that Adobe uses in Flash

This is a problem for both Adobe Flash 10 & 11 (See Adobe’s Forum or the Adobe Bug Report).

This issue is  limited to 10.7 (Lion) only, Snow Leopard (10.6), and the Beta’s of Mountain Lion (10.8) do not seem to suffer from this issue.

The only solution at this time, seems to be:

As far as I’ve been able to discover, this bug is specific to WebKit browsers running (Chrome and Safari are based on WebKit).  Perhaps it is related to those browsers running plugins (like Flash) and using an IOSurface to pass the rendering data back from the plugin.  This issue was constant on my late 2010 MBP and would freeze the machine entirely once a day.  Having switched to using Firefox or Opera I no longer see ANY messages for “IOSurface: Buffer allocation size is zero”.  Thankfully, this also comes without any more freezing when time machine starts up or at any other time.

It looks like there are a lot of changes going on in WebKit relating to IOSurface usage (http://svnsearch.org/svnsearch/repos/WEBKIT/search?logMessage=iosurfac e).  Hopefully this will be fixed very soon.