"SGX: Microkernel unresponsive" and "Split Scene" issue that only occurs on iPad 2

Discussion in 'iOS Development' started by BrianC, Apr 26, 2011.

  1. BrianC

    BrianC

    New Member

    Joined:
    Mar 3, 2011
    Messages:
    7
    I'm writing an iOS game using OpenGL ES 2 and I encountered an error that only seems to occur on the iPad 2. The message "SGX: Microkernel unresponsive" is printed to the console and there is a delay of 1010 milliseconds (on average) until the next frame. The OpenGL ES Driver Instrument displays a "Split Scene Count" of 5 when the error messages is printed. The error occurs in a variety of situations and doesn't always occur at the same time. It occurs more frequently when 4x MSAA and alpha blending are enabled, but it also occurs when they are disabled.

    I've run my test program on two iPad 2 devices with iOS 4.3 and 4.3.2 and the same error occurred on both. The error did not occur on an original iPad (iOS 4.3), an iPod Touch 4 (iOS 4.2.1), and an iPhone 3GS (iOS 4.2.1).

    I'm having trouble finding more information about both the "SGX: Microkernel unresponsive." error and the split scene message. Does anyone know what they mean?

    From the iPad 2 console:

    Code (csharp):
    1.  
    2. Apr 26 01:06:39 unknown kernel[0] <Debug>: SGX: Microkernel unresponsive.
    3. Apr 26 01:06:39 unknown kernel[0] <Debug>: SGX Hang. Driver 0x80b42000, fSubmitStamp 3620793,  fCompletedStamp[0] 3620790, ui32Timestamp 3620790
    4. Apr 26 01:06:39 unknown kernel[0] <Debug>: ui32CurrentEDMTasks: 0x0001005F, ui32EDMTasks: 0x0001005F
    5. Apr 26 01:06:39 unknown kernel[0] <Debug>: SGX Info: Driver 0x80b42000, Registers 0xd3454000, fSubmitStamp 3620793,  fCompletedStamp[0] 3620790
    6. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_MASTER_EVENT_STATUS 0x20000800    EUR_CR_MASTER_EVENT_STATUS2 0x00000000
    7. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_MASTER_CLKGATESTATUS 0x0000000D   EUR_CR_MASTER_CLKGATESTATUS2 0x00000000
    8. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_MASTER_BIF_INT_STAT 0x00080000    EUR_CR_MASTER_BIF_FAULT 0x00000000  EUR_CR_MASTER_BIF_MEM_REQ_STAT 0x00000000
    9. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_MASTER_SLC_CTRL 0x0044C000
    10. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_MASTER_SLC_CTRL_BYPASS 0x04001E40
    11. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_MASTER_SLC_STATUS 0x00000000
    12. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_ISP_ZLSCTL 0x001DD178
    13. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_ISP_ZLOAD_BASE 0x00C0C000 EUR_CR_ISP_ZSTORE_BASE 0x00C0C000
    14. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_ISP_STENCIL_LOAD_BASE 0x00000000  EUR_CR_ISP_STENCIL_STORE_BASE 0x00000000
    15. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_ISP_RGN_BASE 0x19F04000   EUR_CR_MASTER_ISP_RGN 0x00009000
    16. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_DPM_TA_PAGE_THRESHOLD 0x00000262  EUR_CR_DPM_ZLS_PAGE_THRESHOLD 0x00000250
    17. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_DPM_TA_GLOBAL_LIST 0x000101B8 EUR_CR_DPM_PDS_PAGE_THRESHOLD 0x00000140
    18. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_MASTER_ISP_STATUS 0x00000000
    19. Apr 26 01:06:39 unknown kernel[0] <Debug>: Core 0:
    20. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_EVENT_STATUS 0x24143E00       EUR_CR_EVENT_STATUS2 0x000000A0
    21. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_CLKGATESTATUS 0x00600880
    22. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_CLKGATECTL 0x000AAAAA
    23. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_CLKGATECTL2 0x0A8A8AAA
    24. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_BIF_INT_STAT 0x00090400       EUR_CR_BIF_FAULT 0x19F4C000     EUR_CR_BIF_MEM_REQ_STAT 0x00000000
    25. Apr 26 01:06:39 unknown kernel[0] <Debug>: Found BIF fault
    26. Apr 26 01:06:39 unknown kernel[0] <Debug>: device address: 0x19F4C000 (gart offset: 415 MB)
    27. Apr 26 01:06:39 unknown kernel[0] <Debug>: requestor: DCU
    28. Apr 26 01:06:39 unknown kernel[0] <Debug>: Page directory entry: 0x8C01A001     Page table entry: 0x00000000
    29. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_BIF_CTRL 0x00000000
    30. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_BIF_BANK0 0x00000000
    31. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_ISP_STATUS2 0x00063F2E
    32. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_DM_SLOT 0xAAAAAAAB       EUR_CR_USE1_DM_SLOT 0xAAAAAAAA
    33. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_SERV_PIXEL 0x0001C8C8        EUR_CR_USE1_SERV_PIXEL 0x0001C86E
    34. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_SERV_VERTEX 0x000100D2       EUR_CR_USE1_SERV_VERTEX 0x000100AE
    35. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_SERV_EVENT 0x0000005E        EUR_CR_USE1_SERV_EVENT 0x00010001
    36. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_DM_SLOT 0xAAAAAAAA       EUR_CR_USE3_DM_SLOT 0xAAAAAAAA
    37. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_SERV_PIXEL 0x0001C8AC        EUR_CR_USE3_SERV_PIXEL 0x0001C7C0
    38. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_SERV_VERTEX 0x000100AC       EUR_CR_USE3_SERV_VERTEX 0x000100AD
    39. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_SERV_EVENT 0x00010000        EUR_CR_USE3_SERV_EVENT 0x00010000
    40. Apr 26 01:06:39 unknown kernel[0] <Debug>: Core 1:
    41. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_EVENT_STATUS 0x04143E00       EUR_CR_EVENT_STATUS2 0x000000A0
    42. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_CLKGATESTATUS 0x00000000
    43. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_CLKGATECTL 0x000AAAAA
    44. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_CLKGATECTL2 0x0A8A8AAA
    45. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_BIF_INT_STAT 0x00080000       EUR_CR_BIF_FAULT 0x00000000     EUR_CR_BIF_MEM_REQ_STAT 0x00000000
    46. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_BIF_CTRL 0x00000000
    47. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_BIF_BANK0 0x00000000
    48. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_ISP_STATUS2 0x00063F2F
    49. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_DM_SLOT 0xAAAAAAAA       EUR_CR_USE1_DM_SLOT 0xAAAAAAAA
    50. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_SERV_PIXEL 0x0001C5B3        EUR_CR_USE1_SERV_PIXEL 0x0001C626
    51. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_SERV_VERTEX 0x000101C2       EUR_CR_USE1_SERV_VERTEX 0x0001019F
    52. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE0_SERV_EVENT 0x00010008        EUR_CR_USE1_SERV_EVENT 0x00010000
    53. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_DM_SLOT 0xAAAAAAAA       EUR_CR_USE3_DM_SLOT 0xAAAAAAAA
    54. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_SERV_PIXEL 0x0001C4BB        EUR_CR_USE3_SERV_PIXEL 0x0001C578
    55. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_SERV_VERTEX 0x0001019A       EUR_CR_USE3_SERV_VERTEX 0x00010198
    56. Apr 26 01:06:39 unknown kernel[0] <Debug>: EUR_CR_USE2_SERV_EVENT 0x00010000        EUR_CR_USE3_SERV_EVENT 0x00010000
    From Instruments:
    $InstrumentsScreenshot1.png
     
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Messages:
    1,140
    Seems like we found some possible causes
    Can you please bug report with repro project so we can test our fix, so it can go live with 3.4?
    Drop the case number here (6 digits number, no links)
     
  3. BrianC

    BrianC

    New Member

    Joined:
    Mar 3, 2011
    Messages:
    7
    Thanks Alexey. I'm working to create a simpler project that has the bug so that I can report it. What do you think the possible causes are? That information could help me make a test project more easily.
     
  4. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Messages:
    1,140
    Well, i can't say for sure, just guesses (and all of them internal to unity), but the fact that you did poked guys in apple forums is good - sometime they are faster then us in tracking down some crazy driver problems ;-))
    P.S. just to make sure - did you try to disable plugins if you have any for repro? we saw some crazy bugs when using crazy plugins ;-)
     
  5. BrianC

    BrianC

    New Member

    Joined:
    Mar 3, 2011
    Messages:
    7
    I'm still working to create the sample project that reproduces the issue. I'm not using any plugins. Everything is rendered using a shader that outputs a constant color.

    Do you know what a BIF fault is? The console messages in my initial post state that a BIF fault was found. What could be causing this?

    Apr 26 01:06:39 unknown kernel[0] <Debug>: Found BIF fault
    Apr 26 01:06:39 unknown kernel[0] <Debug>: device address: 0x19F4C000 (gart offset: 415 MB)
    Apr 26 01:06:39 unknown kernel[0] <Debug>: requestor: DCU
    Apr 26 01:06:39 unknown kernel[0] <Debug>: Page directory entry: 0x8C01A001********* Page table entry: 0x00000000

    It might be related to this post on the Apple forums.

    I really hope we can figure this out so that it can be fixed in 3.4.
     
  6. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Messages:
    1,140
    well, gart = Graphics Address Remapping Table, meaning that "gart offset: 415 MB" is most likely too much
    usually these kind of errors (well, judging from discussions found with google) are due to some code telling gl to read out of bounds of some buffer.
    So, btw, if you are using smth from GL class - try to remove it too
     
  7. BrianC

    BrianC

    New Member

    Joined:
    Mar 3, 2011
    Messages:
    7
    Thanks for your quick reply. I'm removing some code that used the GL class and testing it again.
     
  8. Wozik

    Wozik

    New Member

    Joined:
    Apr 10, 2009
    Messages:
    662
    BrianC, you may still want to report a bug to check out the fix of a possible bug ;-)
     
  9. BrianC

    BrianC

    New Member

    Joined:
    Mar 3, 2011
    Messages:
    7
    Case number 400892
     
  10. Wozik

    Wozik

    New Member

    Joined:
    Apr 10, 2009
    Messages:
    662
    BrianC, great thanks. The bug has a developer working on a fix.
     
  11. cactusov

    cactusov

    New Member

    Joined:
    Oct 12, 2011
    Messages:
    1
    Hi Wozik,
    Could I know what about this bug, is it fixed?