Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to AHB VUs and Tests #2014

Merged

Conversation

sfricke-samsung
Copy link
Contributor

closes #2004

The first commit is a need dependency that removes
VUID-vkGetBufferMemoryRequirements-buffer-04003
VUID-VkBufferMemoryRequirementsInfo2-buffer-04005
From internal Vulkan MR 3982, it was decided these should never have been added (and will be gone in a future header now). I have written positive tests to prevent regression

Added positive test to check for export AHB from both a vkBuffer and vkImage which caught the issue reported in #2004 from calling ValidateInsertImageMemoryRange() when it is an export VkImage AHB and allocationSize is suppose to be 0

@mark-lunarg mark-lunarg self-assigned this Jul 9, 2020
@mark-lunarg
Copy link
Contributor

Running through CI.

@sfricke-samsung sfricke-samsung changed the title Sfricke samsung y fixahb Fixes to AHB VUs and Tests Jul 10, 2020
@mark-lunarg
Copy link
Contributor

Hey Spencer, on Android this passes on Pixel3 XL and NexusPlayer, but crashes on the GalaxyS10 and ShieldTV -- here's some loginfo:

GalaxyS10 logcat:

07-10 08:45:24.315 30471 30541 I VulkanLayerValidationTests: [ RUN ] VkLayerTest.AndroidHardwareBufferInvalidBindBufferMemory
07-10 08:45:24.336 30471 30541 I vulkan : Loaded layer VK_LAYER_KHRONOS_validation
07-10 08:45:24.393 5333 5416 E gralloc : Producer and consumer not identified.
07-10 08:45:24.393 5333 5416 E gralloc : ERROR: Unrecognized and/or unsupported format 0x21 and usage 0x800000
07-10 08:45:24.393 5333 5416 E gralloc : Failed to allocate buffer.
07-10 08:45:24.399 30471 30541 E GraphicBufferAllocator: Failed to allocate (64 x 1) layerCount 1 format 33 usage 1000000: 5
07-10 08:45:24.399 30471 30541 D GraphicBufferAllocator: Allocated buffers:
07-10 08:45:24.399 30471 30541 D GraphicBufferAllocator: 0x7483800800: 16.00 KiB | 64 ( 64) x 64 | 1 | 2 | 0x100 | AHardwareBuffer pid [30471]
07-10 08:45:24.399 30471 30541 D GraphicBufferAllocator: Total allocated (estimate): 16.00 KB
07-10 08:45:24.399 30471 30541 D GraphicBufferAllocator: -------------------------Start to dump Gralloc buffers info------------------------
07-10 08:45:24.399 30471 30541 D GraphicBufferAllocator: handle | width | height | stride | req format |internal format|consumer usage|producer usage| fd | fd1 | fd2 | AFBC |
07-10 08:45:24.399 30471 30541 D GraphicBufferAllocator: ------------+-------+--------+--------+----------------+---------------+--------------+--------------+-----------+------+
07-10 08:45:24.399 30471 30541 D GraphicBufferAllocator: ---------------------End dump Gralloc buffers info with num 0----------------------
07-10 08:45:24.399 30471 30541 E AHardwareBuffer: GraphicBuffer(w=64, h=1, lc=1) failed (Out of memory), handle=0x0
07-10 08:45:24.400 30471 30541 W ValidationTest: 0xebadde09 skipped times: 0
--------- beginning of crash
07-10 08:45:24.402 30471 30541 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x100000050 in tid 30541 (Thread-6), pid 30471 (ValidationTests)
07-10 08:45:24.467 2193 2193 E crash_dump64: unknown process state: t
07-10 08:45:24.499 2193 2193 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
07-10 08:45:24.507 5560 5560 I /system/bin/tombstoned: received crash request for pid 30541
07-10 08:45:24.512 2193 2193 I crash_dump64: performing dump of process 30471 (target tid = 30541)
07-10 08:45:24.529 2193 2193 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-10 08:45:24.529 2193 2193 F DEBUG : Build fingerprint: 'samsung/beyond1ltexx/beyond1:10/QP1A.190711.020/G973FXXS4BTB3:user/release-keys'
07-10 08:45:24.529 2193 2193 F DEBUG : Revision: '26'
07-10 08:45:24.529 2193 2193 F DEBUG : ABI: 'arm64'
07-10 08:45:24.530 2193 2193 F DEBUG : Timestamp: 2020-07-10 08:45:24-0600
07-10 08:45:24.530 2193 2193 F DEBUG : pid: 30471, tid: 30541, name: Thread-6 >>> com.example.VulkanLayerValidationTests <<<
07-10 08:45:24.530 2193 2193 F DEBUG : uid: 11625
07-10 08:45:24.530 2193 2193 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x100000050
07-10 08:45:24.530 2193 2193 F DEBUG : x0 0000000100000000 x1 000000749edd642c x2 000000749edd6420 x3 0000000000000004
07-10 08:45:24.530 2193 2193 F DEBUG : x4 0000000000000000 x5 0000007481001159 x6 00000074ffa1c980 x7 00000074ffb76010
07-10 08:45:24.530 2193 2193 F DEBUG : x8 e76514750c2c14fb x9 000000003b9cc1ea x10 e76514750c2c14fb x11 0000007480000000
07-10 08:45:24.530 2193 2193 F DEBUG : x12 00000000669be738 x13 0000000000000000 x14 0000007480fe2b1d x15 0000000000000002
07-10 08:45:24.530 2193 2193 F DEBUG : x16 000000758ff5b308 x17 000000759296ab20 x18 000000749e058000 x19 00000000c4641cbd
07-10 08:45:24.530 2193 2193 F DEBUG : x20 000000749edd6590 x21 0000000100000000 x22 00000074ffa011c0 x23 000000749edd7020
07-10 08:45:24.530 2193 2193 F DEBUG : x24 000000749edd7020 x25 000000749edd68d8 x26 0000000000000000 x27 000000749d7d4000
07-10 08:45:24.530 2193 2193 F DEBUG : x28 000000003b9bdf58 x29 000000749edd6520
07-10 08:45:24.531 2193 2193 F DEBUG : sp 000000749edd63d0 lr 00000074eb410630 pc 00000074eb3415f8
07-10 08:45:24.547 2193 2193 F DEBUG :
07-10 08:45:24.547 2193 2193 F DEBUG : backtrace:
07-10 08:45:24.547 2193 2193 F DEBUG : #00 pc 00000000009f35f8 /vendor/lib64/egl/libGLES_mali.so (BuildId: b82e320b3685019f4c9d9c2dcf6f6d5c)
07-10 08:45:24.547 2193 2193 F DEBUG : #1 pc 0000000000ac262c /vendor/lib64/egl/libGLES_mali.so (BuildId: b82e320b3685019f4c9d9c2dcf6f6d5c)
07-10 08:45:24.547 2193 2193 F DEBUG : #2 pc 0000000000ac2450 /vendor/lib64/egl/libGLES_mali.so (BuildId: b82e320b3685019f4c9d9c2dcf6f6d5c)
07-10 08:45:24.547 2193 2193 F DEBUG : #3 pc 00000000008c97b0 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 2677e71f838d8f86d1ad6f99f30e3ee3bc7fdabf)
07-10 08:45:24.547 2193 2193 F DEBUG : #4 pc 000000000079b894 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 2677e71f838d8f86d1ad6f99f30e3ee3bc7fdabf)
07-10 08:45:24.547 2193 2193 F DEBUG : #5 pc 000000000079ccec /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 2677e71f838d8f86d1ad6f99f30e3ee3bc7fdabf)
07-10 08:45:24.547 2193 2193 F DEBUG : #6 pc 00000000008f0c84 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 2677e71f838d8f86d1ad6f99f30e3ee3bc7fdabf)
07-10 08:45:24.547 2193 2193 F DEBUG : #7 pc 000000000001bdfc /system/lib64/libvulkan.so (vulkan::api::(anonymous namespace)::AllocateMemory(VkDevice_T*, VkMemoryAllocateInfo const*, VkAllocationCallbacks const*, VkDeviceMemory_T**)+180) (BuildId: d569637329ba16330d390540dee0e601)
07-10 08:45:24.547 2193 2193 F DEBUG : #8 pc 00000000002ac08c /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #9 pc 00000000003d5fac /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (testing::Test::Run()+664) (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #10 pc 00000000003d75dc /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestInfo::Run()+672) (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #11 pc 00000000003d7ba4 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestSuite::Run()+272) (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #12 pc 00000000003e5c28 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (testing::internal::UnitTestImpl::RunAllTests()+1204) (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #13 pc 00000000003e5638 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (testing::UnitTest::Run()+124) (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #14 pc 0000000000209580 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #15 pc 00000000003c31c0 /data/app/com.example.VulkanLayerValidationTests-iylCYpYCBM1oa_XCPraohg==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: 2083204e97c232bd821e09e646aba3a2ddc7fec2)
07-10 08:45:24.547 2193 2193 F DEBUG : #16 pc 00000000000e3b14 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 220051b49364b1c2da3adf10c30832cc)
07-10 08:45:24.547 2193 2193 F DEBUG : #17 pc 0000000000085330 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 220051b49364b1c2da3adf10c30832cc)

