remote-android / redroid-doc

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

3D mark Vulkan test crash, gfxbench test crash also due to vulkan #205

Closed kevinzs2048 closed 1 year ago

kevinzs2048 commented 2 years ago

Describe the bug 3D mark sling shot extreme, vulkan test crash.

Redroid 12 images, arm64.

make sure the required kernel modules present

collect debug logs


Build fingerprint: 'redroid/redroid_arm64/redroid_arm64:12/SQ1D.220205.004/eng.frank.20220708.094758:userdebug/test-keys' Revision: '0' ABI: 'arm64' Timestamp: 2022-07-22 02:02:54.377252046+0000 Process uptime: 0s Cmdline: com.futuremark.dmandroid.application pid: 6397, tid: 8337, name: Thread-7 >>> com.futuremark.dmandroid.application <<< uid: 10070 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 Cause: null pointer dereference x0 b400f8cfb6123ea0 x1 0000f8ce327f7b00 x2 ffffffffffffffc8 x3 0000f8ce327f7e00 x4 0000f8ce327f7e48 x5 0000000000000004 x6 fefff7ccff64716e x7 7f7fffff7f7f7f7f x8 0000000000000000 x9 b400f8cf3602dbf0 x10 000000003b9af112 x11 0000000000000000 x12 0000000000000038 x13 ffffffffffffffff x14 ff00000000000000 x15 ffffffffffffffff x16 0000f8d0f4b7a3f0 x17 0000f8d0d6239074 x18 0000000000000000 x19 0000f8ce327f7ef8 x20 0000000000000000 x21 0000000000000000 x22 b400f8cfb6123ea0 x23 0000f8ce327f8294 x24 b400f8cf3602dbf0 x25 b400f8cf3602dbf0 x26 0000f8ce327f9000 x27 0000000000000000 x28 b400f8cfc60c3510 x29 0000f8ce327f7e60 lr 0000f8d0e4a1c99c sp 0000f8ce327f7ac0 pc 0000000000000000 pst 0000000060001000

backtrace:

00 pc 0000000000000000

  #01 pc 000000000001a998  /system/lib64/libvulkan.so (vulkan::driver::EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*, VkExtensionProperties*)+404) (BuildId: c339f0cd5f2594662e4c55435aa1bf94)
  #02 pc 0000000000012ec4  /system/lib64/libvulkan.so (vulkan::api::EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*, VkExtensionProperties*)+736) (BuildId: c339f0cd5f2594662e4c55435aa1bf94)
  #03 pc 00000000002ee3f4  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::vulkan::filter_supported_device_extensions(VkPhysicalDevice_T*, unsigned long, char const* const*)+104)
  #04 pc 00000000002f0fa0  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::vulkan::init_device(eva::graphics::vulkan::vulkan_device&, bool, bool)+2260)
  #05 pc 00000000002ed9f4  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::vulkan::vulkan_device::init(void*, void*, int, int, bool, bool)+116)
  #06 pc 00000000002b1970  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (mobile_player::player::player(eva::globals&, eva::ui::settings_listener&, eva::math::vector<int, 2ul>, std::string, std::string const&, eva::ui::invalidatable&, eva::ui::message_pump&, void*, ANativeWindow*, void*, int, eva::graphics::platform)+5004)
  #07 pc 000000000029b5bc  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (android_native::native_application::create_player(std::string, bool, ANativeWindow*)+600)
  #08 pc 00000000002a80d0  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (activity::handle_cmd(android_app*, int)+196)
  #09 pc 00000000005a6cf0  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so
  #10 pc 00000000002a7f4c  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (activity::run()+96)
  #11 pc 00000000002a8288  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so (android_main+84)
  #12 pc 00000000005a66cc  /data/app/~~7ZMa4djLhjnKuQakSF3b6g==/com.futuremark.dmandroid.application-TOwT5D5_l5h0eqEzp95NEg==/lib/arm64/lib3dmark_arkan_vulkan.so
  #13 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
  #14 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)

Screenshots If applicable, add screenshots to help explain your problem.

