Project

General

Profile

Bug #10840

Darktable crashes on export

Added by Colin Adams over 4 years ago. Updated 11 months ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
Lighttable
Target version:
Start date:
12/31/2015
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.0.0
System:
Fedora/RHEL
bitness:
64-bit
hardware architecture:
amd64/x86

Description

New LWP 8886]
[New LWP 8885]
[New LWP 8884]
[New LWP 8883]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007fbf56251ffd in poll () from /lib64/libc.so.6
backtrace written to /tmp/darktable_bt_SQAVAY.txt
Segmentation fault (core dumped)

his is darktable darktable-2.0.0-1.fc23
copyright (c) 2009-2015 johannes hanika

compile options:
OpenMP support enabled
OpenCL support enabled
Lua support disabled
Colord support enabled
gPhoto2 support enabled
GraphicsMagick support enabled

Example RAW file and XMP and backtrace attached

AAA_6588.NEF (38.4 MB) AAA_6588.NEF Colin Adams, 12/31/2015 04:27 PM
AAA_6588.NEF.xmp (3.66 KB) AAA_6588.NEF.xmp Colin Adams, 12/31/2015 04:28 PM
darktable_bt_SQAVAY.txt (22.1 KB) darktable_bt_SQAVAY.txt Colin Adams, 12/31/2015 04:29 PM
darktable_bt_NL9MAY.txt (79.1 KB) darktable_bt_NL9MAY.txt Colin Adams, 12/31/2015 05:04 PM
opencl.txt (19.7 KB) opencl.txt Colin Adams, 01/04/2016 05:05 PM

Associated revisions

Revision 3a285d66 (diff)
Added by Ulrich Pegelow over 4 years ago

opencl: fix for bug #10840 in darktable-2.0.x branch

the corresponding fix for the 2.1 master is part of a broader enhancement
in PR #1100

History

#1 Updated by Roman Lebedev over 4 years ago

  • % Done changed from 0 to 20
  • Status changed from New to Incomplete
  • Subject changed from Darktable crashes on export with max size set to 0 x 0 to Darktable crashes on export

