GLMark2 requires GLES 2.0 but doesn't check it on startup causing a failure

Bug #851334 reported by Zach Pfeffer
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Android
Fix Released
Medium
Patrik Ryd
glmark2
Fix Released
Medium
Alexandros Frantzis

Bug Description

When I tried to run GLMark2 on the latest Panda build, https://android-build.linaro.org/builds/~linaro-android/panda/#build=285 I got:

The application GLMark2 (process org.linaro.glmark2) has stopped unexpectedly. Please try again.

logcat and dmesg attached next.

Related branches

Revision history for this message
Zach Pfeffer (pfefferz) wrote :

Contains the dmesg and logcat

Changed in linaro-android:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Patrik Ryd (patrik-ryd)
Revision history for this message
Jesse Barker (jesse-barker) wrote :

Has something in the hwpack changed in the latest build? The attached message log makes it seem to me (with the caveat that I have not debugged on Android) that no appropriate EGLConfig can be found for surface creation, etc. This is certainly critical enough for an application to decide that it cannot do anything useful, but is also profound enough that glmark2 would never have run this way (yet we know it has).

Revision history for this message
warmcat (andy-warmcat) wrote :

Uhhh... isn't that rootfs using the jstultz kernel which does not have PVR / SGX support?

<project path="kernel" name="people/jstultz/android" revision="linaro-android-3.0" remote="linaro-other"/>

Try it again with the build using TILT kernel.

Revision history for this message
Zach Pfeffer (pfefferz) wrote :

It works fine with the TI LT kernel. What I was wondering was why is doesn't work if there's no hardware graphics acceleration - like on the Panda build. I'm asking because the 3-D benchmark in 0xbench runs with or without hardware acceleration. Can GLMark2 run on a software 3-D stack?

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

A quick look shows that 0xbench 3D benchmarks use OpenGL ES 1.x. GLMark2 uses OpenGL ES 2.0. It's very likely that the software 3D stack doesn't support OpenGL ES 2.0.

Revision history for this message
Zach Pfeffer (pfefferz) wrote :

Jim, do you know if the software stack supports OpenGL ES 2.0?

Revision history for this message
Patrik Ryd (patrik-ryd) wrote :

According to this page (http://developer.android.com/reference/android/opengl/GLES20.html) it has been supported since API level 8 (Froyo).

Revision history for this message
Fathi Boudra (fboudra) wrote : Re: GLMark2 does not run on Panda/Snowball

Issue reproducible on 2011.09 RC images on Panda and Snowball.

summary: - GLMark2 does not run on Panda
+ GLMark2 does not run on Panda/Snowball
tags: added: panda snowball
Changed in glmark2:
status: New → Confirmed
assignee: nobody → Alexandros Frantzis (afrantzis)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Note that the sample BasicGLSurfaceViewActivity (it uses GLES2) provided with the Android SDK exhibits exactly the same behavior as glmark2, failing with:

E/AndroidRuntime( 1471): java.lang.IllegalArgumentException: No configs match configSpec
E/AndroidRuntime( 1471): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:763)
E/AndroidRuntime( 1471): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:919)
E/AndroidRuntime( 1471): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1264)
E/AndroidRuntime( 1471): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)

I am convinced that this is an issue of not having proper GLES2.0 drivers. The Java GLES2 API and the libGLESv2.so file may be there, but they are not really supported. That is why we get an exception when we try to obtain a GLES2.0 EGL config.

As I mentioned in #5, it seems android doesn't have a software GLES2.0 implementation, which makes sense, since GLES2.0 is much more complex than GLES1.x eg it needs shader compilation and execution support.

The only thing we can do is catch the exception and provide a more informative message. In my opinion, this is not release-critical, as even then glmark2 would not be able to run.

Both glmark2-android and BasicGLSurfaceViewActivity work fine on the latest LEB-panda, which contains the SGX drivers.

Revision history for this message
Patrik Ryd (patrik-ryd) wrote :

According to "skyguru", AGL the software GL stack was included in Froyo and ealier releases . There is no SW GL stack in Gingerbread by default. The GL ES 2.0 in Gingerbread must be HW accelerated.

Revision history for this message
Fathi Boudra (fboudra) wrote : Re: [Bug 851334] Re: GLMark2 does not run on Panda/Snowball

On 27 September 2011 12:34, Alexandros Frantzis <email address hidden> wrote:
> I am convinced that this is an issue of not having proper GLES2.0
> drivers. The Java GLES2 API and the libGLESv2.so file may be there, but
> they are not really supported.  That is why we get an exception when we
> try to obtain a GLES2.0 EGL config.
>
> As I mentioned in #5, it seems android doesn't have a software GLES2.0
> implementation, which makes sense, since GLES2.0 is much more complex
> than GLES1.x eg it needs shader compilation and execution support.
>
> The only thing we can do is catch the exception and provide a more
> informative message. In my opinion, this is not release-critical, as
> even then glmark2 would not be able to run.

