[Mesa-dev] [Bug 107351] Android 8.1: radv segfault with 3Dmark vulkan benchmarks

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 26 23:16:44 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=107351

--- Comment #11 from Mauro Rossi <issor.oruam at gmail.com> ---
Hi Bas, 
thanks for your instructions

I've tracked the line crashing in the radv_image.c file in master branch

utente at utente-MS-7576:~/oreo-x86_hwc1$ addr2line -Cfe
out/target/product/x86_64/symbols/system/vendor/lib/hw/vulkan.radv.so 
000f3407
vk_format_get_nr_components
external/mesa/src/amd/vulkan/vk_format.h:535
000f45e6
radv_CreateImage
external/mesa/src/amd/vulkan/radv_image.c:1261
^C

I don't trust too much addr2lib when the most recent code line is an header,
so I added ALOGD lines with LOG_TAG RADV 
in order to have the incremental inspection of 
radv_image_from_gralloc() arguments to expose the
argument affected by null pointer, here is what I did:


>From f2db3b5a70aaf66e9bf60c42da99560e6e5b6c13 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam at gmail.com>
Date: Thu, 26 Jul 2018 23:48:54 +0200
Subject: [PATCH] DO NOT MERGE: add incremental dump of
 radv_image_from_gralloc() arguments

Looking at the line crashing we will identity the argument with null pointer
---
 src/amd/vulkan/radv_image.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 826f898d28..b1141c71e2 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -25,6 +25,9 @@
  * IN THE SOFTWARE.
  */

+#define LOG_TAG "RADV"
+
+#include <cutils/log.h>
 #include "radv_debug.h"
 #include "radv_private.h"
 #include "vk_format.h"
@@ -1248,7 +1251,11 @@ radv_CreateImage(VkDevice device,
 #ifdef ANDROID
        const VkNativeBufferANDROID *gralloc_info =
                vk_find_struct_const(pCreateInfo->pNext,
NATIVE_BUFFER_ANDROID);
-
+       ALOGD("radv_image_from_gralloc() device=0x%x", device);
+       ALOGD("radv_image_from_gralloc() *pCreateInfo=0x%x", *pCreateInfo);
+       ALOGD("radv_image_from_gralloc() gralloc_info=0x%x", gralloc_info);
+       ALOGD("radv_image_from_gralloc() *pAllocator=0x%x", *pAllocator);
+       ALOGD("radv_image_from_gralloc() *pImage=0x%x", *pImage);
        if (gralloc_info)
                return radv_image_from_gralloc(device, pCreateInfo,
gralloc_info,
                                              pAllocator, pImage);
-- 
2.17.1


The output in the logcat is:

... D RADV    : radv_image_from_gralloc() device=
... D RADV    : radv_image_from_gralloc() *pCreateInfo=0xe
... D RADV    : radv_image_from_gralloc() gralloc_info=0xc502a0e8
... F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10 in tid 5548
(Thread-9), pid 5501 (cation:workload)

The crash happened with pAllocator, so this argument is the null pointer.
Mauro

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180726/a21a0bdf/attachment.html>


More information about the mesa-dev mailing list