kevinzs2048 commented 2 years ago

tombstone_01_3dmark-vulkan.txt

The tombstone file is attached.

zhouziyang commented 2 years ago

any more details about your platform (GPU etc.)? and reproduce step (which test in 3DMark)?

kevinzs2048 commented 2 years ago

Hi @zhouziyang , the GPU is AMD WX5100. The launch command is: docker run -itd --privileged -v ~/data:/data -p 32555:5555 redroid/redroid:12.0.0-latest

redroid_arm64:/ $ getprop | grep vulkan

Reproduce:

image

kevinzs2048 commented 2 years ago

For GFXbench, after install, when start, it will crash immediately.

kevinzs2048 commented 1 year ago

Also find something the same crash bug report in Unity: https://forum.unity.com/threads/null-pointer-dereference-in-vulkan-on-development-builds.1292355/

kevinzs2048 commented 1 year ago

The Mesa upstream has a same issues, https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14135#note_1187003. The crash log here is the same with this bug.

Besides, use the test Vulkan test APP referred here: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14016#note_1178735, I got the same error.

So I think in Redroid we should include the patch mentioned in the link

zhouziyang commented 1 year ago

how about redroid11 / redroid13? as discussed in this thread, seems a known issue in Android 12. And I will apply this patch in redroid12. thanks for your feedback!

kevinzs2048 commented 1 year ago

Hi @zhouziyang I confirm that it is the same crash on redroid11 / redroid13.

zhouziyang commented 1 year ago

tested on redroid 11 / redroid 12 (aarch64 / x86_64 with WX5100 / WX 9100, gralloc.gbm / gralloc.cros), the vulkan test cannot pass.

Not sure whether related to radeon vulkan driver. Need deeper investigations.

================= stack trace from 3DMark