ShieldTV logcat:

12-15 16:41:38.363 14307 14341 I VulkanLayerValidationTests: [ RUN ] VkLayerTest.AndroidHardwareBufferInvalidBindBufferMemory
12-15 16:41:38.378 14307 14341 I vulkan : Loaded layer VK_LAYER_KHRONOS_validation
12-15 16:41:38.392 14307 14341 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 1
12-15 16:41:38.392 14307 14341 I chatty : uid=17470(com.example.VulkanLayerValidationTests) identical 18 lines
12-15 16:41:38.393 14307 14341 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 1
12-15 16:41:38.495 14307 14341 I VulkanLayerValidationTests: [ UNEXPECTED_ERR ] 'Validation Error: [ VUID-vkBindBufferMemory-memory-parameter ] Object 0: handle = 0x297f101650, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xe9199965 | Invalid VkDeviceMemory Object 0x2975033f08. The Vulkan spec states: memory must be a valid VkDeviceMemory handle (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkBindBufferMemory-memory-parameter)'
12-15 16:41:38.496 14307 14341 I VulkanLayerValidationTests: *** Failure in jni/../../tests/vkrenderframework.cpp:185 Failed
12-15 16:41:38.496 14307 14341 I VulkanLayerValidationTests: Did not receive expected error 'VUID-vkBindBufferMemory-size-01037'
--------- beginning of crash
12-15 16:41:38.496 14307 14341 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x128 in tid 14341 (Thread-2), pid 14307 (ValidationTests)
12-15 16:41:38.595 14402 14402 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
12-15 16:41:38.597 3450 3450 I /system/bin/tombstoned: received crash request for pid 14341
12-15 16:41:38.598 14402 14402 I crash_dump64: performing dump of process 14307 (target tid = 14341)
12-15 16:41:38.610 14402 14402 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-15 16:41:38.610 14402 14402 F DEBUG : Build fingerprint: 'NVIDIA/darcy/darcy:9/PPR1.180610.011/4086637_1697.8089:user/release-keys'
12-15 16:41:38.610 14402 14402 F DEBUG : Revision: '0'
12-15 16:41:38.610 14402 14402 F DEBUG : ABI: 'arm64'
12-15 16:41:38.610 14402 14402 F DEBUG : pid: 14307, tid: 14341, name: Thread-2 >>> com.example.VulkanLayerValidationTests <<<
12-15 16:41:38.610 14402 14402 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x128
12-15 16:41:38.610 14402 14402 F DEBUG : Cause: null pointer dereference
12-15 16:41:38.610 14402 14402 F DEBUG : x0 0000002997387800 x1 0000002995a30050 x2 0000002975033f08 x3 0000000000000000
12-15 16:41:38.610 14402 14402 F DEBUG : x4 0000000000000299 x5 000000299a141159 x6 000000299759bb00 x7 000000297f10e010
12-15 16:41:38.610 14402 14402 F DEBUG : x8 000000000000000a x9 0000000000000000 x10 0000000000000001 x11 0000000000000000
12-15 16:41:38.610 14402 14402 F DEBUG : x12 0000002999bd9b1c x13 0000000000000000 x14 000000299a122b1d x15 0000000000000002
12-15 16:41:38.610 14402 14402 F DEBUG : x16 000000299a5b7308 x17 00000028f3143410 x18 0000000000000001 x19 0000002997387800
12-15 16:41:38.610 14402 14402 F DEBUG : x20 0000002975033f08 x21 0000002995a30050 x22 0000002997343000 x23 0000002997387800
12-15 16:41:38.610 14402 14402 F DEBUG : x24 000000298e965588 x25 9ddfea08eb382d69 x26 0000000000000000 x27 000000297f0c31c8
12-15 16:41:38.610 14402 14402 F DEBUG : x28 0000000000000000 x29 000000298e964fc0
12-15 16:41:38.610 14402 14402 F DEBUG : sp 000000298e964f30 lr 0000002999cf1030 pc 0000002999b50cc8
12-15 16:41:38.613 14402 14402 F DEBUG :
12-15 16:41:38.613 14402 14402 F DEBUG : backtrace:
12-15 16:41:38.613 14402 14402 F DEBUG : #00 pc 0000000000750cc8 /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVkLayer_khronos_validation.so
12-15 16:41:38.613 14402 14402 F DEBUG : #1 pc 00000000008f102c /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVkLayer_khronos_validation.so
12-15 16:41:38.613 14402 14402 F DEBUG : #2 pc 00000000002ac1a0 /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so
12-15 16:41:38.613 14402 14402 F DEBUG : #3 pc 00000000003d5fac /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so (testing::Test::Run()+664)
12-15 16:41:38.613 14402 14402 F DEBUG : #4 pc 00000000003d75dc /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestInfo::Run()+672)
12-15 16:41:38.613 14402 14402 F DEBUG : #5 pc 00000000003d7ba4 /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestSuite::Run()+272)
12-15 16:41:38.613 14402 14402 F DEBUG : #6 pc 00000000003e5c28 /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so (testing::internal::UnitTestImpl::RunAllTests()+1204)
12-15 16:41:38.613 14402 14402 F DEBUG : #7 pc 00000000003e5638 /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so (testing::UnitTest::Run()+124)
12-15 16:41:38.613 14402 14402 F DEBUG : #8 pc 0000000000209580 /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so
12-15 16:41:38.613 14402 14402 F DEBUG : #9 pc 00000000003c31c0 /data/app/com.example.VulkanLayerValidationTests-5MjewDEswXdBwaLBy6JTZQ==/lib/arm64/libVulkanLayerValidationTests.so
12-15 16:41:38.613 14402 14402 F DEBUG : #10 pc 0000000000081978 /system/lib64/libc.so (__pthread_start(void*)+36)
12-15 16:41:38.613 14402 14402 F DEBUG : #11 pc 00000000000234b8 /system/lib64/libc.so (__start_thread+68)

