Hello piplz,
While I searched for "CPU pegged" issue resolutions and found multiple
solutions, not one of them seemed to satisfy the following
circumstances.
Situation: Creating a live-wallpaper using strictly OpenGL ES 2.0
Problem: "CPU-Pegged" and then automatic device crash and restart
Cause: result of selecting "setEGLConfigChooser(8, 8, 8, 8, 0, 0)"
instead of "setEGLConfigChooser(5, 6, 5, 0, 0, 0)" (look up gl surface
etc.)
Logic problem 1: there aren't no EGL or GL errors.
Logic problem 2: device seems to be able to handle the 8888
configuration and shouldn't have any problems.
Device: Nexus One
Details: look up the last log excerpt (infos logged from application).
Log excerpt (error case):
02-20 16:21:42.465: ERROR/ActivityManager(92): ANR in
com.android.wallpaper.livepicker
(com.android.wallpaper.livepicker/.LiveWallpaperListActivity)
02-20 16:21:42.465: ERROR/ActivityManager(92): Reason:
keyDispatchingTimedOut
02-20 16:21:42.465: ERROR/ActivityManager(92): Load: 1.87 / 1.74 /
1.65
02-20 16:21:42.465: ERROR/ActivityManager(92): CPU usage from 8552ms
to 1837ms ago:
02-20 16:21:42.465: ERROR/ActivityManager(92): roid.opengles20: 3% =
2% user + 1% kernel / faults: 4211 minor
02-20 16:21:42.465: ERROR/ActivityManager(92): system_server: 2% =
1% user + 0% kernel / faults: 13 minor
02-20 16:21:42.465: ERROR/ActivityManager(92): aper.livepicker: 0% =
0% user + 0% kernel / faults: 189 minor
02-20 16:21:42.465: ERROR/ActivityManager(92): synaptics_wq: 0% = 0%
user + 0% kernel
02-20 16:21:42.465: ERROR/ActivityManager(92): akmd: 0% = 0% user +
0% kernel
02-20 16:21:42.465: ERROR/ActivityManager(92): TOTAL: 3% = 2% user +
1% kernel
02-20 16:21:42.605: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 6009
objects / 372232 bytes in 86ms
02-20 16:21:42.605: INFO/dalvikvm-heap(92): Grow heap (frag case) to
7.539MB for 174776-byte allocation
02-20 16:21:42.695: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 554
objects / 25048 bytes in 89ms
02-20 16:21:42.785: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 162
objects / 184576 bytes in 89ms
02-20 16:21:42.785: INFO/dalvikvm-heap(92): Grow heap (frag case) to
7.755MB for 349536-byte allocation
02-20 16:21:42.875: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 0
objects / 0 bytes in 90ms
02-20 16:21:42.935: WARN/SharedBufferStack(92):
waitForCondition(ReallocateCondition) timed out (identity=3054,
status=0). CPU may be pegged. trying again.
02-20 16:21:42.975: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 26
objects / 1336 bytes in 96ms
02-20 16:21:42.975: INFO/dalvikvm-heap(92): Grow heap (frag case) to
7.928MB for 174776-byte allocation
02-20 16:21:43.065: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 5
objects / 216 bytes in 87ms
02-20 16:21:43.155: WARN/SharedBufferStack(92):
waitForCondition(ReallocateCondition) timed out (identity=3055,
status=0). CPU may be pegged. trying again.
02-20 16:21:43.165: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 49
objects / 354560 bytes in 91ms
02-20 16:21:43.245: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 340
objects / 146504 bytes in 80ms
02-20 16:21:43.245: INFO/dalvikvm-heap(92): Grow heap (frag case) to
8.083MB for 393236-byte allocation
02-20 16:21:43.335: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 0
objects / 0 bytes in 85ms
02-20 16:21:43.425: DEBUG/dalvikvm(92): GC_FOR_MALLOC freed 5
objects / 1005016 bytes in 87ms
02-20 16:21:43.942: WARN/SharedBufferStack(92):
waitForCondition(ReallocateCondition) timed out (identity=3054,
status=0). CPU may be pegged. trying again.
02-20 16:21:43.955: ERROR/Adreno200-ES20(92): gsl_device_waittimestamp
failed in rb_timestamp_wait_on_timestamp
02-20 16:21:43.965: WARN/KeyCharacterMap(92): No keyboard for id 65540
02-20 16:21:43.965: WARN/KeyCharacterMap(92): Using default keymap: /
system/usr/keychars/qwerty.kcm.bin
02-20 16:21:44.981: WARN/SharedBufferStack(92):
waitForCondition(ReallocateCondition) timed out (identity=3054,
status=0). CPU may be pegged. trying again.
02-20 16:21:45.027: WARN/SharedBufferStack(16217):
waitForCondition(LockCondition) timed out (identity=3055, status=0).
CPU may be pegged. trying again.
02-20 16:21:45.270: WARN/SharedBufferStack(92):
waitForCondition(ReallocateCondition) timed out (identity=3056,
status=0). CPU may be pegged. trying again.
02-20 16:21:45.982: WARN/SharedBufferStack(92):
waitForCondition(ReallocateCondition) timed out (identity=3054,
status=0). CPU may be pegged. trying again.
...
Here another log excerpt in case 565 EGL configuration is chosen
(everything seems to be alright).
02-20 16:31:45.209: INFO/ActivityManager(92): Starting activity:
Intent { cmp=com.android.wallpaper.livepicker/.LiveWallpaperPreview
(has extras) }
02-20 16:31:45.329: INFO/ActivityManager(92): Start proc
com.devdroy.android.opengles20 for service
com.devdroy.android.opengles20/.GLes20Service: pid=603 uid=10064
gids={}
02-20 16:31:45.389: INFO/ActivityManager(92): Displayed activity
com.android.wallpaper.livepicker/.LiveWallpaperPreview: 164 ms (total
164 ms)
02-20 16:31:45.459: VERBOSE/GLes20Service(603): OpenGL ES 2.0 support
ok
02-20 16:31:45.489: DEBUG/GLWallpaperService(603): onSurfaceCreated()
02-20 16:31:45.489: DEBUG/EGLHelper(603): EglHelper 1 start()
02-20 16:31:45.489: DEBUG/EGLHelper(603): EglHelper 1 getting new EGL
02-20 16:31:45.489: DEBUG/EGLHelper(603): EglHelper 1 getting new
display
02-20 16:31:45.489: DEBUG/libEGL(603): loaded /system/lib/egl/
libGLES_android.so
02-20 16:31:45.509: DEBUG/libEGL(603): loaded /system/lib/egl/
libEGL_adreno200.so
02-20 16:31:45.519: DEBUG/libEGL(603): loaded /system/lib/egl/
libGLESv1_CM_adreno200.so
02-20 16:31:45.519: DEBUG/libEGL(603): loaded /system/lib/egl/
libGLESv2_adreno200.so
02-20 16:31:45.529: DEBUG/EGLHelper(603): EglHelper 1 getting new
config
02-20 16:31:45.529: DEBUG/EGLHelper(603): EglHelper 1 egl version 1.0
02-20 16:31:45.529: DEBUG/EGLHelper(603): EglHelper 1 egl cfg -
EGL_RENDERABLE_TYPE = 7(ES2 = true)
02-20 16:31:45.529: DEBUG/EGLHelper(603): EglHelper 1 ok egl cfg -
EGL_RED_SIZE = 5
02-20 16:31:45.529: DEBUG/EGLHelper(603): EglHelper 1 ok egl cfg -
EGL_GREEN_SIZE = 6
02-20 16:31:45.529: DEBUG/EGLHelper(603): EglHelper 1 ok egl cfg -
EGL_BLUE_SIZE = 5
02-20 16:31:45.529: DEBUG/EGLHelper(603): EglHelper 1 ok egl cfg -
EGL_ALPHA_SIZE = 0
02-20 16:31:45.539: DEBUG/EGLHelper(603): EglHelper 1 ok egl cfg -
EGL_DEPTH_SIZE = 0
02-20 16:31:45.539: DEBUG/EGLHelper(603): EglHelper 1 ok egl cfg -
EGL_STENCIL_SIZE = 0
02-20 16:31:45.539: DEBUG/EGLHelper(603): EglHelper 1 creating new
context
02-20 16:31:45.549: DEBUG/EGLWindowSurfaceFactoryDefault(603):
entering eglCreateWindowSurface...
02-20 16:31:45.549: DEBUG/EGLWindowSurfaceFactoryDefault(603): exited
eglCreateWindowSurface...
02-20 16:31:45.559: DEBUG/GLes20Shader(603): shader compiled -
ESI_Default_Vertex
02-20 16:31:45.559: DEBUG/GLes20Shader(603): shader compiled -
ESI_Default_Vertex_Texture
02-20 16:31:45.569: DEBUG/GLes20Shader(603): shader compiled -
ESI_Default_Fragment
02-20 16:31:45.569: DEBUG/GLes20Shader(603): shader compiled -
ESI_Default_Fragment_Texture
02-20 16:31:45.589: DEBUG/GLes20Shader(603): program linked -
EPI_Default_Render
02-20 16:31:45.599: DEBUG/GLes20Shader(603): program linked -
EPI_Default_RenderTexture
02-20 16:31:45.609: VERBOSE/GLes20Bitmaps(603): ok initBitmap EB_Robot
02-20 16:31:45.639: DEBUG/dalvikvm(603): GC_EXTERNAL_ALLOC freed 1056
objects / 76968 bytes in 27ms
02-20 16:31:45.639: VERBOSE/GLes20Renderable(603): texture id
EB_Robot=1
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_VENDOR = Qualcomm
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_RENDERER = Adreno
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_VERSION = OpenGL ES
2.0 1044053
02-20 16:31:45.639: DEBUG/GLes20Renderer(603):
GL_SHADING_LANGUAGE_VERSION = OpenGL ES GLSL ES 1.00
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_EXTENSIONS =
GL_AMD_compressed_3DC_texture GL_AMD_compressed_ATC_texture
GL_AMD_performance_monitor GL_AMD_program_binary_Z400
GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888
GL_EXT_texture_type_2_10_10_10_REV GL_OES_compressed_ETC1_RGB8_texture
GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image
GL_OES_element_index_uint GL_OES_fbo_render_mipmap
GL_OES_fragment_precision_high GL_OES_get_program_binary
GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8
GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float
GL_OES_texture_half_float GL_OES_texture_half_float_linear
GL_OES_texture_npot GL_OES_vertex_half_float
GL_OES_vertex_type_10_10_10_2 GL_NV_fence GL_QCOM_driver_control
GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2
GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering
GL_QCOM_memory_monitor
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_CULL_FACE = false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_POLYGON_OFFSET_FILL
= false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_SCISSOR_TEST = false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_SAMPLE_COVERAGE =
false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603):
GL_SAMPLE_ALPHA_TO_COVERAGE = false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_STENCIL_TEST = false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_DEPTH_TEST = false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_BLEND = false
02-20 16:31:45.639: DEBUG/GLes20Renderer(603): GL_DITHER = false
02-20 16:31:45.639: DEBUG/DronskyRenderer(603): set orthographic
02-20 16:31:47.539: DEBUG/EGLHelper(603): EglHelper 1 start()
02-20 16:31:47.539: DEBUG/EGLHelper(603): EglHelper 1 reusing EGL
02-20 16:31:47.539: DEBUG/EGLHelper(603): EglHelper 1 reusing display
02-20 16:31:47.539: DEBUG/EGLHelper(603): EglHelper 1 reusing config
02-20 16:31:47.539: DEBUG/EGLHelper(603): EglHelper 1 reusing context
02-20 16:31:47.609: DEBUG/GLWallpaperService(603):
onSurfaceDestroyed()
02-20 16:31:47.629: DEBUG/EGLHelper(603): EglHelper 1 egl terminated
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en