You are not logged in.

#1 2020-10-01 21:17:15

leonixyz
Member
Registered: 2014-07-12
Posts: 64

Darktable segfault with OpenCL support enabled

After some months I performed a full system update today, and Darktable doesn't start anymore. I don't know how to fix it, and neither how to debug it, whether this should be reported to the Darktable maintainers, or whether it's OpenCL fault, or whether I am missing something (most probably). Before upgrading Darktable was running fine with OpenCL support. Now I get the following output:

$ darktable -d opencl
0.067941 [opencl_init] opencl related configuration options:
0.067957 [opencl_init] 
0.067962 [opencl_init] opencl: 1
0.067965 [opencl_init] opencl_scheduling_profile: 'default'
0.067972 [opencl_init] opencl_library: ''
0.067977 [opencl_init] opencl_memory_requirement: 768
0.067982 [opencl_init] opencl_memory_headroom: 400
0.068000 [opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
0.068005 [opencl_init] opencl_mandatory_timeout: 200
0.068011 [opencl_init] opencl_size_roundup: 16
0.068014 [opencl_init] opencl_async_pixelpipe: 0
0.068019 [opencl_init] opencl_synch_cache: active module
0.068024 [opencl_init] opencl_number_event_handles: 25
0.068029 [opencl_init] opencl_micro_nap: 1000
0.068034 [opencl_init] opencl_use_pinned_memory: 0
0.068039 [opencl_init] opencl_use_cpu_devices: 0
0.068044 [opencl_init] opencl_avoid_atomics: 0
0.068048 [opencl_init] 
0.068268 [opencl_init] found opencl runtime library 'libOpenCL'
0.068296 [opencl_init] opencl library 'libOpenCL' found on your system and loaded
0.273922 [opencl_init] found 1 platform
0.273944 [opencl_init] found 1 device
0.273988 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' supports image sizes of 16384 x 16384
0.273995 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' allows GPU memory allocations of up to 2948MB
[opencl_init] device 0: Intel(R) Gen9 HD Graphics NEO 
     GLOBAL_MEM_SIZE:          5896MB
     MAX_WORK_GROUP_SIZE:      256
     MAX_WORK_ITEM_DIMENSIONS: 3
     MAX_WORK_ITEM_SIZES:      [ 256 256 256 ]
     DRIVER_VERSION:           1.0.0
     DEVICE_VERSION:           OpenCL 2.1 NEO 
0.274063 [opencl_init] options for OpenCL compiler: -w  -DINTEL=1 -I"/usr/share/darktable/kernels"
0.274184 [opencl_init] compiling program `demosaic_ppg.cl' ..
0.274388 [opencl_load_program] loaded cached binary program from file '/home/leonixyz/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/demosaic_ppg.cl.bin' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7' 
0.274395 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/demosaic_ppg.cl' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7'
0.274788 [opencl_build_program] successfully built program
0.274794 [opencl_build_program] BUILD STATUS: 0
0.274797 BUILD LOG:
0.274799 
0.274805 [opencl_init] compiling program `atrous.cl' ..
0.274847 [opencl_fopen_stat] could not open file `/home/leonixyz/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/atrous.cl.bin'!
0.274854 [opencl_load_program] could not load cached binary program, trying to compile source
0.274874 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/atrous.cl' MD5: '877e4325f34824dd987075b3b81da75d'
an error occurred while trying to execute gdb. please check if gdb is installed on your system.
backtrace written to /tmp/darktable_bt_64L2R0.txt
[1]    12529 segmentation fault (core dumped)  darktable -d opencl

These are the OpenCL related packages that I have installed atm

$ pacman -Ss opencl | grep installed
extra/ocl-icd 2.2.12-4 [installed]
community/intel-compute-runtime 20.30.17454-1 [installed]
community/intel-graphics-compiler 1:1.0.4427-1 [installed]
community/intel-opencl-clang 10.0.0.1-1 [installed]

My graphic card

00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device 2238
	Flags: bus master, fast devsel, latency 0, IRQ 125
	Memory at f0000000 (64-bit, non-prefetchable) [size=16M]
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at e000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: [40] Vendor Specific Information: Len=0c <?>
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [100] Process Address Space ID (PASID)
	Capabilities: [200] Address Translation Service (ATS)
	Capabilities: [300] Page Request Interface (PRI)
	Kernel driver in use: i915
	Kernel modules: i915

If I run darktable --disable-opencl the program starts and works ok, and this can be my workaround atm, but It'd be great if I can get OpenCL back working.

I tried installing darktable-git but I run into the same problem.

What should I do? Report to the Darktable folks? Use the workaround waiting for an update of Darktable or OpenCL?

Thanks in advance

Offline

#2 2020-10-02 12:35:57

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,392

Re: Darktable segfault with OpenCL support enabled

pacman -Qs opencl would have saved you a pipe / grep construction .

Please post the full output of clinfo (install clinfo if it's not present yet)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2020-10-03 10:16:06

leonixyz
Member
Registered: 2014-07-12
Posts: 64

Re: Darktable segfault with OpenCL support enabled

Lone_Wolf wrote:

Please post the full output of clinfo

Hi Lone_Wolf, thanks for your support.

Number of platforms                               1
  Platform Name                                   Intel(R) OpenCL HD Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 2.1 
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_intel_media_block_io cl_khr_3d_image_writes cl_intel_va_api_media_sharing 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             INTEL

  Platform Name                                   Intel(R) OpenCL HD Graphics
Number of devices                                 1
  Device Name                                     Intel(R) Gen9 HD Graphics NEO
  Device Vendor                                   Intel(R) Corporation
  Device Vendor ID                                0x8086
  Device Version                                  OpenCL 2.1 NEO 
  Driver Version                                  1.0.0
  Device OpenCL C Version                         OpenCL C 2.0 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               24
  Max clock frequency                             1000MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              32
  Max sub-groups per work group                   32
  Sub-group sizes (Intel)                         8, 16, 32
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 1 / 1       
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              6182445056 (5.758GiB)
  Error Correction support                        No
  Max memory allocation                           3091222528 (2.879GiB)
  Unified memory for Host and Device              Yes
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   No
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics                 
    SVM                                           64 bytes
    Global                                        64 bytes
    Local                                         64 bytes
  Max size for global variable                    65536 (64KiB)
  Preferred total size of global vars             3091222528 (2.879GiB)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        524288 (512KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            193201408 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   4 bytes
    Pitch alignment for 2D image buffers          4 pixels
    Max 2D image size                             16384x16384 pixels
    Max planar YUV image size                     16384x16352 pixels
    Max 3D image size                             16384x16384x2048 pixels
    Max number of read image args                 128
    Max number of write image args                128
    Max number of read/write image args           128
  Max number of pipe args                         16
  Max active pipe reservations                    1
  Max pipe packet size                            1024
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Max number of constant args                     8
  Max constant buffer size                        3091222528 (2.879GiB)
  Max size of kernel argument                     2048 (2KiB)
  Queue properties (on host)                      
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                131072 (128KiB)
    Max size                                      67108864 (64MiB)
  Max queues on device                            1
  Max events on device                            1024
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      83ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Sub-group independent forward progress        Yes
    IL version                                    SPIR-V_1.2 
    SPIR versions                                 1.2 
  printf() buffer size                            4194304 (4MiB)
  Built-in kernels                                block_motion_estimate_intel;block_advanced_motion_estimate_check_intel;block_advanced_motion_estimate_bidirectional_check_intel;
  Motion Estimation accelerator version (Intel)   2
    Device-side AVC Motion Estimation version     1
      Supports texture sampler use                Yes
      Supports preemption                         No
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_intel_media_block_io cl_khr_3d_image_writes cl_intel_va_api_media_sharing 

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Intel(R) OpenCL HD Graphics
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [INTEL]
  clCreateContext(NULL, ...) [default]            Success [INTEL]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.12
  ICD loader Profile                              OpenCL 2.2

Offline

#4 2020-10-04 05:27:30

etrigan63
Member
Registered: 2020-10-04
Posts: 3

Re: Darktable segfault with OpenCL support enabled

I can report that this is happening to me as well.


carlos echenique
ce.photography

Offline

#5 2020-10-04 10:57:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,392

Re: Darktable segfault with OpenCL support enabled

clinfo output looks fine and does indicate there's "image support" .

leonixyz, run and post output of

$ darktable-cltest

@etrigan63 : to verify you do have the same issue, please post the above and clinfo output from your system.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2020-10-04 15:14:40

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Darktable segfault with OpenCL support enabled

Same issue here, it's a few weeks now. I have an Optimus setup, working with optimus-manager.

I have tested both the default and the -lts kernel, and tried rebuilding darktable manually to no avail. Running without OpenCL support works around the issue, but it makes the program so slow it's really hard to be productive.

[bardo@ged 16:03 ~]$ clinfo 
Number of platforms                               2
  Platform Name                                   Intel(R) OpenCL HD Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 2.1 
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_intel_media_block_io cl_khr_3d_image_writes cl_intel_va_api_media_sharing 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             INTEL

  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 11.1.70
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid
  Platform Extensions function suffix             NV

  Platform Name                                   Intel(R) OpenCL HD Graphics
Number of devices                                 1
  Device Name                                     Intel(R) Gen9 HD Graphics NEO
  Device Vendor                                   Intel(R) Corporation
  Device Vendor ID                                0x8086
  Device Version                                  OpenCL 2.1 NEO 
  Driver Version                                  1.0.0
  Device OpenCL C Version                         OpenCL C 2.0 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               24
  Max clock frequency                             1150MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              32
  Max sub-groups per work group                   32
  Sub-group sizes (Intel)                         8, 16, 32
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 1 / 1       
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              13128458240 (12.23GiB)
  Error Correction support                        No
  Max memory allocation                           4294959104 (4GiB)
  Unified memory for Host and Device              Yes
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   No
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics                 
    SVM                                           64 bytes
    Global                                        64 bytes
    Local                                         64 bytes
  Max size for global variable                    65536 (64KiB)
  Preferred total size of global vars             4294959104 (4GiB)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        524288 (512KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            268434944 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   4 bytes
    Pitch alignment for 2D image buffers          4 pixels
    Max 2D image size                             16384x16384 pixels
    Max planar YUV image size                     16384x16352 pixels
    Max 3D image size                             16384x16384x2048 pixels
    Max number of read image args                 128
    Max number of write image args                128
    Max number of read/write image args           128
  Max number of pipe args                         16
  Max active pipe reservations                    1
  Max pipe packet size                            1024
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Max number of constant args                     8
  Max constant buffer size                        4294959104 (4GiB)
  Max size of kernel argument                     2048 (2KiB)
  Queue properties (on host)                      
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                131072 (128KiB)
    Max size                                      67108864 (64MiB)
  Max queues on device                            1
  Max events on device                            1024
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      83ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Sub-group independent forward progress        Yes
    IL version                                    SPIR-V_1.2 
    SPIR versions                                 1.2 
  printf() buffer size                            4194304 (4MiB)
  Built-in kernels                                block_motion_estimate_intel;block_advanced_motion_estimate_check_intel;block_advanced_motion_estimate_bidirectional_check_intel;
  Motion Estimation accelerator version (Intel)   2
    Device-side AVC Motion Estimation version     1
      Supports texture sampler use                Yes
      Supports preemption                         No
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_intel_media_block_io cl_khr_3d_image_writes cl_intel_va_api_media_sharing 

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     GeForce GTX 1650
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.2 CUDA
  Driver Version                                  455.23.04
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Topology (NV)                            PCI-E, 01:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               16
  Max clock frequency                             1560MHz
  Compute Capability (NV)                         7.5
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x64
  Max work group size                             1024
  Preferred work group size multiple              32
  Warp size (NV)                                  32
  Preferred / native vector sizes                 
    char                                                 1 / 1       
    short                                                1 / 1       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 0 / 0        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              4104323072 (3.822GiB)
  Error Correction support                        No
  Max memory allocation                           1026080768 (978.5MiB)
  Unified memory for Host and Device              No
  Integrated memory (NV)                          No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       4096 bits (512 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        524288 (512KiB)
  Global Memory cache line size                   128 bytes
  Image support                                   Yes
    Max number of samplers per kernel             32
    Max size for 1D images from buffer            268435456 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             32768x32768 pixels
    Max 3D image size                             16384x16384x16384 pixels
    Max number of read image args                 256
    Max number of write image args                32
  Local memory type                               Local
  Local memory size                               49152 (48KiB)
  Registers per block (NV)                        65536
  Max number of constant args                     9
  Max constant buffer size                        65536 (64KiB)
  Max size of kernel argument                     4352 (4.25KiB)
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Kernel execution timeout (NV)                 Yes
  Concurrent copy and kernel execution (NV)       Yes
    Number of async copy engines                  3
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                (n/a)
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid


NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [INTEL]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO
        NOTE:   your OpenCL library only supports OpenCL 2.0,
                but some installed platforms support OpenCL 2.1.
                Programs using 2.1 features may crash
                or behave unexpectedly
[bardo@ged 16:11 ~]$ 
[bardo@ged 16:11 ~]$ darktable-cltest 
0.031334 [opencl_init] opencl related configuration options:
0.031342 [opencl_init] 
0.031343 [opencl_init] opencl: 0
0.031367 [opencl_init] opencl_scheduling_profile: 'multiple GPUs'
0.031369 [opencl_init] opencl_library: ''
0.031371 [opencl_init] opencl_memory_requirement: 768
0.031374 [opencl_init] opencl_memory_headroom: 400
0.031377 [opencl_init] opencl_device_priority: '*/!0,*/*/*'
0.031403 [opencl_init] opencl_mandatory_timeout: 200
0.031406 [opencl_init] opencl_size_roundup: 16
0.031407 [opencl_init] opencl_async_pixelpipe: 0
0.031409 [opencl_init] opencl_synch_cache: active module
0.031412 [opencl_init] opencl_number_event_handles: 25
0.031414 [opencl_init] opencl_micro_nap: 1000
0.031415 [opencl_init] opencl_use_pinned_memory: 0
0.031417 [opencl_init] opencl_use_cpu_devices: 0
0.031420 [opencl_init] opencl_avoid_atomics: 0
0.031422 [opencl_init] 
0.031591 [opencl_init] found opencl runtime library 'libOpenCL'
0.031627 [opencl_init] opencl library 'libOpenCL' found on your system and loaded
0.215333 [opencl_init] found 2 platforms
0.215349 [opencl_init] found 2 devices
0.215365 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' supports image sizes of 16384 x 16384
0.215367 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' allows GPU memory allocations of up to 4095MB
[opencl_init] device 0: Intel(R) Gen9 HD Graphics NEO 
     GLOBAL_MEM_SIZE:          12520MB
     MAX_WORK_GROUP_SIZE:      256
     MAX_WORK_ITEM_DIMENSIONS: 3
     MAX_WORK_ITEM_SIZES:      [ 256 256 256 ]
     DRIVER_VERSION:           1.0.0
     DEVICE_VERSION:           OpenCL 2.1 NEO 
0.215420 [opencl_init] options for OpenCL compiler: -w  -DINTEL=1 -I"/usr/share/darktable/kernels"
0.215537 [opencl_init] compiling program `demosaic_ppg.cl' ..
0.215776 [opencl_load_program] loaded cached binary program from file '/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/demosaic_ppg.cl.bin' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7' 
0.215780 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/demosaic_ppg.cl' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7'
0.216077 [opencl_build_program] successfully built program
0.216080 [opencl_build_program] BUILD STATUS: 0
0.216083 BUILD LOG:
0.216085 
0.216112 [opencl_init] compiling program `atrous.cl' ..
0.216130 [opencl_fopen_stat] could not open file `/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/atrous.cl.bin'!
0.216152 [opencl_load_program] could not load cached binary program, trying to compile source
0.216158 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/atrous.cl' MD5: '877e4325f34824dd987075b3b81da75d'
[New LWP 6535]
[New LWP 6536]
[New LWP 6537]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007fa2c7952eef in wait4 () from /usr/lib/libc.so.6
warning: Currently logging to /tmp/darktable_bt_J5X4R0.txt.  Turn the logging off and on to make the new setting effective.
#0  0x00007fa2c7952eef in wait4 () at /usr/lib/libc.so.6
#1  0x00007fa2c7b7db32 in  () at /usr/lib/libdarktable.so
#2  0x00007fa2c78c36a0 in <signal handler called> () at /usr/lib/libc.so.6
#3  0x00007fa2a6703217 in  () at /usr/lib/libigc.so.1
#4  0x00007fa2a6704a2a in  () at /usr/lib/libigc.so.1
#5  0x00007fa2a66a4c00 in  () at /usr/lib/libigc.so.1
#6  0x00007fa2a66a4e5b in  () at /usr/lib/libigc.so.1
#7  0x00007fa2a658fc10 in  () at /usr/lib/libigc.so.1
#8  0x00007fa2a66253e8 in  () at /usr/lib/libigc.so.1
#9  0x00007fa2a64b4934 in  () at /usr/lib/libigc.so.1
#10 0x00007fa2a650814f in  () at /usr/lib/libigc.so.1
#11 0x00007fa2ab7005d8 in llvm::FPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/libLLVM-10.so
#12 0x00007fa2ab701bdd in llvm::FPPassManager::runOnModule(llvm::Module&) () at /usr/lib/libLLVM-10.so
#13 0x00007fa2ab701f70 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () at /usr/lib/libLLVM-10.so
#14 0x00007fa2a6350dd4 in  () at /usr/lib/libigc.so.1
#15 0x00007fa2a632a061 in  () at /usr/lib/libigc.so.1
#16 0x00007fa2a620f994 in  () at /usr/lib/libigc.so.1
#17 0x00007fa2a62c2bba in  () at /usr/lib/libigc.so.1
#18 0x00007fa2bf2c52ea in  () at /usr/lib/intel-opencl/libigdrcl.so
#19 0x00007fa2bf0c8d50 in  () at /usr/lib/intel-opencl/libigdrcl.so
#20 0x00007fa2bf060a02 in  () at /usr/lib/intel-opencl/libigdrcl.so
#21 0x00007fa2c7b62e58 in dt_opencl_build_program () at /usr/lib/libdarktable.so
#22 0x00007fa2c7b642c3 in  () at /usr/lib/libdarktable.so
#23 0x00007fa2c7b680d0 in dt_opencl_init () at /usr/lib/libdarktable.so
#24 0x00007fa2c7ae41fd in dt_init () at /usr/lib/libdarktable.so
#25 0x000055a3804720e0 in  ()
#26 0x00007fa2c78ae152 in __libc_start_main () at /usr/lib/libc.so.6
#27 0x000055a38047213e in  ()

=========

  Id   Target Id                                          Frame 
* 1    Thread 0x7fa2c0d7d180 (LWP 6534) "darktable-cltes" 0x00007fa2c7952eef in wait4 () from /usr/lib/libc.so.6
  2    Thread 0x7fa2c07c8640 (LWP 6535) "gmain"           0x00007fa2c797b46f in poll () from /usr/lib/libc.so.6
  3    Thread 0x7fa2bffc7640 (LWP 6536) "gdbus"           0x00007fa2c797b46f in poll () from /usr/lib/libc.so.6
  4    Thread 0x7fa2bef5c640 (LWP 6537) "darktable-cltes" 0x00007fa2c78736a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

=========

Thread 4 (Thread 0x7fa2bef5c640 (LWP 6537)):
#0  0x00007fa2c78736a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fa2c4f29c11 in __gthread_cond_wait (__mutex=<optimized out>, __cond=<optimized out>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:865
        __e = <optimized out>
#2  std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=<optimized out>, __lock=...) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
        __e = <optimized out>
#3  0x00007fa2bf37820e in  () at /usr/lib/intel-opencl/libigdrcl.so
#4  0x00007fa2c786d3e9 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007fa2c7986293 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fa2bffc7640 (LWP 6536)):
#0  0x00007fa2c797b46f in poll () at /usr/lib/libc.so.6
#1  0x00007fa2c7651188 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fa2c75ff163 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007fa2c6a7cfe8 in  () at /usr/lib/libgio-2.0.so.0
#4  0x00007fa2c762ca91 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007fa2c786d3e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007fa2c7986293 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7fa2c07c8640 (LWP 6535)):
#0  0x00007fa2c797b46f in poll () at /usr/lib/libc.so.6
#1  0x00007fa2c7651188 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fa2c75fe421 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007fa2c75fe472 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007fa2c762ca91 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007fa2c786d3e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007fa2c7986293 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7fa2c0d7d180 (LWP 6534)):
#0  0x00007fa2c7952eef in wait4 () at /usr/lib/libc.so.6
#1  0x00007fa2c7b7db32 in  () at /usr/lib/libdarktable.so
#2  0x00007fa2c78c36a0 in <signal handler called> () at /usr/lib/libc.so.6
#3  0x00007fa2a6703217 in  () at /usr/lib/libigc.so.1
#4  0x00007fa2a6704a2a in  () at /usr/lib/libigc.so.1
#5  0x00007fa2a66a4c00 in  () at /usr/lib/libigc.so.1
#6  0x00007fa2a66a4e5b in  () at /usr/lib/libigc.so.1
#7  0x00007fa2a658fc10 in  () at /usr/lib/libigc.so.1
#8  0x00007fa2a66253e8 in  () at /usr/lib/libigc.so.1
#9  0x00007fa2a64b4934 in  () at /usr/lib/libigc.so.1
#10 0x00007fa2a650814f in  () at /usr/lib/libigc.so.1
#11 0x00007fa2ab7005d8 in llvm::FPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/libLLVM-10.so
#12 0x00007fa2ab701bdd in llvm::FPPassManager::runOnModule(llvm::Module&) () at /usr/lib/libLLVM-10.so
#13 0x00007fa2ab701f70 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () at /usr/lib/libLLVM-10.so
#14 0x00007fa2a6350dd4 in  () at /usr/lib/libigc.so.1
#15 0x00007fa2a632a061 in  () at /usr/lib/libigc.so.1
#16 0x00007fa2a620f994 in  () at /usr/lib/libigc.so.1
#17 0x00007fa2a62c2bba in  () at /usr/lib/libigc.so.1
#18 0x00007fa2bf2c52ea in  () at /usr/lib/intel-opencl/libigdrcl.so
#19 0x00007fa2bf0c8d50 in  () at /usr/lib/intel-opencl/libigdrcl.so
#20 0x00007fa2bf060a02 in  () at /usr/lib/intel-opencl/libigdrcl.so
#21 0x00007fa2c7b62e58 in dt_opencl_build_program () at /usr/lib/libdarktable.so
#22 0x00007fa2c7b642c3 in  () at /usr/lib/libdarktable.so
#23 0x00007fa2c7b680d0 in dt_opencl_init () at /usr/lib/libdarktable.so
#24 0x00007fa2c7ae41fd in dt_init () at /usr/lib/libdarktable.so
#25 0x000055a3804720e0 in  ()
#26 0x00007fa2c78ae152 in __libc_start_main () at /usr/lib/libc.so.6
#27 0x000055a38047213e in  ()
[Inferior 1 (process 6534) detached]
backtrace written to /tmp/darktable_bt_J5X4R0.txt
Segmentation fault (core dumped)
[bardo@ged 16:12 ~]$ 

dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#7 2020-10-04 16:34:26

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Darktable segfault with OpenCL support enabled

Attaching output for darktable-cltest from an unstripped build. The issue seems to be with the Intel card only. I will try to set up my darktablerc to use only the nVidia and see what happens.

this is darktable 3.2.1 reporting a segfault:

warning: Currently logging to /tmp/darktable_bt_1RRZR0.txt.  Turn the logging off and on to make the new setting effective.
#0  0x00007fac0f4e5eef in wait4 () at /usr/lib/libc.so.6
#1  0x00007fac0f7160b2 in _dt_sigsegv_handler(int) (param=11) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/system_signal_handling.c:114
#2  0x00007fac0f4566a0 in <signal handler called> () at /usr/lib/libc.so.6
#3  0x00007fabeddaf217 in  () at /usr/lib/libigc.so.1
#4  0x00007fabeddb0a2a in  () at /usr/lib/libigc.so.1
#5  0x00007fabedd50c00 in  () at /usr/lib/libigc.so.1
#6  0x00007fabedd50e5b in  () at /usr/lib/libigc.so.1
#7  0x00007fabedc3bc10 in  () at /usr/lib/libigc.so.1
#8  0x00007fabedcd13e8 in  () at /usr/lib/libigc.so.1
#9  0x00007fabedb60934 in  () at /usr/lib/libigc.so.1
#10 0x00007fabedbb414f in  () at /usr/lib/libigc.so.1
#11 0x00007fabf37005d8 in llvm::FPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/libLLVM-10.so
#12 0x00007fabf3701bdd in llvm::FPPassManager::runOnModule(llvm::Module&) () at /usr/lib/libLLVM-10.so
#13 0x00007fabf3701f70 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () at /usr/lib/libLLVM-10.so
#14 0x00007fabed9fcdd4 in  () at /usr/lib/libigc.so.1
#15 0x00007fabed9d6061 in  () at /usr/lib/libigc.so.1
#16 0x00007fabed8bb994 in  () at /usr/lib/libigc.so.1
#17 0x00007fabed96ebba in  () at /usr/lib/libigc.so.1
#18 0x00007fac06e582ea in  () at /usr/lib/intel-opencl/libigdrcl.so
#19 0x00007fac06c5bd50 in  () at /usr/lib/intel-opencl/libigdrcl.so
#20 0x00007fac06bf3a02 in  () at /usr/lib/intel-opencl/libigdrcl.so
#21 0x00007fac0f6f8318 in dt_opencl_build_program(int, int, char const*, char const*, char*, int) (dev=dev@entry=0, prog=prog@entry=1, binname=binname@entry=0x5643d9f27330 "/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/atrous.cl.bin", cachedir=cachedir@entry=0x5643da4ee030 "/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100", md5sum=md5sum@entry=0x7ffce1b82bb0 "877e4325f34824dd987075b3b81da75d", loaded_cached=0) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/opencl.c:1740
#22 0x00007fac0f6fd5b3 in dt_opencl_device_init(dt_opencl_t*, int, cl_device_id*, int, int) (cl=cl@entry=0x5643d9cee2a0, dev=dev@entry=0, devices=devices@entry=0x5643da4ef060, k=k@entry=0, opencl_memory_requirement=opencl_memory_requirement@entry=768) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/opencl.c:477
#23 0x00007fac0f6feec0 in dt_opencl_init(dt_opencl_t*, gboolean, gboolean) (cl=0x5643d9cee2a0, exclude_opencl=<optimized out>, print_statistics=<optimized out>) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/opencl.c:708
#24 0x00007fac0f678527 in dt_init(int, char**, gboolean, gboolean, lua_State*) (argc=<optimized out>, argv=<optimized out>, init_gui=0, load_data=0, L=0x0) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/darktable.c:933
#25 0x00005643d918c0e0 in main (argc=5, arg=0x7ffce1b88128) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/cltest/main.c:47

=========

  Id   Target Id                                           Frame 
* 1    Thread 0x7fac08910180 (LWP 27897) "darktable-cltes" 0x00007fac0f4e5eef in wait4 () from /usr/lib/libc.so.6
  2    Thread 0x7fac0835b640 (LWP 27898) "gmain"           0x00007fac0f50e46f in poll () from /usr/lib/libc.so.6
  3    Thread 0x7fac07b5a640 (LWP 27899) "gdbus"           0x00007fac0f50e46f in poll () from /usr/lib/libc.so.6
  4    Thread 0x7fac06aef640 (LWP 27900) "darktable-cltes" 0x00007fac0f4066a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

=========

Thread 4 (Thread 0x7fac06aef640 (LWP 27900)):
#0  0x00007fac0f4066a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fac0cabcc11 in __gthread_cond_wait (__mutex=<optimized out>, __cond=<optimized out>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:865
        __e = <optimized out>
#2  std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=<optimized out>, __lock=...) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
        __e = <optimized out>
#3  0x00007fac06f0b20e in  () at /usr/lib/intel-opencl/libigdrcl.so
#4  0x00007fac0f4003e9 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007fac0f519293 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fac07b5a640 (LWP 27899)):
#0  0x00007fac0f50e46f in poll () at /usr/lib/libc.so.6
#1  0x00007fac0f1e4188 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fac0f192163 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007fac0e60ffe8 in  () at /usr/lib/libgio-2.0.so.0
#4  0x00007fac0f1bfa91 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007fac0f4003e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007fac0f519293 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7fac0835b640 (LWP 27898)):
#0  0x00007fac0f50e46f in poll () at /usr/lib/libc.so.6
#1  0x00007fac0f1e4188 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fac0f191421 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007fac0f191472 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007fac0f1bfa91 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007fac0f4003e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007fac0f519293 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7fac08910180 (LWP 27897)):
#0  0x00007fac0f4e5eef in wait4 () at /usr/lib/libc.so.6
#1  0x00007fac0f7160b2 in _dt_sigsegv_handler(int) (param=11) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/system_signal_handling.c:114
        pid = 27904
        name_used = 0x5643da42e680 "/tmp/darktable_bt_1RRZR0.txt"
        fout = <optimized out>
        delete_file = 0
        datadir = "/usr/share/darktable", '\000' <repeats 4075 times>
        pid_arg = 0x5643da5ddbe0 "27897"
        comm_arg = 0x5643da5ee8d0 "/usr/share/darktable/gdb_commands"
        log_arg = 0x5643dabcd8d0 "set logging on /tmp/darktable_bt_1RRZR0.txt"
#2  0x00007fac0f4566a0 in <signal handler called> () at /usr/lib/libc.so.6
#3  0x00007fabeddaf217 in  () at /usr/lib/libigc.so.1
#4  0x00007fabeddb0a2a in  () at /usr/lib/libigc.so.1
#5  0x00007fabedd50c00 in  () at /usr/lib/libigc.so.1
#6  0x00007fabedd50e5b in  () at /usr/lib/libigc.so.1
#7  0x00007fabedc3bc10 in  () at /usr/lib/libigc.so.1
#8  0x00007fabedcd13e8 in  () at /usr/lib/libigc.so.1
#9  0x00007fabedb60934 in  () at /usr/lib/libigc.so.1
#10 0x00007fabedbb414f in  () at /usr/lib/libigc.so.1
#11 0x00007fabf37005d8 in llvm::FPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/libLLVM-10.so
#12 0x00007fabf3701bdd in llvm::FPPassManager::runOnModule(llvm::Module&) () at /usr/lib/libLLVM-10.so
#13 0x00007fabf3701f70 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () at /usr/lib/libLLVM-10.so
#14 0x00007fabed9fcdd4 in  () at /usr/lib/libigc.so.1
#15 0x00007fabed9d6061 in  () at /usr/lib/libigc.so.1
#16 0x00007fabed8bb994 in  () at /usr/lib/libigc.so.1
#17 0x00007fabed96ebba in  () at /usr/lib/libigc.so.1
#18 0x00007fac06e582ea in  () at /usr/lib/intel-opencl/libigdrcl.so
#19 0x00007fac06c5bd50 in  () at /usr/lib/intel-opencl/libigdrcl.so
#20 0x00007fac06bf3a02 in  () at /usr/lib/intel-opencl/libigdrcl.so
#21 0x00007fac0f6f8318 in dt_opencl_build_program(int, int, char const*, char const*, char*, int) (dev=dev@entry=0, prog=prog@entry=1, binname=binname@entry=0x5643d9f27330 "/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/atrous.cl.bin", cachedir=cachedir@entry=0x5643da4ee030 "/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100", md5sum=md5sum@entry=0x7ffce1b82bb0 "877e4325f34824dd987075b3b81da75d", loaded_cached=0) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/opencl.c:1740
        cl = 0x5643d9cee2a0
        program = 0x5643d9ab2370
        err = <optimized out>
        build_status = 0
        build_log = <optimized out>
        ret_val_size = 1
#22 0x00007fac0f6fd5b3 in dt_opencl_device_init(dt_opencl_t*, int, cl_device_id*, int, int) (cl=cl@entry=0x5643d9cee2a0, dev=dev@entry=0, devices=devices@entry=0x5643da4ef060, k=k@entry=0, opencl_memory_requirement=opencl_memory_requirement@entry=768) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/opencl.c:477
        prog = <optimized out>
        rd = <optimized out>
        end = <optimized out>
        programname = <optimized out>
        programnumber = <optimized out>
        tokens = 0x5643d9f49240
        confline_pattern = <optimized out>
        loaded_cached = 0
        md5sum = "877e4325f34824dd987075b3b81da75d"
        res = <optimized out>
        err = 0
        devid = 0x5643d9e21260
        infostr = 0x5643da6ffc20 "Intel(R) Gen9 HD Graphics NEO"
        infostr_size = 30
        cname = 0x5643d9b58e90 "intelrg"
        cname_size = <optimized out>
        options = 0x0
        vendor = 0x5643da4eaf00 "Intel(R) Corporation"
        vendor_size = 21
        driverversion = 0x5643da7c4b60 "1.0.0"
        driverversion_size = 6
        deviceversion = 0x5643da7bc170 "OpenCL 2.1 NEO "
        deviceversion_size = 16
        infoint = 3
        infointtab = 0x0
        type = 4
        image_support = 1
        device_available = 1
        vendor_id = 32902
        little_endian = 1
        dtcache = 0x5643d9ea2bc0 "/home/bardo/.cache/darktable"
        cachedir = 0x5643da4ee030 "/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100"
        devname = 0x5643d9aaadb0 "IntelRGen9HDGraphicsNEO"
        drvversion = 0x5643da7adf20 "100"
        dtpath = <optimized out>
        filename = 0x5643da4f9310 "/usr/share/darktable/kernels/atrous.cl"
        confentry = 0x5643d9f283f0 "atrous.cl", ' ' <repeats 16 times>, "1"
        binname = 0x5643d9f27330 "/home/bardo/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/atrous.cl.bin"
        tstart = 311220973.94761002
        tend = <optimized out>
        tdiff = <optimized out>
        len = <optimized out>
        j = <optimized out>
        kerneldir = "/usr/share/darktable/kernels", '\000' <repeats 4067 times>
        escapedkerneldir = 0x0
        clincludes = {0x7fac0f95d2bc "color_conversion.cl", 0x7fac0f95d2d0 "colorspaces.cl", 0x7fac0f95d2df "colorspace.cl", 0x7fac0f95d2ed "common.h", 0x0}
        includemd5 = {0x5643da6c9560 "fdeb65b3cff190ad7a10c0f005eaba3d", 0x5643da7b4d40 "7a12c84140de8294af5ef8620704ea3d", 0x5643da7adcd0 "a1ed1a321182df502eee68785e9e74f9", 0x5643da7ade00 "baea09a91d62c44324ce02e1de400f17", 0x0}
        f = 0x5643d9caf960
#23 0x00007fac0f6feec0 in dt_opencl_init(dt_opencl_t*, gboolean, gboolean) (cl=0x5643d9cee2a0, exclude_opencl=<optimized out>, print_statistics=<optimized out>) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/opencl.c:708
        k = 0
        str = <optimized out>
        locale = 0x5643d9cedee0 "en_US.UTF-8"
        handles = <optimized out>
        all_platforms = 0x5643d9ce4500
        all_num_devices = 0x5643d9a7b040
        opencl_memory_requirement = <optimized out>
        library = <optimized out>
        err = <optimized out>
        num_platforms = 2
        num_devices = 2
        devices = <optimized out>
        devs = <optimized out>
        dev = 0
#24 0x00007fac0f678527 in dt_init(int, char**, gboolean, gboolean, lua_State*) (argc=<optimized out>, argv=<optimized out>, init_gui=0, load_data=0, L=0x0) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/common/darktable.c:933
        start_wtime = 311220973.76274502
        sse2_supported = <optimized out>
        recursive_locking = {__size = "\001\000\000", __align = 1}
        dbfilename_from_command = <optimized out>
        noiseprofiles_from_command = <optimized out>
        datadir_from_command = <optimized out>
        moduledir_from_command = <optimized out>
        localedir_from_command = <optimized out>
        tmpdir_from_command = <optimized out>
        configdir_from_command = <optimized out>
        cachedir_from_command = <optimized out>
        exclude_opencl = <optimized out>
        print_statistics = 0
        lua_command = <optimized out>
        config_override = <optimized out>
        datadir = "/home/bardo/.config/darktable", '\000' <repeats 4066 times>
        darktablerc = "/home/bardo/.config/darktable/darktablerc", '\000' <repeats 4054 times>
        changed_xmp_files = <optimized out>
#25 0x00005643d918c0e0 in main (argc=5, arg=0x7ffce1b88128) at /home/bardo/code/darktable/repos/community-x86_64/src/darktable-3.2.1/src/cltest/main.c:47
        result = <optimized out>
        m_arg = {0x5643d918d004 "-d", 0x5643d918d007 "opencl", 0x5643d918d00e "--library", 0x5643d918d018 ":memory:"}
        argv = 0x5643d9aa4770
[Inferior 1 (process 27897) detached]

dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#8 2020-10-04 20:22:10

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Darktable segfault with OpenCL support enabled

Tried to force various opencl_device_priority settings in darktablerc, to no avail. It looks like first OpenCL has to be correctly initialized for all devices, and then Darktable applies the device filter.


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#9 2020-10-08 17:38:38

leonixyz
Member
Registered: 2014-07-12
Posts: 64

Re: Darktable segfault with OpenCL support enabled

Lone_Wolf wrote:

leonixyz, run and post output of

$ darktable-cltest
$ darktable-cltest 
0.029298 [opencl_init] opencl related configuration options:
0.029311 [opencl_init] 
0.029314 [opencl_init] opencl: 1
0.029317 [opencl_init] opencl_scheduling_profile: 'default'
0.029319 [opencl_init] opencl_library: ''
0.029322 [opencl_init] opencl_memory_requirement: 768
0.029325 [opencl_init] opencl_memory_headroom: 400
0.029345 [opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
0.029347 [opencl_init] opencl_mandatory_timeout: 200
0.029350 [opencl_init] opencl_size_roundup: 16
0.029355 [opencl_init] opencl_async_pixelpipe: 0
0.029357 [opencl_init] opencl_synch_cache: active module
0.029360 [opencl_init] opencl_number_event_handles: 25
0.029364 [opencl_init] opencl_micro_nap: 1000
0.029366 [opencl_init] opencl_use_pinned_memory: 0
0.029369 [opencl_init] opencl_use_cpu_devices: 0
0.029371 [opencl_init] opencl_avoid_atomics: 0
0.029373 [opencl_init] 
0.033926 [opencl_init] found opencl runtime library 'libOpenCL'
0.034011 [opencl_init] opencl library 'libOpenCL' found on your system and loaded
0.597288 [opencl_init] found 1 platform
0.597319 [opencl_init] found 1 device
0.597358 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' supports image sizes of 16384 x 16384
0.597372 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' allows GPU memory allocations of up to 2948MB
[opencl_init] device 0: Intel(R) Gen9 HD Graphics NEO 
     GLOBAL_MEM_SIZE:          5896MB
     MAX_WORK_GROUP_SIZE:      256
     MAX_WORK_ITEM_DIMENSIONS: 3
     MAX_WORK_ITEM_SIZES:      [ 256 256 256 ]
     DRIVER_VERSION:           1.0.0
     DEVICE_VERSION:           OpenCL 2.1 NEO 
0.597606 [opencl_init] options for OpenCL compiler: -w  -DINTEL=1 -I"/usr/share/darktable/kernels"
0.599805 [opencl_init] compiling program `demosaic_ppg.cl' ..
0.602321 [opencl_load_program] loaded cached binary program from file '/home/leonixyz/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/demosaic_ppg.cl.bin' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7' 
0.602349 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/demosaic_ppg.cl' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7'
0.603012 [opencl_build_program] successfully built program
0.603026 [opencl_build_program] BUILD STATUS: 0
0.603032 BUILD LOG:
0.603036 
0.603054 [opencl_init] compiling program `atrous.cl' ..
0.603530 [opencl_fopen_stat] could not open file `/home/leonixyz/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/atrous.cl.bin'!
0.603551 [opencl_load_program] could not load cached binary program, trying to compile source
0.603566 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/atrous.cl' MD5: '877e4325f34824dd987075b3b81da75d'
an error occurred while trying to execute gdb. please check if gdb is installed on your system.
backtrace written to /tmp/darktable_bt_9916R0.txt
[1]    12745 segmentation fault (core dumped)  darktable-cltest

Offline

#10 2020-10-08 18:46:07

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Darktable segfault with OpenCL support enabled

leonixyz, I think we are seeing the same error, however your output does not contain the debug data. Can you install the gdb package and run the command again?


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#11 2020-10-14 18:11:07

leonixyz
Member
Registered: 2014-07-12
Posts: 64

Re: Darktable segfault with OpenCL support enabled

bardo wrote:

leonixyz, I think we are seeing the same error, however your output does not contain the debug data. Can you install the gdb package and run the command again?

darktable-cltest 
0.051928 [opencl_init] opencl related configuration options:
0.051940 [opencl_init] 
0.051942 [opencl_init] opencl: 1
0.051945 [opencl_init] opencl_scheduling_profile: 'default'
0.051948 [opencl_init] opencl_library: ''
0.051950 [opencl_init] opencl_memory_requirement: 768
0.051953 [opencl_init] opencl_memory_headroom: 400
0.051956 [opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
0.051976 [opencl_init] opencl_mandatory_timeout: 200
0.051979 [opencl_init] opencl_size_roundup: 16
0.051985 [opencl_init] opencl_async_pixelpipe: 0
0.051988 [opencl_init] opencl_synch_cache: active module
0.051992 [opencl_init] opencl_number_event_handles: 25
0.051996 [opencl_init] opencl_micro_nap: 1000
0.051998 [opencl_init] opencl_use_pinned_memory: 0
0.052002 [opencl_init] opencl_use_cpu_devices: 0
0.052005 [opencl_init] opencl_avoid_atomics: 0
0.052007 [opencl_init] 
0.053370 [opencl_init] found opencl runtime library 'libOpenCL'
0.053393 [opencl_init] opencl library 'libOpenCL' found on your system and loaded
0.678741 [opencl_init] found 1 platform
0.678781 [opencl_init] found 1 device
0.678857 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' supports image sizes of 16384 x 16384
0.678871 [opencl_init] device 0 `Intel(R) Gen9 HD Graphics NEO' allows GPU memory allocations of up to 2948MB
[opencl_init] device 0: Intel(R) Gen9 HD Graphics NEO 
     GLOBAL_MEM_SIZE:          5896MB
     MAX_WORK_GROUP_SIZE:      256
     MAX_WORK_ITEM_DIMENSIONS: 3
     MAX_WORK_ITEM_SIZES:      [ 256 256 256 ]
     DRIVER_VERSION:           1.0.0
     DEVICE_VERSION:           OpenCL 2.1 NEO 
0.679036 [opencl_init] options for OpenCL compiler: -w  -DINTEL=1 -I"/usr/share/darktable/kernels"
0.680359 [opencl_init] compiling program `demosaic_ppg.cl' ..
0.682229 [opencl_load_program] loaded cached binary program from file '/home/leonixyz/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/demosaic_ppg.cl.bin' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7' 
0.682248 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/demosaic_ppg.cl' MD5: '77b1bcd7d7d499e6a1569d0f188ee6b7'
0.683053 [opencl_build_program] successfully built program
0.683070 [opencl_build_program] BUILD STATUS: 0
0.683078 BUILD LOG:
0.683082 
0.683098 [opencl_init] compiling program `atrous.cl' ..
0.683379 [opencl_fopen_stat] could not open file `/home/leonixyz/.cache/darktable/cached_kernels_for_IntelRGen9HDGraphicsNEO_100/atrous.cl.bin'!
0.683400 [opencl_load_program] could not load cached binary program, trying to compile source
0.683415 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/atrous.cl' MD5: '877e4325f34824dd987075b3b81da75d'
[New LWP 51600]
[New LWP 51601]
[New LWP 51602]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f5950773eef in wait4 () from /usr/lib/libc.so.6
warning: Currently logging to /tmp/darktable_bt_AHNES0.txt.  Turn the logging off and on to make the new setting effective.
#0  0x00007f5950773eef in wait4 () at /usr/lib/libc.so.6
#1  0x00007f595099eb22 in  () at /usr/lib/libdarktable.so
#2  0x00007f59506e46a0 in <signal handler called> () at /usr/lib/libc.so.6
#3  0x00007f592e703217 in  () at /usr/lib/libigc.so.1
#4  0x00007f592e704a2a in  () at /usr/lib/libigc.so.1
#5  0x00007f592e6a4c00 in  () at /usr/lib/libigc.so.1
#6  0x00007f592e6a4e5b in  () at /usr/lib/libigc.so.1
#7  0x00007f592e58fc10 in  () at /usr/lib/libigc.so.1
#8  0x00007f592e6253e8 in  () at /usr/lib/libigc.so.1
#9  0x00007f592e4b4934 in  () at /usr/lib/libigc.so.1
#10 0x00007f592e50814f in  () at /usr/lib/libigc.so.1
#11 0x00007f59337005d8 in llvm::FPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/libLLVM-10.so
#12 0x00007f5933701bdd in llvm::FPPassManager::runOnModule(llvm::Module&) () at /usr/lib/libLLVM-10.so
#13 0x00007f5933701f70 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () at /usr/lib/libLLVM-10.so
#14 0x00007f592e350dd4 in  () at /usr/lib/libigc.so.1
#15 0x00007f592e32a061 in  () at /usr/lib/libigc.so.1
#16 0x00007f592e20f994 in  () at /usr/lib/libigc.so.1
#17 0x00007f592e2c2bba in  () at /usr/lib/libigc.so.1
#18 0x00007f59485342ea in  () at /usr/lib/intel-opencl/libigdrcl.so
#19 0x00007f5948337d50 in  () at /usr/lib/intel-opencl/libigdrcl.so
#20 0x00007f59482cfa02 in  () at /usr/lib/intel-opencl/libigdrcl.so
#21 0x00007f59487fe10e in clBuildProgram () at /usr/lib/libOpenCL.so
#22 0x00007f5950983e48 in dt_opencl_build_program () at /usr/lib/libdarktable.so
#23 0x00007f59509852b3 in  () at /usr/lib/libdarktable.so
#24 0x00007f59509890c0 in dt_opencl_init () at /usr/lib/libdarktable.so
#25 0x00007f59509051ed in dt_init () at /usr/lib/libdarktable.so
#26 0x000055f2005840e0 in  ()
#27 0x00007f59506cf152 in __libc_start_main () at /usr/lib/libc.so.6
#28 0x000055f20058413e in  ()

=========

  Id   Target Id                                           Frame 
* 1    Thread 0x7f5949bb0180 (LWP 51599) "darktable-cltes" 0x00007f5950773eef in wait4 () from /usr/lib/libc.so.6
  2    Thread 0x7f5949844640 (LWP 51600) "gmain"           0x00007f595079c46f in poll () from /usr/lib/libc.so.6
  3    Thread 0x7f5949043640 (LWP 51601) "gdbus"           0x00007f595079c46f in poll () from /usr/lib/libc.so.6
  4    Thread 0x7f5943fff640 (LWP 51602) "darktable-cltes" 0x00007f59506946a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

=========

Thread 4 (Thread 0x7f5943fff640 (LWP 51602)):
#0  0x00007f59506946a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f594dd5cc11 in __gthread_cond_wait (__mutex=<optimized out>, __cond=<optimized out>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:865
        __e = <optimized out>
#2  std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=<optimized out>, __lock=...) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
        __e = <optimized out>
#3  0x00007f59485e720e in  () at /usr/lib/intel-opencl/libigdrcl.so
#4  0x00007f595068e3e9 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007f59507a7293 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f5949043640 (LWP 51601)):
#0  0x00007f595079c46f in poll () at /usr/lib/libc.so.6
#1  0x00007f5950472188 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f5950420163 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007f594f89dfe8 in  () at /usr/lib/libgio-2.0.so.0
#4  0x00007f595044da91 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f595068e3e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f59507a7293 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f5949844640 (LWP 51600)):
#0  0x00007f595079c46f in poll () at /usr/lib/libc.so.6
#1  0x00007f5950472188 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f595041f421 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f595041f472 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f595044da91 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f595068e3e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f59507a7293 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f5949bb0180 (LWP 51599)):
#0  0x00007f5950773eef in wait4 () at /usr/lib/libc.so.6
#1  0x00007f595099eb22 in  () at /usr/lib/libdarktable.so
#2  0x00007f59506e46a0 in <signal handler called> () at /usr/lib/libc.so.6
#3  0x00007f592e703217 in  () at /usr/lib/libigc.so.1
#4  0x00007f592e704a2a in  () at /usr/lib/libigc.so.1
#5  0x00007f592e6a4c00 in  () at /usr/lib/libigc.so.1
#6  0x00007f592e6a4e5b in  () at /usr/lib/libigc.so.1
#7  0x00007f592e58fc10 in  () at /usr/lib/libigc.so.1
#8  0x00007f592e6253e8 in  () at /usr/lib/libigc.so.1
#9  0x00007f592e4b4934 in  () at /usr/lib/libigc.so.1
#10 0x00007f592e50814f in  () at /usr/lib/libigc.so.1
#11 0x00007f59337005d8 in llvm::FPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/libLLVM-10.so
#12 0x00007f5933701bdd in llvm::FPPassManager::runOnModule(llvm::Module&) () at /usr/lib/libLLVM-10.so
#13 0x00007f5933701f70 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () at /usr/lib/libLLVM-10.so
#14 0x00007f592e350dd4 in  () at /usr/lib/libigc.so.1
#15 0x00007f592e32a061 in  () at /usr/lib/libigc.so.1
#16 0x00007f592e20f994 in  () at /usr/lib/libigc.so.1
#17 0x00007f592e2c2bba in  () at /usr/lib/libigc.so.1
#18 0x00007f59485342ea in  () at /usr/lib/intel-opencl/libigdrcl.so
#19 0x00007f5948337d50 in  () at /usr/lib/intel-opencl/libigdrcl.so
#20 0x00007f59482cfa02 in  () at /usr/lib/intel-opencl/libigdrcl.so
#21 0x00007f59487fe10e in clBuildProgram () at /usr/lib/libOpenCL.so
#22 0x00007f5950983e48 in dt_opencl_build_program () at /usr/lib/libdarktable.so
#23 0x00007f59509852b3 in  () at /usr/lib/libdarktable.so
#24 0x00007f59509890c0 in dt_opencl_init () at /usr/lib/libdarktable.so
#25 0x00007f59509051ed in dt_init () at /usr/lib/libdarktable.so
#26 0x000055f2005840e0 in  ()
#27 0x00007f59506cf152 in __libc_start_main () at /usr/lib/libc.so.6
#28 0x000055f20058413e in  ()
[Inferior 1 (process 51599) detached]
backtrace written to /tmp/darktable_bt_AHNES0.txt
[1]    51599 segmentation fault (core dumped)  darktable-cltest

Offline

#12 2020-10-31 17:54:42

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Darktable segfault with OpenCL support enabled

The issue has been reported at https://github.com/darktable-org/darktable/issues/5842 and it has been root-caused to a bug in the Intel OpenCL stack, which can be worked around by downgrading the intel-graphics-compiler package:

pacman -U https://archive.archlinux.org/packages/i/intel-graphics-compiler/intel-graphics-compiler-1%3A1.0.4361-2-x86_64.pkg.tar.zst

dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#13 2020-11-10 23:38:27

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Darktable segfault with OpenCL support enabled

The new release of

intel-graphics-compiler

solves the issue. Please mark as resolved if you don't see the issue anymore.


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

Board footer

Powered by FluxBB