@sfricke-samsung
Copy link
Contributor Author

Thanks, the GalaxyS10 is still that stupid gralloc bug when trying to allocate the AHB, still trying to get my hands on similar device to figure out work around for testing, for the Shield, seems vkAllocateMemory failed and i didn't check for that... will fix it up!

@mark-lunarg
Copy link
Contributor

Running through CI.

@mark-lunarg
Copy link
Contributor

Same result, sorry. Lemme know if you need a copy of the log or anything like that.

07-14 09:05:58.347 10636 10701 I VulkanLayerValidationTests: [ RUN ] VkLayerTest.AndroidHardwareBufferInvalidBindBufferMemory
07-14 09:05:58.369 10636 10701 I vulkan : Loaded layer VK_LAYER_KHRONOS_validation
07-14 09:05:58.418 5333 9984 E gralloc : Producer and consumer not identified.
07-14 09:05:58.418 5333 9984 E gralloc : ERROR: Unrecognized and/or unsupported format 0x21 and usage 0x800000
07-14 09:05:58.418 5333 9984 E gralloc : Failed to allocate buffer.
07-14 09:05:58.419 10636 10701 E GraphicBufferAllocator: Failed to allocate (64 x 1) layerCount 1 format 33 usage 1000000: 5
07-14 09:05:58.419 10636 10701 D GraphicBufferAllocator: Allocated buffers:
07-14 09:05:58.419 10636 10701 D GraphicBufferAllocator: 0x7484f08340: 16.00 KiB | 64 ( 64) x 64 | 1 | 2 | 0x100 | AHardwareBuffer pid [10636]
07-14 09:05:58.419 10636 10701 D GraphicBufferAllocator: Total allocated (estimate): 16.00 KB
07-14 09:05:58.419 10636 10701 D GraphicBufferAllocator: -------------------------Start to dump Gralloc buffers info------------------------
07-14 09:05:58.419 10636 10701 D GraphicBufferAllocator: handle | width | height | stride | req format |internal format|consumer usage|producer usage| fd | fd1 | fd2 | AFBC |
07-14 09:05:58.419 10636 10701 D GraphicBufferAllocator: ------------+-------+--------+--------+----------------+---------------+--------------+--------------+-----------+------+
07-14 09:05:58.419 10636 10701 D GraphicBufferAllocator: ---------------------End dump Gralloc buffers info with num 0----------------------
07-14 09:05:58.419 10636 10701 E AHardwareBuffer: GraphicBuffer(w=64, h=1, lc=1) failed (Out of memory), handle=0x0
07-14 09:05:58.420 10636 10701 W ValidationTest: 0xebadde09 skipped times: 0
--------- beginning of crash
07-14 09:05:58.421 10636 10701 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x100000050 in tid 10701 (Thread-6), pid 10636 (ValidationTests)
07-14 09:05:58.477 14662 14662 E crash_dump64: unknown process state: t
07-14 09:05:58.483 7365 7365 D io_stats: !@ 8,0 r 738624 73799984 w 2743005 86235396 d 242042 163470668 f 660254 1029368 iot 2122380 1618548 th 102400 0 0 pt 0 inp 0 0 1879812.990
07-14 09:05:58.514 14662 14662 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
07-14 09:05:58.514 5560 5560 I /system/bin/tombstoned: received crash request for pid 10701
07-14 09:05:58.517 14662 14662 I crash_dump64: performing dump of process 10636 (target tid = 10701)
07-14 09:05:58.528 14662 14662 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-14 09:05:58.528 14662 14662 F DEBUG : Build fingerprint: 'samsung/beyond1ltexx/beyond1:10/QP1A.190711.020/G973FXXS4BTB3:user/release-keys'
07-14 09:05:58.528 14662 14662 F DEBUG : Revision: '26'
07-14 09:05:58.528 14662 14662 F DEBUG : ABI: 'arm64'
07-14 09:05:58.529 14662 14662 F DEBUG : Timestamp: 2020-07-14 09:05:58-0600
07-14 09:05:58.529 14662 14662 F DEBUG : pid: 10636, tid: 10701, name: Thread-6 >>> com.example.VulkanLayerValidationTests <<<
07-14 09:05:58.529 14662 14662 F DEBUG : uid: 11669
07-14 09:05:58.529 14662 14662 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x100000050
07-14 09:05:58.529 14662 14662 F DEBUG : x0 0000000100000000 x1 000000749edc341c x2 000000749edc3410 x3 0000000000000004
07-14 09:05:58.529 14662 14662 F DEBUG : x4 0000000000000000 x5 000000748242249d x6 00000074ffa1d100 x7 00000074ffbe2010
07-14 09:05:58.529 14662 14662 F DEBUG : x8 e76514750c2c14fb x9 000000003b9cc1ea x10 e76514750c2c14fb x11 0000007480000000
07-14 09:05:58.529 14662 14662 F DEBUG : x12 000000006a4f4b88 x13 0000000000000000 x14 0000007482402c55 x15 0000000000000002
07-14 09:05:58.529 14662 14662 F DEBUG : x16 000000758ff5b308 x17 000000759296ab20 x18 000000749ea5a000 x19 00000000c4641cbd
07-14 09:05:58.529 14662 14662 F DEBUG : x20 000000749edc3580 x21 0000000100000000 x22 00000074ffa011c0 x23 000000749edc4020
07-14 09:05:58.529 14662 14662 F DEBUG : x24 000000749edc4020 x25 000000749edc38d8 x26 0000000000000000 x27 0000007483f59000
07-14 09:05:58.529 14662 14662 F DEBUG : x28 000000003b9bdf58 x29 000000749edc3510
07-14 09:05:58.529 14662 14662 F DEBUG : sp 000000749edc33c0 lr 00000074eb410630 pc 00000074eb3415f8
07-14 09:05:58.534 14662 14662 F DEBUG :
07-14 09:05:58.534 14662 14662 F DEBUG : backtrace:
07-14 09:05:58.534 14662 14662 F DEBUG : #00 pc 00000000009f35f8 /vendor/lib64/egl/libGLES_mali.so (BuildId: b82e320b3685019f4c9d9c2dcf6f6d5c)
07-14 09:05:58.534 14662 14662 F DEBUG : #1 pc 0000000000ac262c /vendor/lib64/egl/libGLES_mali.so (BuildId: b82e320b3685019f4c9d9c2dcf6f6d5c)
07-14 09:05:58.534 14662 14662 F DEBUG : #2 pc 0000000000ac2450 /vendor/lib64/egl/libGLES_mali.so (BuildId: b82e320b3685019f4c9d9c2dcf6f6d5c)
07-14 09:05:58.534 14662 14662 F DEBUG : #3 pc 000000000096aa68 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 56e585a1d06bfa3a6ca02df3bc0d5a4a3de79f9c)
07-14 09:05:58.534 14662 14662 F DEBUG : #4 pc 0000000000825ecc /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 56e585a1d06bfa3a6ca02df3bc0d5a4a3de79f9c)
07-14 09:05:58.534 14662 14662 F DEBUG : #5 pc 0000000000827328 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 56e585a1d06bfa3a6ca02df3bc0d5a4a3de79f9c)
07-14 09:05:58.534 14662 14662 F DEBUG : #6 pc 000000000098cf10 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 56e585a1d06bfa3a6ca02df3bc0d5a4a3de79f9c)
07-14 09:05:58.534 14662 14662 F DEBUG : #7 pc 000000000001bdfc /system/lib64/libvulkan.so (vulkan::api::(anonymous namespace)::AllocateMemory(VkDevice_T*, VkMemoryAllocateInfo const*, VkAllocationCallbacks const*, VkDeviceMemory_T**)+180) (BuildId: d569637329ba16330d390540dee0e601)
07-14 09:05:58.534 14662 14662 F DEBUG : #8 pc 00000000002b9554 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #9 pc 00000000003e7d6c /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (testing::Test::Run()+664) (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #10 pc 00000000003e939c /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestInfo::Run()+672) (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #11 pc 00000000003e9964 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestSuite::Run()+272) (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #12 pc 00000000003f79e8 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (testing::internal::UnitTestImpl::RunAllTests()+1204) (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #13 pc 00000000003f73f8 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (testing::UnitTest::Run()+124) (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #14 pc 000000000020d45c /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #15 pc 00000000003d3fc8 /data/app/com.example.VulkanLayerValidationTests-WI8exOFjdGUXZB9U2fX3Wg==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: d3db41d7c1afdbb22726eaddccf63713d159d683)
07-14 09:05:58.535 14662 14662 F DEBUG : #16 pc 00000000000e3b14 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 220051b49364b1c2da3adf10c30832cc)
07-14 09:05:58.535 14662 14662 F DEBUG : #17 pc 0000000000085330 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 220051b49364b1c2da3adf10c30832cc)