08-03 02:39:11.127  3085  3422 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 3422 (Thread-8), pid 3085 (oid.application)
08-03 02:39:16.067  3435  3435 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-03 02:39:16.067  3435  3435 F DEBUG   : Build fingerprint: 'redroid/redroid_arm64/redroid_arm64:12/SQ1D.220205.004/eng.frank.20220708.094758:userdebug/test-keys'
08-03 02:39:16.067  3435  3435 F DEBUG   : Revision: '0'
08-03 02:39:16.067  3435  3435 F DEBUG   : ABI: 'arm64'
08-03 02:39:16.067  3435  3435 F DEBUG   : Timestamp: 2022-08-03 02:39:11.235145869+0000
08-03 02:39:16.067  3435  3435 F DEBUG   : Process uptime: 1s
08-03 02:39:16.067  3435  3435 F DEBUG   : Cmdline: com.futuremark.dmandroid.application
08-03 02:39:16.067  3435  3435 F DEBUG   : pid: 3085, tid: 3422, name: Thread-8  >>> com.futuremark.dmandroid.application <<<
08-03 02:39:16.067  3435  3435 F DEBUG   : uid: 10083
08-03 02:39:16.067  3435  3435 F DEBUG   : tagged_addr_ctrl: 0000000000000001
08-03 02:39:16.067  3435  3435 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
08-03 02:39:16.067  3435  3435 F DEBUG   : Cause: null pointer dereference
08-03 02:39:16.067  3435  3435 F DEBUG   :     x0  b400e7c8a9aebf40  x1  0000000000000400  x2  0000e7c70cec8980  x3  0000000000000000
08-03 02:39:16.067  3435  3435 F DEBUG   :     x4  00000000000000e9  x5  0000000000000000  x6  000000003b9acdea  x7  0000000000000000
08-03 02:39:16.067  3435  3435 F DEBUG   :     x8  0000000000000001  x9  0000000000000000  x10 00000000000000ff  x11 b400e7c88a2f1844
08-03 02:39:16.067  3435  3435 F DEBUG   :     x12 ffffff80ffffffd0  x13 0000000000000000  x14 0000000000000010  x15 0000000000000027
08-03 02:39:16.067  3435  3435 F DEBUG   :     x16 0000e7c63a0a5d00  x17 0000e7c9db5a1ce0  x18 0000000000000000  x19 0000e7c9db619270
08-03 02:39:16.067  3435  3435 F DEBUG   :     x20 0000e7c70cec0000  x21 0000e7c70d49c690  x22 0000e7c70d49c6c0  x23 0000000000000004
08-03 02:39:16.067  3435  3435 F DEBUG   :     x24 0000000000000002  x25 0000e7c70d49cba0  x26 0000e7c70d49ce18  x27 0000e7c70d49cf50
08-03 02:39:16.067  3435  3435 F DEBUG   :     x28 0000e7c70d49cea8  x29 0000e7c70d49dc50
08-03 02:39:16.067  3435  3435 F DEBUG   :     lr  0000e7c70c798c30  sp  0000e7c70d49c5c0  pc  0000e7c70c7a0228  pst 0000000060000000
08-03 02:39:16.067  3435  3435 F DEBUG   : backtrace:
08-03 02:39:16.067  3435  3435 F DEBUG   :       #00 pc 00000000002ef228  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::vulkan::execute_post_present_barrier(eva::graphics::vulkan::vulkan_device&)+72)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #01 pc 00000000002e7c2c  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::vulkan::vulkan_device::begin_frame()+96)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #02 pc 00000000002a9db8  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (mobile_player::player::handle_draw_event()+216)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #03 pc 00000000002a4250  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (android_native::native_application::android_vulkan_callback_wrapper::pump_pending_messages(eva::ui::message_pump_listener&)+56)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #04 pc 0000000000310510  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::ui::loading_screen::progress_made(unsigned long)+200)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #05 pc 000000000030fb04  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::ui::loading_screen::start_new_phase(std::string const&)+36)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #06 pc 000000000045c58c  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::assets::building_progress::start_new_phase(std::string const&)+56)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #07 pc 00000000004f51b4  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::assets::scene_builder::report_progress_phase(std::string const&)+56)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #08 pc 00000000004f6790  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::assets::scene_builder::build_scene(eva::scenestore::scene const&, eva::graphics::rendering::scene_renderer_type, unsigned long, std::string const&, eva::graphics::rendering::rendering_options*)+132)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #09 pc 0000000000459cc0  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::assets::scene_asset::build(eva::scenestore::scene const&, eva::graphics::assets::scene_asset_loading_context const&)+2356)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #10 pc 000000000045b5dc  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::assets::scene_asset::scene_asset(std::string const&, eva::graphics::assets::scene_asset_loading_context const&)+308)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #11 pc 00000000003714d4  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (std::shared_ptr<eva::graphics::assets::scene_asset> eva::graphics::assets::asset_collection<eva::graphics::assets::scene_asset>::create<eva::graphics::assets::scene_asset_loading_context const&>(eva::string_wrapper const&, eva::graphics::assets::scene_asset_loading_context const&, eva::path_wrapper const&, eva::logging::log*)+188)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #12 pc 0000000000371828  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (std::shared_ptr<eva::graphics::assets::scene_asset> eva::graphics::assets::asset_loader::find_or_create<eva::graphics::assets::scene_asset, eva::graphics::assets::scene_asset_loading_context const&>(eva::string_wrapper const&, eva::graphics::assets::scene_asset_loading_context const&)+328)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #13 pc 00000000003718b8  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::assets::get_scene_asset(char const*, eva::graphics::assets::scene_asset_loading_context const&)+80)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #14 pc 00000000003a31b0  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::player::scene_sequence::scene_sequence(eva::config_node const&, eva::globals&, unsigned long, double, double, eva::progress_report&)+1184)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #15 pc 0000000000374b68  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::graphics::assets::timeline_asset::timeline_asset(eva::string_wrapper const&, eva::graphics::assets::timeline_asset_loading_context&)+1092)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #16 pc 00000000002fb714  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (std::shared_ptr<eva::graphics::assets::timeline_asset> eva::graphics::assets::asset_collection<eva::graphics::assets::timeline_asset>::create<eva::graphics::assets::timeline_asset_loading_context&>(eva::string_wrapper const&, eva::graphics::assets::timeline_asset_loading_context&, eva::path_wrapper const&, eva::logging::log*)+172)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #17 pc 00000000002fbcf8  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (eva::ui::timeline_player::load_timeline(boost::filesystem::path const&, eva::progress_report&, bool)+984)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #18 pc 00000000002aa37c  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (mobile_player::player::load_timeline(boost::filesystem::path const&)+164)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #19 pc 00000000002aa66c  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (mobile_player::player::load_timeline()+416)
08-03 02:39:16.067  3435  3435 F DEBUG   :       #20 pc 000000000029b63c  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (android_native::native_application::create_player(std::string, bool, ANativeWindow*)+728)
08-03 02:39:16.068  3435  3435 F DEBUG   :       #21 pc 00000000002a80d0  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (activity::handle_cmd(android_app*, int)+196)
08-03 02:39:16.068  3435  3435 F DEBUG   :       #22 pc 00000000005a6cf0  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so
08-03 02:39:16.068  3435  3435 F DEBUG   :       #23 pc 00000000002a7f4c  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (activity::run()+96)
08-03 02:39:16.068  3435  3435 F DEBUG   :       #24 pc 00000000002a8288  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so (android_main+84)
08-03 02:39:16.068  3435  3435 F DEBUG   :       #25 pc 00000000005a66cc  /data/app/~~4vusGCdCObXR8-fYBUsGWA==/com.futuremark.dmandroid.application-gx43Eqf0l0gXcyeuY8csbA==/lib/arm64/lib3dmark_arkan_vulkan.so
08-03 02:39:16.068  3435  3435 F DEBUG   :       #26 pc 00000000000b1730  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: 03b0760540a6b66046ea8acecbd18950)
08-03 02:39:16.068  3435  3435 F DEBUG   :       #27 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 03b0760540a6b66046ea8acecbd18950)

