gpus_ReturnGuiltyForHardwareRestart Crash in [EAGLContext presentRenderbuffer]

Number:rdar://34858598 Date Originated:06-Oct-2017 10:22 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.0.2
Classification:Crash/Hang/Data Loss Reproducible:Unable
A mysterious crash has showed up on iOS11 (including 11.0.1, and 11.0.2), iPhone 5S/6/6+ since the first beta.

Here is what we know so far:
- The crash is specific to iOS11, iPhone 5S/6/6+. It doesn’t occur on 6S and up.
- The core of the OpenGL stack returns gpus_ReturnGuiltyForHardwareRestart
- It occurs when we attempt to invoke [EAGLContext presentRenderbuffer] from a CAEAGLLayer
- We don’t have a repro.
- This is currently the top iOS11 crash for the Instagram app, and second for the Facebook app (across all devices).

What we have tried so far:
- Remove any reference to VBO/VAO in our rendering stack. Didn’t help.
- We have tried reproing with a large range of drawing scenarios (rotation, resize, background/foreground). No luck.
- As far as we can tell, there is nothing specific in our application logic between the iPhone 6 family and the iPhone 6S family.

Some clues (that could be relevant but not necessarily):
- We know that when the presentRenderBuffer is invoked off main thread, and some CATransaction are occurring at the same time on the main thread, the crash rate goes up.
- When presentRenderBuffer is invoked on main thread (along with the whole drawing pipeline), the crash rate goes slightly down but not drastically.
- A substantial chunk (~20%) of the crashes occurs when the layer goes off screen and/or gets out of the view hierarchy.

Here is the stack trace:

libGPUSupportMercury.dylib gpus_ReturnGuiltyForHardwareRestart

1 AGXGLDriver gldUpdateDispatch
2 libGPUSupportMercury.dylib gpusSubmitDataBuffers
3 AGXGLDriver gldUpdateDispatch
4 GLEngine gliPresentViewES_Exec
5 OpenGLES -[EAGLContext presentRenderbuffer:]

Steps to Reproduce:
Unable to reproduce but we're seeing very large crash numbers in production

Expected Results:
N/A since we can not reproduce it

Actual Results:
N/A since we can not reproduce it


- This is currently the top iOS11 crash for the Instagram app, and second for the Facebook app (across all devices).


I confirm we have the same case in our GPU based app. It is very rare crash, it happens usually in glDrawArrays function (when rendering to texture), but sometimes also in presentRenderbuffer. It seems problem has been solved in devices newer than iPhone 6+/iPad Air 2.

Hi! Dou you have any news about this crash? In our crashlytics we see that the same crash occurs not only on iPhone 5S/6/6+, but also iPhone SE/6s/6s+/7/7+/8/8+/X. Also ~1% occurs on iOS 10. The same on iOS 9.

By artemenko.nsk at Jan. 25, 2018, 7 a.m. (reply...)


That's interesting -- we haven't seen any crashes on those devices. Feel free to reach me at to chat further.

By dannyzatfb at Jan. 25, 2018, 5:41 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!