remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.33k stars 310 forks source link

Some app crashed in libGLESv2_swiftshader.so #40

Closed dengrui closed 2 years ago

dengrui commented 3 years ago

Hi, I open some app but it crashed after show it's main activity briefly.

my enviroment: ubuntu18.04 + redroid/redroid:10.0.0-arm64

log:

pid: 15257, tid: 15554, name: RenderThread  >>> com.yibasan.lizhifm <<<
uid: 10091
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
Cause: null pointer dereference
    r0  00000004  r1  c127a404  r2  00000000  r3  00000008
    r4  00000000  r5  f5f8dd60  r6  c9500000  r7  00000000
    r8  c1277e64  r9  c1279b10  r10 c1279b1c  r11 b9553aa0
    ip  80000000  sp  b9553998  lr  dbe0449b  pc  dbddae6e

backtrace:
      #00 pc 00281e6e  /vendor/lib/egl/libGLESv2_swiftshader.so (rr::Routine::bind()+6) (BuildId: 5995cdc5eec4c0fe6a15ff7ead86e652)
      #01 pc 002ab497  /vendor/lib/egl/libGLESv2_swiftshader.so (sw::LRUCache<sw::VertexProcessor::State, rr::Routine>::add(sw::VertexProcessor::State const&, rr::Routine*)+46) (BuildId: 5995cdc5eec4c0fe6a15ff7ead86e652)
      #02 pc 002ab3d5  /vendor/lib/egl/libGLESv2_swiftshader.so (sw::VertexProcessor::routine(sw::VertexProcessor::State const&)+120) (BuildId: 5995cdc5eec4c0fe6a15ff7ead86e652)
      #03 pc 00288119  /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::draw(sw::DrawType, unsigned int, unsigned int, bool)+600) (BuildId: 5995cdc5eec4c0fe6a15ff7ead86e652)
      #04 pc 002239df  /vendor/lib/egl/libGLESv2_swiftshader.so (es2::Device::drawIndexedPrimitive(sw::DrawType, unsigned int, unsigned int)+38) (BuildId: 5995cdc5eec4c0fe6a15ff7ead86e652)
      #05 pc 00220941  /vendor/lib/egl/libGLESv2_swiftshader.so (es2::Context::drawElements(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*, int)+336) (BuildId: 5995cdc5eec4c0fe6a15ff7ead86e652)
      #06 pc 0022dd7f  /vendor/lib/egl/libGLESv2_swiftshader.so (gl::DrawRangeElements(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*)+114) (BuildId: 5995cdc5eec4c0fe6a15ff7ead86e652)
      #07 pc 001188b9  /system/lib/libhwui.so (_ZZN12GrGLFunctionIFvjjjijPKvEEC1EPS2_ENUlS1_jjjijS1_E_8__invokeES1_jjjijS1_+26) (BuildId: f19dd92989e520d095a65634154a7af9)
      #08 pc 001c3eb7  /system/lib/libhwui.so (GrGLGpu::sendIndexedMeshToGpu(GrPrimitiveType, GrBuffer const*, int, int, unsigned short, unsigned short, GrBuffer const*, int, GrPrimitiveRestart)+102) (BuildId: f19dd92989e520d095a65634154a7af9)
      #09 pc 001c3d97  /system/lib/libhwui.so (non-virtual thunk to GrGLGpu::sendIndexedMeshToGpu(GrPrimitiveType, GrBuffer const*, int, int, unsigned short, unsigned short, GrBuffer const*, int, GrPrimitiveRestart)+30) (BuildId: f19dd92989e520d095a65634154a7af9)
      #10 pc 001c3cdb  /system/lib/libhwui.so (GrMesh::sendToGpu(GrMesh::SendToGpuImpl*) const+114) (BuildId: f19dd92989e520d095a65634154a7af9)
      #11 pc 001c3a83  /system/lib/libhwui.so (GrGLGpu::draw(GrRenderTarget*, GrSurfaceOrigin, GrPrimitiveProcessor const&, GrPipeline const&, GrPipeline::FixedDynamicState const*, GrPipeline::DynamicStateArrays const*, GrMesh const*, int)+190) (BuildId: f19dd92989e520d095a65634154a7af9)
      #12 pc 001c39bd  /system/lib/libhwui.so (GrGLGpuRTCommandBuffer::onDraw(GrPrimitiveProcessor const&, GrPipeline const&, GrPipeline::FixedDynamicState const*, GrPipeline::DynamicStateArrays const*, GrMesh const*, int, SkRect const&)+28) (BuildId: f19dd92989e520d095a65634154a7af9)
      #13 pc 0016b153  /system/lib/libhwui.so (GrGpuRTCommandBuffer::draw(GrPrimitiveProcessor const&, GrPipeline const&, GrPipeline::FixedDynamicState const*, GrPipeline::DynamicStateArrays const*, GrMesh const*, int, SkRect const&)+96) (BuildId: f19dd92989e520d095a65634154a7af9)
      #14 pc 0016adbd  /system/lib/libhwui.so (GrOpFlushState::executeDrawsAndUploadsForMeshDrawOp(GrOp const*, SkRect const&, GrProcessorSet&&, unsigned int, GrUserStencilSettings const*)+312) (BuildId: f19dd92989e520d095a65634154a7af9)
      #15 pc 001fd223  /system/lib/libhwui.so (GrSimpleMeshDrawOpHelper::executeDrawsAndUploads(GrOp const*, GrOpFlushState*, SkRect const&)+58) (BuildId: f19dd92989e520d095a65634154a7af9)
      #16 pc 00392b07  /system/lib/libhwui.so (GrOp::execute(GrOpFlushState*, SkRect const&)+38) (BuildId: f19dd92989e520d095a65634154a7af9)
      #17 pc 001151f3  /system/lib/libhwui.so (GrRenderTargetOpList::onExecute(GrOpFlushState*)+266) (BuildId: f19dd92989e520d095a65634154a7af9)
      #18 pc 001eb82f  /system/lib/libhwui.so (GrDrawingManager::executeOpLists(int, int, GrOpFlushState*, int*)+274) (BuildId: f19dd92989e520d095a65634154a7af9)
      #19 pc 001fcfb7  /system/lib/libhwui.so (GrDrawingManager::flush(GrSurfaceProxy*, SkSurface::BackendSurfaceAccess, GrFlushFlags, int, GrBackendSemaphore*, void (*)(void*), void*)+790) (BuildId: f19dd92989e520d095a65634154a7af9)
      #20 pc 001fcc0b  /system/lib/libhwui.so (GrDrawingManager::prepareSurfaceForExternalIO(GrSurfaceProxy*, SkSurface::BackendSurfaceAccess, GrFlushFlags, int, GrBackendSemaphore*, void (*)(void*), void*)+110) (BuildId: f19dd92989e520d095a65634154a7af9)
      #21 pc 001fcae1  /system/lib/libhwui.so (GrRenderTargetContext::prepareForExternalIO(SkSurface::BackendSurfaceAccess, GrFlushFlags, int, GrBackendSemaphore*, void (*)(void*), void*)+88) (BuildId: f19dd92989e520d095a65634154a7af9)
      #22 pc 001fca81  /system/lib/libhwui.so (SkGpuDevice::flush()+22) (BuildId: f19dd92989e520d095a65634154a7af9)
      #23 pc 001b942f  /system/lib/libhwui.so (android::uirenderer::skiapipeline::SkiaPipeline::renderFrame(android::uirenderer::LayerUpdateQueue const&, SkRect const&, std::__1::vector<android::sp<android::uirenderer::RenderNode>, std::__1::allocator<android::sp<android::uirenderer::RenderNode>>> const&, bool, android::uirenderer::Rect const&, sk_sp<SkSurface>, SkMatrix const&)+142) (BuildId: f19dd92989e520d095a65634154a7af9)
      #24 pc 001b9151  /system/lib/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::draw(android::uirenderer::renderthread::Frame const&, SkRect const&, SkRect const&, android::uirenderer::LightGeometry const&, android::uirenderer::LayerUpdateQueue*, android::uirenderer::Rect const&, bool, android::uirenderer::LightInfo const&, std::__1::vector<android::sp<android::uirenderer::RenderNode>, std::__1::allocator<android::sp<android::uirenderer::RenderNode>>> const&, android::uirenderer::FrameInfoVisualizer*)+272) (BuildId: f19dd92989e520d095a65634154a7af9)
      #25 pc 001f9653  /system/lib/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+218) (BuildId: f19dd92989e520d095a65634154a7af9)
      #26 pc 001f8c2b  /system/lib/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+174) (BuildId: f19dd92989e520d095a65634154a7af9)
      #27 pc 00206b93  /system/lib/libhwui.so (android::uirenderer::WorkQueue::process()+158) (BuildId: f19dd92989e520d095a65634154a7af9)
      #28 pc 002069eb  /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+54) (BuildId: f19dd92989e520d095a65634154a7af9)
      #29 pc 0000d88f  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+186) (BuildId: d3999cc9ed69f005b8c0b7c8b4079631)
      #30 pc 000a6bb7  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 435c90de32a2025e44fd745e5a74a3fb)
      #31 pc 00060027  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 435c90de32a2025e44fd745e5a74a3fb)

Appreciate some help.

zhouziyang commented 3 years ago

I can reproduce this issue in redroid:10.0.0-arm64 with swiftshader gles rendering. well, this issue is gone after enable GPU rendering. actually, swiftshader is deprecated, and switched to angle (based on vulkan.pastel). suggestions:

  1. use GPU rendering
  2. use redroid:12.0.0-latest
  3. upgrade angle and swiftshader