Could we run GLES 2.0 sample from Android developer?
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/GLES20Activity.html
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/GLES20TriangleRenderer.html

GLES20Activity has a check for OpenGL ES 2.0 support at runtime.

Could GLMark2 checks its minimal requirement?

You need to properly declare GLES 2.0 in your AndroidManifest.xml:
<uses-feature android:glEsVersion="0x00020000"></uses-feature>
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>

See http://developer.android.com/guide/topics/manifest/uses-feature-element.html

Revision history for this message
Alexandros Frantzis (afrantzis) wrote : Re: GLMark2 does not run on Panda/Snowball

> Could we run GLES 2.0 sample from Android developer?
> http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/GLES20Activity.html
> http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/GLES20TriangleRenderer.html

It runs by falling back to GLES1 mode on linaro-android panda 2011.09.

> GLES20Activity has a check for OpenGL ES 2.0 support at runtime.
>
> Could GLMark2 checks its minimal requirement?

Yes, we can do that, preferably in addition to handling any exceptions from EGL chooseConfig(). Do you think it's worth fixing this for 2011.09?

> You need to properly declare GLES 2.0 in your AndroidManifest.xml:
> <uses-feature android:glEsVersion="0x00020000"></uses-feature>
> <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
> See http://developer.android.com/guide/topics/manifest/uses-feature-element.html

The glmark2 manifest file already contains these elements.

Revision history for this message
Fathi Boudra (fboudra) wrote : Re: [Bug 851334] Re: GLMark2 does not run on Panda/Snowball

On 27 September 2011 17:28, Alexandros Frantzis <email address hidden> wrote:
>> Could we run GLES 2.0 sample from Android developer?
>> http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/GLES20Activity.html
>> http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/GLES20TriangleRenderer.html
>
> It runs by falling back to GLES1 mode on linaro-android panda 2011.09.
>
>> GLES20Activity has a check for OpenGL ES 2.0 support at runtime.
>>
>> Could GLMark2 checks its minimal requirement?
>
> Yes, we can do that, preferably in addition to handling any exceptions
> from EGL chooseConfig(). Do you think it's worth fixing this for
> 2011.09?

No, this issue isn't critical or high priority. It could wait GLMark2
2011.10 release.
In the meantime, I guess it could be fixed now on Android CI.

Fathi Boudra (fboudra)
summary: - GLMark2 does not run on Panda/Snowball
+ GLMark2 requires GLES 2.0 but doesn't check it on startup causing a
+ failure
Ilias Biris (ibiris)
Changed in glmark2:
importance: Undecided → Medium
milestone: none → 2011.10
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> > GLES20Activity has a check for OpenGL ES 2.0 support at runtime.
> >
> > Could GLMark2 checks its minimal requirement?
>
> Yes, we can do that, preferably in addition to handling any exceptions from EGL chooseConfig().

It turns out that this method is useless in our case, because it just checks what GLES version we have set as required in AndroidManifest.xml (which in our case is always going to be 2.0). It doesn't involve any checks about whether GLES2 is actually supported on the platform. I don't think there is a way to figure out whether there is real GLES2 support, other than trying to find a GLES2 config and failing.

Unfortunately, chooseConfig() is called in a separate thread which we don't control, so we cannot catch the exception in glmark2-android. We need to implement a custom EGLConfigChooser that shows an informative alert message and quits the application if something goes wrong.

Fathi Boudra (fboudra)
Changed in linaro-android:
milestone: none → 11.10
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

I have pushed a fix to both glmark2 trunk and its git mirror at git.linaro.org (so the Android builds can pick it up).

Changed in glmark2:
status: Confirmed → Fix Committed
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :

Unable to rung GLMark2 on Snowball HW using build:
https://android-build.linaro.org/builds/~linaro-android/staging-snowball-11.10-release/