@sfricke-samsung
Copy link
Contributor Author

sorry, I never actually pushed up my changes, been a slightly busier than normal this last week, will try to get to it soon

@sfricke-samsung sfricke-samsung force-pushed the sfricke-samsung-y-fixahb branch from 51059be to 736c10e Compare July 16, 2020 06:00
@sfricke-samsung
Copy link
Contributor Author

@mark-lunarg rebased and hopefully fixed both errors

@mark-lunarg
Copy link
Contributor

Running through the farm again.

@mark-lunarg
Copy link
Contributor

Galaxy S10 is still throwing up. Lemme know if you can use any other logs or info...

07-17 08:15:40.175 23733 23777 I VulkanLayerValidationTests: [ RUN ] VkPositiveLayerTest.AndroidHardwareBufferBindBufferMemory
07-17 08:15:40.197 23733 23777 I vulkan : Loaded layer VK_LAYER_KHRONOS_validation
07-17 08:15:40.247 5345 5523 E gralloc : Producer and consumer not identified.
07-17 08:15:40.247 5345 5523 E gralloc : ERROR: Unrecognized and/or unsupported format 0x21 and usage 0x800000
07-17 08:15:40.247 5345 5523 E gralloc : Failed to allocate buffer.
07-17 08:15:40.249 23733 23777 E GraphicBufferAllocator: Failed to allocate (64 x 1) layerCount 1 format 33 usage 1000000: 5
07-17 08:15:40.250 23733 23777 D GraphicBufferAllocator: Allocated buffers:
07-17 08:15:40.250 23733 23777 D GraphicBufferAllocator: 0x6fb8533d00: 16.00 KiB | 64 ( 64) x 64 | 1 | 2 | 0x100 | AHardwareBuffer pid [23733]
07-17 08:15:40.250 23733 23777 D GraphicBufferAllocator: Total allocated (estimate): 16.00 KB
07-17 08:15:40.250 23733 23777 D GraphicBufferAllocator: -------------------------Start to dump Gralloc buffers info------------------------
07-17 08:15:40.250 23733 23777 D GraphicBufferAllocator: handle | width | height | stride | req format |internal format|consumer usage|producer usage| fd | fd1 | fd2 | AFBC |
07-17 08:15:40.250 23733 23777 D GraphicBufferAllocator: ------------+-------+--------+--------+----------------+---------------+--------------+--------------+-----------+------+
07-17 08:15:40.250 23733 23777 D GraphicBufferAllocator: ---------------------End dump Gralloc buffers info with num 0----------------------
07-17 08:15:40.250 23733 23777 E AHardwareBuffer: GraphicBuffer(w=64, h=1, lc=1) failed (Out of memory), handle=0x0
07-17 08:15:40.250 23733 23777 E mali_config_interface: Failed to mmap shared attribute region err=Bad file descriptor
07-17 08:15:40.250 23733 23777 E mali_config_interface: [get_buffer_dataspace_setting]:1024 Cannot map gralloc buffer attr for setting dataspace
07-17 08:15:40.251 23733 23777 E mali_config_interface: yuv_info not recognized, setting default colorspace model
07-17 08:15:40.251 23733 23777 E mali_config_interface: yuv_info not recognized, setting default colorspace range
07-17 08:15:40.251 23733 23777 I VulkanLayerValidationTests: *** Failure in jni/../../tests/vkrenderframework.cpp:208 Failed
07-17 08:15:40.251 23733 23777 I VulkanLayerValidationTests: Expected to succeed but got error: Validation Error: [ VUID-VkMemoryAllocateInfo-memoryTypeIndex-02385 ] Object 0: handle = 0x6fc2b90a80, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xd70ee027 | vkAllocateMemory: VkMemoryAllocateInfo struct with chained VkImportAndroidHardwareBufferInfoANDROID struct, memoryTypeIndex (0) does not correspond to a bit set in AHardwareBuffer's reported memoryTypeBits bitmask (0x0). The Vulkan spec states: If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, memoryTypeIndex must be one of those returned by vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-memoryTypeIndex-02385)
07-17 08:15:40.252 23733 23777 I VulkanLayerValidationTests: *** Failure in jni/../../tests/vkrenderframework.cpp:208 Failed
07-17 08:15:40.252 23733 23777 I VulkanLayerValidationTests: Expected to succeed but got error: Validation Error: [ VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-01881 ] Object 0: handle = 0x6fc2b90a80, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x2166ac57 | vkAllocateMemory: The AHardwareBuffer_Desc's usage (0x5) is not compatible with Vulkan. The Vulkan spec states: If buffer is not NULL, it must be a valid Android hardware buffer object with AHardwareBuffer_Desc::usage compatible with Vulkan as described in Android Hardware Buffers (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-01881)
07-17 08:15:40.252 23733 23777 I VulkanLayerValidationTests: *** Failure in jni/../../tests/vkrenderframework.cpp:208 Failed
07-17 08:15:40.252 23733 23777 I VulkanLayerValidationTests: Expected to succeed but got error: Validation Error: [ VUID-VkMemoryAllocateInfo-pNext-02384 ] Object 0: handle = 0x6fc2b90a80, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xc5e594b9 | vkAllocateMemory: VkMemoryAllocateInfo struct with chained VkImportAndroidHardwareBufferInfoANDROID struct without a dedicated allocation requirement, while the AHardwareBuffer_Desc's format ( 0 ) is not AHARDWAREBUFFER_FORMAT_BLOB or usage (0x5) does not include AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER. The Vulkan spec states: If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, and the pNext chain does not include a VkMemoryDedicatedAllocateInfo structure or VkMemoryDedicatedAllocateInfo::image is VK_NULL_HANDLE, the Android hardware buffer must have a AHardwareBuffer_Desc::format of AHARDWAREBUFFER_FORMAT_BLOB and a AHardwareBuffer_Desc::usage that includes AHARDWAREBUFFER_
07-17 08:15:40.252 23733 23777 I VulkanLayerValidationTests: *** Failure in jni/../../tests/vkrenderframework.cpp:208 Failed
07-17 08:15:40.252 23733 23777 I VulkanLayerValidationTests: Expected to succeed but got error: Validation Error: [ VUID-vkBindBufferMemory-memory-parameter ] Object 0: handle = 0x7028d14200, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xe9199965 | Invalid VkDeviceMemory Object 0x702b2dd900. The Vulkan spec states: memory must be a valid VkDeviceMemory handle (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkBindBufferMemory-memory-parameter)
07-17 08:15:40.252 23733 23777 W ValidationTest: 0xebadde09 skipped times: 0
--------- beginning of crash
07-17 08:15:40.253 23733 23777 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x128 in tid 23777 (Thread-6), pid 23733 (ValidationTests)
07-17 08:15:40.318 32017 32017 E crash_dump64: unknown process state: t
07-17 08:15:40.367 32017 32017 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
07-17 08:15:40.371 5588 5588 I /system/bin/tombstoned: received crash request for pid 23777
07-17 08:15:40.374 32017 32017 I crash_dump64: performing dump of process 23733 (target tid = 23777)
07-17 08:15:40.398 32017 32017 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-17 08:15:40.398 32017 32017 F DEBUG : Build fingerprint: 'samsung/beyond1ltexx/beyond1:10/QP1A.190711.020/G973FXXU3BSKO:user/release-keys'
07-17 08:15:40.398 32017 32017 F DEBUG : Revision: '26'
07-17 08:15:40.398 32017 32017 F DEBUG : ABI: 'arm64'
07-17 08:15:40.399 32017 32017 F DEBUG : Timestamp: 2020-07-17 08:15:40-0600
07-17 08:15:40.399 32017 32017 F DEBUG : pid: 23733, tid: 23777, name: Thread-6 >>> com.example.VulkanLayerValidationTests <<<
07-17 08:15:40.399 32017 32017 F DEBUG : uid: 12016
07-17 08:15:40.399 32017 32017 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x128
07-17 08:15:40.399 32017 32017 F DEBUG : Cause: null pointer dereference
07-17 08:15:40.399 32017 32017 F DEBUG : x0 0000006fb8451000 x1 0000006fc2b90a80 x2 000000702b2dd900 x3 0000000000000000
07-17 08:15:40.399 32017 32017 F DEBUG : x4 0000000000000000 x5 0000006fb402b181 x6 0000006fb8532cc0 x7 00000070375bd810
07-17 08:15:40.399 32017 32017 F DEBUG : x8 000000000000000a x9 c02e1ac910b71104 x10 996845df29ed5148 x11 0000000000000000
07-17 08:15:40.399 32017 32017 F DEBUG : x12 00000000ebef30a0 x13 0000000000000000 x14 0000000000000000 x15 0000000000000002
07-17 08:15:40.399 32017 32017 F DEBUG : x16 0000006fb44db2d8 x17 00000070c2e2c5f8 x18 000000007d7282b1 x19 0000000000000000
07-17 08:15:40.399 32017 32017 F DEBUG : x20 0000006fb8451000 x21 000000702b2de020 x22 0000006fb85e3800 x23 0000006fb8451000
07-17 08:15:40.399 32017 32017 F DEBUG : x24 000000702b2de020 x25 0000006fd1818358 x26 7db439326df3aea4 x27 9ddfea08eb382d69
07-17 08:15:40.399 32017 32017 F DEBUG : x28 0000000000000000 x29 000000702b2dd7d0
07-17 08:15:40.399 32017 32017 F DEBUG : sp 000000702b2dd730 lr 0000006fb3bc0e8c pc 0000006fb3a0bc7c
07-17 08:15:40.404 32017 32017 F DEBUG :
07-17 08:15:40.404 32017 32017 F DEBUG : backtrace:
07-17 08:15:40.404 32017 32017 F DEBUG : #00 pc 000000000082bc7c /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 26ef78c102c6bd1166fbc7ff35d29503f75c8fc7)
07-17 08:15:40.404 32017 32017 F DEBUG : #1 pc 00000000009e0e88 /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVkLayer_khronos_validation.so (BuildId: 26ef78c102c6bd1166fbc7ff35d29503f75c8fc7)
07-17 08:15:40.404 32017 32017 F DEBUG : #2 pc 000000000001bf14 /system/lib64/libvulkan.so (vulkan::api::(anonymous namespace)::FreeMemory(VkDevice_T*, VkDeviceMemory_T*, VkAllocationCallbacks const*)+156) (BuildId: d569637329ba16330d390540dee0e601)
07-17 08:15:40.404 32017 32017 F DEBUG : #3 pc 00000000003558a8 /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.404 32017 32017 F DEBUG : #4 pc 00000000003cd9cc /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (testing::Test::Run()+384) (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.405 32017 32017 F DEBUG : #5 pc 00000000003cec84 /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestInfo::Run()+396) (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.405 32017 32017 F DEBUG : #6 pc 00000000003cf224 /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (testing::TestCase::Run()+248) (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.405 32017 32017 F DEBUG : #7 pc 00000000003d7f7c /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (testing::internal::UnitTestImpl::RunAllTests()+1080) (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.405 32017 32017 F DEBUG : #8 pc 00000000003d7b10 /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (testing::UnitTest::Run()+164) (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.405 32017 32017 F DEBUG : #9 pc 00000000001e46c0 /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.405 32017 32017 F DEBUG : #10 pc 00000000003bba34 /data/app/com.example.VulkanLayerValidationTests-qBpkjLFh06ZiRizO0lfbNw==/lib/arm64/libVulkanLayerValidationTests.so (BuildId: 99b5f05cefad38dff6cc40e5a4708b356b911e6e)
07-17 08:15:40.405 32017 32017 F DEBUG : #11 pc 00000000000e3b14 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 220051b49364b1c2da3adf10c30832cc)
07-17 08:15:40.405 32017 32017 F DEBUG : #12 pc 0000000000085330 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 220051b49364b1c2da

From internal Vulkan MR 3982, the VUID 4003 and 4005 should not have
been added to start with and more information about it was added to
the spec as well.
@sfricke-samsung sfricke-samsung force-pushed the sfricke-samsung-y-fixahb branch from 736c10e to 7cf19a6 Compare July 22, 2020 06:28
@sfricke-samsung
Copy link
Contributor Author

@mark-lunarg Finally got time to look back into this, should be good now 🙏

@mark-lunarg
Copy link
Contributor

Sending through CI...

@mark-lunarg mark-lunarg merged commit efb627f into KhronosGroup:master Jul 23, 2020
@mark-lunarg
Copy link
Contributor

Thanks Spencer!

@sfricke-samsung sfricke-samsung deleted the sfricke-samsung-y-fixahb branch September 11, 2020 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vkBindImageMemory validation error when exporting an Android HardwareBuffer
2 participants