Please install debug symbols (at least darktable-dbg (or whatever it is called for your distribution), and preferably gtk3-dbg and glib-dbg too)
Unfortunately, that bt is very useless without debug symbols. (though i bet it is similar to #10797)

Also, looks like the crash is related to OpenCL, so you may try to disable opencl in settings.

#2 Updated by Colin Adams over 4 years ago

I tried darktable -d opencl (a mistake for --disable-opencl) and this time it worked, without a crash!
Also darktable --disable-opencl works without crashing.

I'm using Fedora. I can't find a gtk3-dbg, or similar named package. Likewise for darktable.

#3 Updated by Ulrich Pegelow over 4 years ago

If this issue is a duplicate of #10797 then it would only be indirectly related to OpenCL. Due to the limited amount of GPU memory darktable frequently needs to apply tiling when it exports images with OpenCL enabled. And the crash in #10797 has been triggered in the tiling code.

Question is why we have that crash. So we are still interested in the a backtrace with full debugging symbols. Please also tell us what parameters your are using in the export panel (image width/height, with or without upscaling, ...)

#4 Updated by Colin Adams over 4 years ago

I installed darktable-debuginfo (still don't know about gtk3 debug package name - dnf seraches have been unsucessfull so far).

So Now I get:

Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /lib64/libOpenCL.so
Missing separate debuginfo for /lib64/libnvidia-opencl.so.1
Missing separate debuginfo for /lib64/libcuda.so.1
0x00007fb873f78ffd in poll () from /lib64/libc.so.6
backtrace written to /tmp/darktable_bt_NL9MAY.txt
Segmentation fault (core dumped)

Attached backtrace afresh.

image width and height both zero. Allow upscaling = no. Profile image settings. Intent absolute colorimetric (hm. that's unintentional). Style none.

#5 Updated by Colin Adams over 4 years ago

Changed intent to perceptual, and there is no crash.
But I only get crashes about 3 times in 4 anyway, so that may just be a coincidence.

#6 Updated by Roman Lebedev over 4 years ago

Thread 38 (Thread 0x7fb85a976700 (LWP 10358)):
#0  0x00007fb8775d95db in waitpid () at /lib64/libpthread.so.0
#1  0x00007fb87b78c440 in _dt_sigsegv_handler (param=11) at /usr/src/debug/darktable-2.0.0/src/common/darktable.c:187
        pid = 10401
        name_used = 0x7fb854034c10 "/tmp/darktable_bt_NL9MAY.txt" 
        fout = <optimized out>
        delete_file = 0
        datadir = "/usr/share/darktable", '\000' <repeats 4075 times>
        pid_arg = 0x7fb8540352f0 "10356" 
        comm_arg = 0x7fb85407b030 "/usr/share/darktable/gdb_commands" 
        log_arg = 0x7fb854083420 "set logging on /tmp/darktable_bt_NL9MAY.txt" 
#2  0x00007fb873eb6b20 in <signal handler called> () at /lib64/libc.so.6
#3  0x00007fb8540004f8 in  ()
#4  0x00007fb87b82f5d9 in default_process_tiling_cl (in_bpp=4, roi_out=0x7fb85a9571d0, roi_in=<optimized out>, ovoid=0x7fb7ad100010, ivoid=0x7fb78a60e010, piece=<optimized out>, self=0x7fb8540083f0) at /usr/src/debug/darktable-2.0.0/src/develop/tiling.c:1511
        input = 0x7fb8540729b0
        singlebuffer = <optimized out>
        width = 6804
        output = 0x7fb854060220
        pinned_output = <optimized out>
        tiling = {factor = 2.25, maxbuf = 1, overhead = 0, overlap = 5, xalign = 2, yalign = 2}
        overlap = 6
        pinned_input = <optimized out>
        ipitch = <optimized out>
        maxbuf = <optimized out>
        devid = 0
        out_bpp = 16
        available = <optimized out>
        tile_ht = 4916
        use_pinned_memory = 0
        headroom = <optimized out>
        height = 4928
        tiles_x = 2
        input_buffer = 0x0
        max_bpp = 16
        tile_wd = 6792
        tiles_y = <optimized out>
        err = 0
        output_buffer = 0x0
        opitch = <optimized out>
        pinned_buffer_slack = <optimized out>
        factor = <optimized out>
        xyalign = <optimized out>
        walign = <optimized out>
        halign = <optimized out>
        processed_maximum_saved = {2.22265625, 1, 1.20703125}
        processed_maximum_new = {1, 0, 0}

src/develop/tiling.c:1511 is:

  if(output != NULL) dt_opencl_release_mem_object(output);

OpenCL driver bug?

#7 Updated by Ulrich Pegelow over 4 years ago

The code line

if(output != NULL) dt_opencl_release_mem_object(output);

is part of OpenCL error handling in that tiling routine. I would be interesting to see what kind of error happened here.

@Colin: please run darktable with -d opencl and report the output when the crash happens.

#8 Updated by Colin Adams over 4 years ago

I can't get it to crash with -d opencl.

(which gives me a workaround of darktable -d opencl >/dev/null)

#9 Updated by Ulrich Pegelow over 4 years ago

Oh well, a Heisenbug.

#10 Updated by Colin Adams over 4 years ago

Well now, I can reproduce it (and no work-around). Different photo.

I'm attaching the stdout.

#11 Updated by Colin Adams over 4 years ago

Actually --disable-opencl is the work-around.

#12 Updated by Ulrich Pegelow over 4 years ago

And it's most likely a darktable bug (double-free of OpenCL memory object in demosaic.c). I have fixed it already in the course of working on Pull Request #1100 ([[https://github.com/darktable-org/darktable/pull/1100]]. If you are able to compile darktable by yourself please give it a try.

#13 Updated by Ulrich Pegelow over 4 years ago

  • % Done changed from 20 to 10
  • Status changed from Incomplete to Confirmed

#14 Updated by Colin Adams over 4 years ago

As I'm a programmer, i ought to be able to do that.

I'll check the developers' wiki for instructions.

#15 Updated by Colin Adams over 4 years ago

Nice clear instructions on the wiki. Good job.

Yes, it seems to have fixed it.

P.S. How do I clean up? It installed everything under /opt/darktable (including the binary). Currently I have darktable-2.0.0-1-fc23 installed from Germano's repository. This installs everything outside of /opt, so I think I can just do:

sudo rm -f /opt/darktable

(this is assuming there will be a 2.0.1 release soon with this and other fixes incorporated).

#16 Updated by Tobias Ellinghaus over 4 years ago

sudo rm -f /opt/darktable

Yes, that's why we install there by default.

#17 Updated by Ulrich Pegelow over 4 years ago

  • % Done changed from 10 to 50
  • Status changed from Confirmed to In Progress

Thanks for testing, so the bug is confirmed. I will prepare a fix for the 2.0.x branch today. In master the issue will be fixed when I merge PR 1100 later this week.

#18 Updated by Ulrich Pegelow over 4 years ago

  • % Done changed from 50 to 100
  • Status changed from In Progress to Fixed

#19 Updated by Roman Lebedev over 3 years ago

  • Target version set to 2.2.0

#20 Updated by Kai Garcia 11 months ago

Dark table was going to crashes the all friction that was among some of these that export the all qualities on it. You were able to have some of the details that work on https://edubirdie.org/ they have the all fiction on this that was using all of the details to have all of these formats that was good to read.

Also available in: Atom PDF

Go to top