Logcat snippet:
---------Logs-------------
I/ActivityManager( 1523): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.linaro.glmark2/.Glmark2Activity } from pid 1602
I/ActivityManager( 1523): Start proc org.linaro.glmark2 for activity org.linaro.glmark2/.Glmark2Activity: pid=1764 uid=10011 gids={}
I/ARMAssembler( 1523): generated scanline__00000177:03515104_00001002_00000000 [ 87 ipp] (110 ins) at [0x43f18520:0x43f186d8] in 152587 ns
D/libEGL ( 1764): loaded /system/lib/egl/libGLES_android.so
W/dalvikvm( 1764): threadid=9: thread exiting with uncaught exception (group=0x400ed560)
E/AndroidRuntime( 1764): FATAL EXCEPTION: GLThread 10
E/AndroidRuntime( 1764): java.lang.IllegalArgumentException: No configs match configSpec
E/AndroidRuntime( 1764): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:763)
E/AndroidRuntime( 1764): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:919)
E/AndroidRuntime( 1764): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1264)
E/AndroidRuntime( 1764): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
I/ActivityManager( 1523): Displayed org.linaro.glmark2/.Glmark2Activity: +772ms
W/ActivityManager( 1523): Force finishing activity org.linaro.glmark2/.Glmark2Activity
I/Process ( 1764): Sending signal. PID: 1764 SIG: 9
I/ActivityManager( 1523): Process org.linaro.glmark2 (pid 1764) [ 91.401306] binder: release proc 1764, transaction 4126, not freed
[ 91.401336] binder: release proc 1764, transaction 4127, not freed
has died.
I/ARMAssembler( 1523): generated scanline__00000177:03515104_00001001_00000000 [ 91 ipp] (114 ins) at [0x43f186e0:0x43f188a8] in 122070 ns
----------------Logs-------------------

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> Unable to rung GLMark2 on Snowball HW using build:
> https://android-build.linaro.org/builds/~linaro-android/staging-snowball-11.10-release/

This build uses "MANIFEST_BRANCH=linaro-android-11.09-release". The fix is available in the glmark2 git repo but was introduced after 2011.09, so it is not included in the build you are using.

Changed in glmark2:
status: Fix Committed → Fix Released
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Even with the latest changes, Glmark2 cannot actually run, but it should display an informative error dialog instead of crashing. Do you still get a crash?

Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :

I do not see a crash.
Popup message saying "GLMark2 requires GLES 2.0 to run" when selecting GLMark2 app.

Revision history for this message
Fathi Boudra (fboudra) wrote : Re: [Bug 851334] Re: GLMark2 requires GLES 2.0 but doesn't check it on startup causing a failure

On 24 October 2011 12:40, Abhishek Paliwal <email address hidden> wrote:
> I do not see a crash.
> Popup message saying "GLMark2 requires GLES 2.0 to run"  when selecting GLMark2 app.

It's the expected behavior.

Frans Gifford (fgiff)
tags: added: glmark2 linaro-android
Frans Gifford (fgiff)
tags: added: imx53
Frans Gifford (fgiff)
tags: added: quickstart-staging
tags: added: snowball-landing snowball-staging
removed: quickstart-staging
tags: removed: snowball-landing
tags: added: snowball-landing
Revision history for this message
Tony Mansson (tony-mansson) wrote :

Patrikryd, Abishek. Please clarify status. Why is this bug is still marked as affecting two boards/builds in the 11.10 test suite when it has been verified to be fixed in GLMark2 and all boards run the same version of GLMark2?

The bug was about GLMark2 not checking before executing. The bug is not about if the boards support GLMark2 or not.

Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :

I'm using this Bug to mark GLMark2 benchmark test failure (i.e GLMark2 app not running on boards. )
In latest releases(11.10 onwards) there is no crash message but a warning saying:
 "GLMark2 cannot run beacuse it could not find a suitable EGLConfig for GLES2.0, please check that proper GLES1.0 drivers are installed".
If this warning is expected behavior - then this Bug can be closed.

I have to still mark GLMark2 test as failure, but I guess I can use another bug(880176 : GLMark2 does not run if there's no HW acceleration) or raise a new one.

Revision history for this message
Patrik Ryd (patrik-ryd) wrote :

Works as expected (problem solved)

Changed in linaro-android:
status: Confirmed → Fix Released
Revision history for this message
Fathi Boudra (fboudra) wrote :

On 8 November 2011 15:03, Abhishek Paliwal <email address hidden> wrote:
> I'm using this Bug to mark GLMark2 benchmark test failure (i.e GLMark2 app not running on boards. )
> In latest releases(11.10 onwards) there is no crash message but a warning saying:
>  "GLMark2 cannot run beacuse it could not find a suitable EGLConfig for GLES2.0, please check that proper GLES1.0 drivers are installed".
> If this warning is expected behavior - then this Bug can be closed.

It's the expected behavior.

> I have to still mark GLMark2 test as failure, but I guess I can use
> another bug(880176 : GLMark2 does not run if there's no HW acceleration)

This bug is invalid.

> or raise a new one.

It's the best option. The issue isn't about GLMark2 test failed but
not applicable because some boards doesn't have GL ES 2.0 driver
enabling hardware acceleration.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.