================= logs from GFXBench -- AZtec Ruins Vulkan (Normal Tier)

08-03 03:00:46.956  5069  5069 I NativeLoader: NativeLoader Loading: gfxb_5
08-03 03:00:46.962  5069  5069 I TfwActivity: [net.kishonti.benchui.BenchTestActivity@f909dd5]: Current display bounds: 1280 x 720
08-03 03:00:46.962  5069  5069 I TfwActivity: [net.kishonti.benchui.BenchTestActivity@f909dd5]: display.getSupportedModes():
08-03 03:00:46.962  5069  5069 I TfwActivity: [net.kishonti.benchui.BenchTestActivity@f909dd5]:     720 x 1280  30.000002 fps
08-03 03:00:46.963  5069  5069 I TfwActivity: [net.kishonti.benchui.BenchTestActivity@f909dd5]: onResume
08-03 03:00:46.974  5069  5069 I TfwActivity: [net.kishonti.benchui.BenchTestActivity@f909dd5]: Surface created: android.view.SurfaceView$2@12b0154
08-03 03:00:46.974  5069  5069 I TfwActivity: [net.kishonti.benchui.BenchTestActivity@f909dd5]: Surface changed: android.view.SurfaceView$2@12b0154
08-03 03:00:46.977  5069  5069 I Runner  : surface.setFrameRate(30.000002)
08-03 03:00:46.986  5069  5069 I _logcat_: Initializing Vulkan context
08-03 03:00:46.990  5069  8360 I GLBNativeLog: Architecture: android-arm64-v8a
08-03 03:00:46.991  5069  8360 I GLBNativeLog: vkCreateInstance
08-03 03:00:46.992  5069  8360 I GLBNativeLog: validation_layers_is_enabled 0
08-03 03:00:46.992  5069  8360 I GLBNativeLog: vkEnumeratePhysicalDevices
08-03 03:00:46.993  5069  8360 I GLBNativeLog: Supported physical devices: 1
08-03 03:00:46.993  5069  8360 I GLBNativeLog: #0:
08-03 03:00:46.993  5069  8360 I GLBNativeLog:  Vendor ID: 0x1002 - Device ID: 0x67c7, Device Name: AMD RADV POLARIS10.
08-03 03:00:46.994  5069  8360 I GLBNativeLog: vkCreateDevice
08-03 03:00:46.994  5069  8360 I GLBNativeLog: robustBufferAccess 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: fullDrawIndexUint32 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: imageCubeArray 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: independentBlend 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: geometryShader 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: tessellationShader 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: sampleRateShading 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: dualSrcBlend 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: logicOp 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: multiDrawIndirect 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: drawIndirectFirstInstance 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: depthClamp 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: depthBiasClamp 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: fillModeNonSolid 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: depthBounds 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: wideLines 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: largePoints 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: multiViewport 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: samplerAnisotropy 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: textureCompressionETC2 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: textureCompressionASTC_LDR 0
08-03 03:00:46.994  5069  8360 I GLBNativeLog: textureCompressionBC 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: occlusionQueryPrecise 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: pipelineStatisticsQuery 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: vertexPipelineStoresAndAtomics 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: fragmentStoresAndAtomics 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderTessellationAndGeometryPointSize 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderImageGatherExtended 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderStorageImageExtendedFormats 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderStorageImageMultisample 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderStorageImageReadWithoutFormat 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderStorageImageWriteWithoutFormat 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderUniformBufferArrayDynamicIndexing 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderSampledImageArrayDynamicIndexing 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderStorageBufferArrayDynamicIndexing 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderStorageImageArrayDynamicIndexing 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderClipDistance 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderCullDistance 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderFloat64 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderInt64 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderInt16 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderResourceResidency 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: shaderResourceMinLod 1
08-03 03:00:46.994  5069  8360 I GLBNativeLog: sparseBinding 1
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidencyBuffer 1
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidencyImage2D 1
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidencyImage3D 0
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidency2Samples 0
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidency4Samples 0
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidency8Samples 0
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidency16Samples 0
08-03 03:00:46.995  5069  8360 I GLBNativeLog: sparseResidencyAliased 1
08-03 03:00:46.995  5069  8360 I GLBNativeLog: variableMultisampleRate 1
08-03 03:00:46.995  5069  8360 I GLBNativeLog: inheritedQueries 1
08-03 03:00:47.039  5069  5069 I Lifecycle: onStop HomeFragment{5890d56 #0 id=0x7f08007c}
08-03 03:00:47.039  5069  5069 I Lifecycle: onStop ResultsFragment{ab9eeb6 #1 id=0x7f08007c}
08-03 03:00:47.039  5069  5069 I Lifecycle: onStop CompareFragment{a620e89 #2 id=0x7f08007c}
08-03 03:00:47.039  5069  5069 I Lifecycle: onStop InfoFragment{199e8fa #3 id=0x7f08007c}
08-03 03:00:47.039  5069  5069 I Lifecycle: onStop SettingsFragmentCommunity{9b89d52 #4 id=0x7f08007c}
08-03 03:00:47.039  5069  5069 I Lifecycle: OnStop net.kishonti.app.MainActivity@4d497a0
08-03 03:00:47.051  5069  8360 I GLBNativeLog: vkCreateAndroidSurfaceKHR: 0xb400fc6aecfe52f0
08-03 03:00:47.052  5069  8360 I GLBNativeLog: vkGetPhysicalDeviceSurfaceSupportKHR
08-03 03:00:47.052  5069  8360 I GLBNativeLog: supportsPresent: 1
08-03 03:00:47.052  5069  8360 I GLBNativeLog: vkGetPhysicalDeviceSurfaceFormatsKHR
08-03 03:00:47.052  5069  8360 W Gralloc4: allocator 3.x is not supported
08-03 03:00:47.052  5069  8360 W Gralloc3: allocator 3.x is not supported
08-03 03:00:47.055  5069  8360 I GLBNativeLog: surfFormats: 5
08-03 03:00:47.056  5069  8360 I GLBNativeLog: #0 - color_format: 37, color_space: 0
08-03 03:00:47.056  5069  8360 I GLBNativeLog: #1 - color_format: 43, color_space: 0
08-03 03:00:47.056  5069  8360 I GLBNativeLog: #2 - color_format: 4, color_space: 0
08-03 03:00:47.056  5069  8360 I GLBNativeLog: #3 - color_format: 97, color_space: 0
08-03 03:00:47.056  5069  8360 I GLBNativeLog: #4 - color_format: 64, color_space: 0
08-03 03:00:47.056  5069  8360 I GLBNativeLog: selected format: #0
08-03 03:00:47.056  5069  8360 I GLBNativeLog: vkGetPhysicalDeviceSurfaceCapabilitiesKHR
08-03 03:00:47.056  5069  8360 I GLBNativeLog: VkSurfaceCapabilitiesKHR
08-03 03:00:47.056  5069  8360 I GLBNativeLog: minImageCount: 2
08-03 03:00:47.056  5069  8360 I GLBNativeLog: maxImageCount: 64
08-03 03:00:47.056  5069  8360 I GLBNativeLog: currentExtent: 1184, 720
08-03 03:00:47.056  5069  8360 I GLBNativeLog: minImageExtent: 1, 1
08-03 03:00:47.056  5069  8360 I GLBNativeLog: maxImageExtent: 4096, 4096
08-03 03:00:47.056  5069  8360 I GLBNativeLog: supportedTransforms: 1ff
08-03 03:00:47.056  5069  8360 I GLBNativeLog: supportedCompositeAlpha: 8
08-03 03:00:47.056  5069  8360 I GLBNativeLog: supportedUsageFlags: 9f
08-03 03:00:47.056  5069  8360 I GLBNativeLog: Chosen Image Count: 2
08-03 03:00:47.056  5069  8360 I GLBNativeLog: vkGetPhysicalDeviceSurfacePresentModesKHR
08-03 03:00:47.056  5069  8360 I GLBNativeLog: presentModes: 2:
08-03 03:00:47.056  5069  8360 I GLBNativeLog: #0 - 1,
08-03 03:00:47.056  5069  8360 I GLBNativeLog: #1 - 2,
08-03 03:00:47.056  5069  8360 I GLBNativeLog:
08-03 03:00:47.056  5069  8360 I GLBNativeLog: vkCreateSwapchainKHR
08-03 03:00:47.056  5069  8360 I GLBNativeLog: extent: 1184, 720
08-03 03:00:47.056  5069  8360 I GLBNativeLog: presentMode:2, preTransform: 1, compositeAlpha:8
08-03 03:00:47.085  5069  5069 I TfwActivity: [net.kishonti.benchui.BenchTestActivity@f909dd5]: onFocus changed net.kishonti.benchui.BenchTestActivity@f909dd5 hasFocus: true
08-03 03:00:47.172  5069  8363 I k.glbenchmark2: Starting a blocking GC NativeAlloc
08-03 03:00:47.207  5069  5088 W System  : A resource failed to call close.
08-03 03:00:47.207  5069  5088 W System  : A resource failed to call close.
08-03 03:00:47.207  5069  5088 W SQLiteConnectionPool: A SQLiteConnection object for database '/storage/emulated/0/Android/data/com.glbenchmark.glbenchmark27/files/compare/top-results.sqlite' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
08-03 03:00:47.207  5069  5088 W System  : A resource failed to call close.
08-03 03:01:13.477  5069  8360 I GLBNativeLog: Effective Swap Chain Length: 1535900248
08-03 03:01:13.478  5069  8360 E NativeLog: signal received: 11
08-03 03:01:13.478  5069  8360 W System.err: Native received signal: 11
08-03 03:01:13.478  5069  8360 W System.err: Oooops... we gonna die
08-03 03:01:13.478  5069  8360 E NativeLog: signal handled - java called
08-03 03:01:13.478  5069  8360 E NativeLog: calling old signal handler: 0xfc6c03700ce0
--------- beginning of crash
08-03 03:01:13.478  5069  8360 F libc    : Fatal signal -788052993 (?), code -1458016260 (? from pid -1457889288, uid -145) in tid 8360 (Runner: vulkan_), pid 5069 (k.glbenchmark27)
08-03 03:01:13.479  5069  8360 F libc    : failed to write crash info: Bad address
kevinzs2048 commented 1 year ago

@zhouziyang Does the test include the patch?

zhouziyang commented 1 year ago

@zhouziyang Does the test include the patch?

Included. And the stack trace is different.

should investigate whether related to mis-config of redroid or mesa problem.

zhouziyang commented 1 year ago

the previous builds works (build mesa3d / llvm in AOSP). I will check what's wrong with the local prebuilts.

zhouziyang commented 1 year ago

FYI: GLES: AMD, AMD POLARIS10 (LLVM 12.0.0, DRM 3.42, 5.15.0-33-generic), OpenGL ES 3.2 Mesa 22.0.0-devel AMD Radeon Pro WX 5100 Graphics

image

kevinzs2048 commented 1 year ago

@zhouziyang Oh nice, good to hear that we have something new. For the easy test and try, could you help to upload the image to somewhere? So that I can do more test against the Vulkan with Redroid.

zhouziyang commented 1 year ago

I use locally built images.

changes:

external/gbm_gralloc: checkout redroid-12.0.0 external/mesa: checkout redroid-12.0.0 external/llvm-project: checkout redroid-12.0.0 external/libdrm: update to android-t-preview-1

device/redroid:

diff --git a/redroid.mk b/redroid.mk
index 7733ffd..15209b9 100644
--- a/redroid.mk
+++ b/redroid.mk
@@ -128,4 +128,14 @@ $(call inherit-product-if-exists, product.mk)

 $(call inherit-product, vendor/redroid/vendor.mk)

-$(call inherit-product, device/redroid-prebuilts/prebuilts.mk)
+#$(call inherit-product, device/redroid-prebuilts/prebuilts.mk)
+
+PRODUCT_PACKAGES += \
+    libEGL_mesa \
+    libGLESv1_CM_mesa \
+    libGLESv2_mesa \
+    libgallium_dri \
+    libglapi \
+    vulkan.radeon \
+    gralloc.gbm \
diff --git a/redroid_arm64/BoardConfig.mk b/redroid_arm64/BoardConfig.mk
index de0f1ea..a9c81dc 100644
--- a/redroid_arm64/BoardConfig.mk
+++ b/redroid_arm64/BoardConfig.mk
@@ -20,3 +20,6 @@ BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 16777216

 DEVICE_MANIFEST_FILE += device/redroid/manifest.xml

+BOARD_MESA3D_USES_MESON_BUILD := true
+BOARD_MESA3D_VULKAN_DRIVERS := amd
+BOARD_MESA3D_GALLIUM_DRIVERS := radeonsi
diff --git a/redroid_arm64/device.mk b/redroid_arm64/device.mk
index aac7ddb..1513fcd 100644
--- a/redroid_arm64/device.mk
+++ b/redroid_arm64/device.mk
@@ -1,4 +1,4 @@
 PRODUCT_COPY_FILES += \
     device/redroid/mediacodec.policy.arm:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \

-$(call inherit-product, device/redroid-prebuilts/prebuilts_arm.mk)
+#$(call inherit-product, device/redroid-prebuilts/prebuilts_arm.mk)
kevinzs2048 commented 1 year ago

Hi @zhouziyang, I'm not quite sure how to do the local build. Now what I do today is follow your document: https://github.com/remote-android/redroid-doc/tree/master/android-builder-docker, and now I can build the redroid12 images.

But you mention the changes above, I wonder how could I change the file in the above comment to do the local build? Because that I can not find the the mesa directory redroid/external/mesa

zhouziyang commented 1 year ago

I use NDK to perform the local builds.

Mesa3d / LLVM is a little difficult to fit into AOSP build process.

robintonny commented 1 year ago

For GFXbench, after install, when start, it will crash immediately.

hi bro,how to solve this problem