darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Erratic Segmentation Fault upon launch

Open AD2605 opened this issue 2 years ago • 5 comments

Describe the bug

Launching darktable as darktable -d all, Darktable sometimes segfaults, causing it to crash. Environment - OS - Ubuntu 22.04 Display - Nvidia, driver 545.23.08

Simply launching darktable again does not result in a crash and normal workflow ensues.

Steps to reproduce

Seems to be difficult to reproduce, as it does not always segfault. Attaching the log generated by darktable

Expected behavior

No response

Logfile | Screenshot | Screencast

darktable_bt_yahtg2.txt

Commit

darktable --version darktable 4.6.0 Copyright (C) 2012-2023 Johannes Hanika and other contributors.

Compile options: Bit depth -> 64 bit Debug -> DISABLED SSE2 optimizations -> ENABLED OpenMP -> ENABLED OpenCL -> ENABLED Lua -> ENABLED - API version 9.2.0 Colord -> ENABLED gPhoto2 -> ENABLED GMIC -> ENABLED - Compressed LUTs are supported GraphicsMagick -> ENABLED ImageMagick -> DISABLED libavif -> DISABLED libheif -> DISABLED libjxl -> DISABLED OpenJPEG -> ENABLED OpenEXR -> ENABLED WebP -> ENABLED

Where did you obtain darktable from?

flatpak

darktable version

4.6.0

What OS are you using?

Linux

What is the version of your OS?

Ubuntu 22.04

Describe your system?

RAM - 16GB CPU - i7 9750h GPU - RTX 2070

OpenCL kernels built for both the integrated UHD630 GPU, as well as the RTX 2070

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

Seems to use the nvidia GPU, from what I gather from monitoring nvidia-smi, GPU RTX2070, driver 545.23.08, Cuda 12.3

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

AD2605 avatar Jan 02 '24 08:01 AD2605

What's the output of darktable-cltest within the flatpak environment?

gi-man avatar Jan 02 '24 15:01 gi-man

Running darktable-cltest, I get the following -

darktable 4.6.0
Copyright (C) 2012-2023 Johannes Hanika and other contributors.

Compile options:
  Bit depth              -> 64 bit
  Debug                  -> DISABLED
  SSE2 optimizations     -> ENABLED
  OpenMP                 -> ENABLED
  OpenCL                 -> ENABLED
  Lua                    -> ENABLED  - API version 9.2.0
  Colord                 -> ENABLED
  gPhoto2                -> ENABLED
  GMIC                   -> ENABLED  - Compressed LUTs are supported
  GraphicsMagick         -> ENABLED
  ImageMagick            -> DISABLED
  libavif                -> DISABLED
  libheif                -> DISABLED
  libjxl                 -> DISABLED
  OpenJPEG               -> ENABLED
  OpenEXR                -> ENABLED
  WebP                   -> ENABLED

See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.

     0.0217 [dt_get_sysresource_level] switched to 1 as `default'
     0.0217   total mem:       15832MB
     0.0217   mipmap cache:    1979MB
     0.0217   available mem:   7916MB
     0.0217   singlebuff:      123MB
     0.0501 [opencl_init] opencl library 'libOpenCL' found on your system and loaded, preference 'default path'
     0.9430 [opencl_init] found 4 platforms
     0.9431 [check platform] platform 'Intel(R) FPGA Emulation Platform for OpenCL(TM)' with key 'clplatform_intelrfpgaemulationplatformforopencltm' is NOT active
     0.9431 [check platform] platform 'Intel(R) OpenCL' with key 'clplatform_intelropencl' is NOT active
[opencl_init] found 2 devices

[dt_opencl_device_init]
   DEVICE:                   0: 'Intel(R) UHD Graphics 630'
   PLATFORM, VENDOR & ID:    Intel(R) OpenCL Graphics, Intel(R) Corporation, ID=32902
   CANONICAL NAME:           intelropenclgraphicsintelruhdgraphics630
   DRIVER VERSION:           23.35.27191.42
   DEVICE VERSION:           OpenCL 3.0 NEO 
   DEVICE_TYPE:              GPU, unified mem
   GLOBAL MEM SIZE:          12666 MB
   MAX MEM ALLOC:            4096 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      256
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 256 256 256 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   NO
   USE HEADROOM:             600Mb
   AVOID ATOMICS:            NO
   MICRO NAP:                250
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/atharva/.cache/darktable/cached_v3_kernels_for_IntelROpenCLGraphicsIntelRUHDGraphics630_23352719142
   CL COMPILER OPTION:       
   CL COMPILER COMMAND:      -w   -DINTEL=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0.0196 sec

[dt_opencl_device_init]
   DEVICE:                   1: 'NVIDIA GeForce RTX 2070'
   PLATFORM, VENDOR & ID:    NVIDIA CUDA, NVIDIA Corporation, ID=4318
   CANONICAL NAME:           nvidiacudanvidiageforcertx2070
   DRIVER VERSION:           545.23.08
   DEVICE VERSION:           OpenCL 3.0 CUDA, SM_20 SUPPORT
   DEVICE_TYPE:              GPU, dedicated mem
   GLOBAL MEM SIZE:          7974 MB
   MAX MEM ALLOC:            1994 MB
   MAX IMAGE SIZE:           32768 x 32768
   MAX WORK GROUP SIZE:      1024
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 64 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   NO
   USE HEADROOM:             600Mb
   AVOID ATOMICS:            NO
   MICRO NAP:                250
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/atharva/.cache/darktable/cached_v3_kernels_for_NVIDIACUDANVIDIAGeForceRTX2070_5452308
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   CL COMPILER COMMAND:      -w -cl-fast-relaxed-math  -DNVIDIA_SM_20=1 -DNVIDIA=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0.0234 sec
[opencl_init] OpenCL successfully initialized. internal numbers and names of available devices:
[opencl_init]		0	'Intel(R) OpenCL Graphics Intel(R) UHD Graphics 630'
[opencl_init]		1	'NVIDIA CUDA NVIDIA GeForce RTX 2070'
     1.0738 [opencl_init] FINALLY: opencl is AVAILABLE and ENABLED.
[opencl_init] opencl_scheduling_profile: 'very fast GPU'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 400
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		0	0	0	0	0
[dt_opencl_update_priorities]		1	1	1	1	1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		1	1	1	1	1
[opencl_synchronization_timeout] synchronization timeout set to 0
   UNIFIED MEM SIZE:         3958 MB reserved for 'intelropenclgraphicsintelruhdgraphics630'
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		0	0	0	0	0
[dt_opencl_update_priorities]		1	1	1	1	1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		1	1	1	1	1
[opencl_synchronization_timeout] synchronization timeout set to 0

AD2605 avatar Jan 02 '24 15:01 AD2605

The kernel paths point to a non-flatpak location. Are you sure this is a flatpak installation? Not related to your issue, but I would disable the Intel iGPU on your dt processing settings.

Normally you will need a command line like this: flatpak run org.darktable.Darktable -d all

gi-man avatar Jan 02 '24 16:01 gi-man

Lemme get Back to you about the flatpak stuff Why should I avoid the iGPU though?

AD2605 avatar Jan 02 '24 17:01 AD2605

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Mar 03 '24 00:03 github-actions[bot]

Lemme get Back to you about the flatpak stuff

@AD2605 Any results?

victoryforce avatar May 10 '24 18:05 victoryforce

Hi @victoryforce , sorry for the delay, No I was not able to get back to it. I will close this issue, and in case I face it later on I will raise it again, closing this now

AD2605 avatar May 11 '24 15:05 AD2605