Skip to content

SIGSEGV in createDevice, EnumerateDeviceExtensionProperties #3

Open
@9yx

Description

@9yx

Hi, when i run such code (Java 13, Archlinux, com.github.kotlin-graphics:vkk:-SNAPSHOT)

val queueCreateInfos = ArrayList<DeviceQueueCreateInfo>()

graphicsQueueIndex = getQueueFamilyIndex(queueFamilyProperties, VkQueueFlag.GRAPHICS_BIT)
queueCreateInfos += DeviceQueueCreateInfo(
     queueFamilyIndex = graphicsQueueIndex,
     queuePriority = 1.0F
)

val createInfo = DeviceCreateInfo(
     queueCreateInfos = queueCreateInfos,
     enabledExtensionNames = setOf(KHRSwapchain.VK_KHR_SWAPCHAIN_EXTENSION_NAME),
     enabledFeatures = PhysicalDeviceFeatures()
)
physicalDevice.createDevice(createInfo)

I get:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f0c16c2ea88, pid=57643, tid=57644
#
# JRE version: OpenJDK Runtime Environment (13.0.1+9) (build 13.0.1+9)
# Java VM: OpenJDK 64-Bit Server VM (13.0.1+9, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libvulkan.so.1+0x2ea88]  loader_layer_create_device+0x408
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/runx/misc/src/universe/core.57643)
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

I rebuilt the libvulkan.so.1 library with debug information and open dump in gdb:

rogram terminated with signal SIGABRT, Aborted.
#0  0x00007f0c6792cf25 in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f0c66147700 (LWP 57644))]
(gdb) bt
#0  0x00007f0c6792cf25 in raise () from /usr/lib/libc.so.6
#1  0x00007f0c67916897 in abort () from /usr/lib/libc.so.6
#2  0x00007f0c6671d096 in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#3  0x00007f0c6742f277 in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#4  0x00007f0c6742fbfb in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#5  0x00007f0c6742fc2e in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#6  0x00007f0c670e8a2f in JVM_handle_linux_signal () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#7  0x00007f0c670dc6aa in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#8  <signal handler called>
#9  loader_layer_create_device (instance=instance@entry=0x0, physicalDevice=physicalDevice@entry=0x7f0c609f9220, pCreateInfo=pCreateInfo@entry=0x7f0c60a091d0, 
    pAllocator=pAllocator@entry=0x0, pDevice=pDevice@entry=0x7f0c60a09218, layerGIPA=layerGIPA@entry=0x0, nextGDPA=0x0) at /usr/src/debug/Vulkan-Loader-1.1.130/loader/loader.c:5537
#10 0x00007f0c16c320b1 in vkCreateDevice (physicalDevice=0x7f0c609f9220, pCreateInfo=0x7f0c60a091d0, pAllocator=0x0, pDevice=0x7f0c60a09218)
    at /usr/src/debug/Vulkan-Loader-1.1.130/loader/trampoline.c:756
#11 0x00007f0c487b4597 in ?? ()
#12 0x00007f0c16c32070 in ?? () at /usr/src/debug/Vulkan-Loader-1.1.130/loader/trampoline.c:665 from /usr/lib/libvulkan.so.1
#13 0x0000000800108670 in ?? ()
#14 0x00007f0c1745cff8 in ?? ()
#15 0x00007f0c6001a800 in ?? ()
#16 0x00007f0c1745cff8 in ?? ()
#17 0x00007f0c6001a800 in ?? ()
#18 0xfffffffe00000000 in ?? ()
#19 0x0000000000000000 in ?? ()

/usr/src/debug/Vulkan-Loader-1.1.130/loader/loader.c:5537:

enumDeviceExtensionProperties = inst->disp->layer_inst_disp.EnumerateDeviceExtensionProperties;

in

// Get the physical device (ICD) extensions
    struct loader_extension_list icd_exts;
    icd_exts.list = NULL;
    res = loader_init_generic_list(inst, (struct loader_generic_list *)&icd_exts, sizeof(VkExtensionProperties));
    if (VK_SUCCESS != res) {
        loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "vkCreateDevice:  Failed to create ICD extension list");
        goto out;
    }

    PFN_vkEnumerateDeviceExtensionProperties enumDeviceExtensionProperties = NULL;
    if (layerGIPA != NULL) {
        enumDeviceExtensionProperties =
            (PFN_vkEnumerateDeviceExtensionProperties)layerGIPA(instance, "vkEnumerateDeviceExtensionProperties");
    } else {
        enumDeviceExtensionProperties = inst->disp->layer_inst_disp.EnumerateDeviceExtensionProperties;
    }
    res = loader_add_device_extensions(inst, enumDeviceExtensionProperties, internal_device, "Unknown", &icd_exts);
    if (res != VK_SUCCESS) {
        loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "vkCreateDevice:  Failed to add extensions to list");
        goto out;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions