darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.47k stars 1.12k forks source link

Crash while working on lua scripting #16629

Open pozix604 opened 4 months ago

pozix604 commented 4 months ago

Describe the bug

While experimenting with Lua scripting, darktable repeatedly crashes with the following error:

[New LWP 3546686]
[New LWP 3546687]
[New LWP 3546688]
...
BFD: error: /usr/lib/debug/.build-id/b5/94dc721d75112eb9f2aa7a2c0ae957f373d962.debug(.debug_info) is too large (0x15ef54 bytes)
warning: Can't read data for section '.debug_info' in file '/usr/lib/debug/.build-id/b5/94dc721d75112eb9f2aa7a2c0ae957f373d962.debug'

At startup, darktable does not report any errors.

Script I'm testing, put into ~/.config/darktable/lua and require'ed in luarc is below. Note it registers storage, but returns {} in initialize to signify nothing to export.

local dt = require "darktable"

function storage_store(storage, image, format, filename, number, total, high_quality, extra_dat
    dt.print_log("store: " .. filename)
    dt.print_log("  number: " .. tostring(number) .. "/" .. tostring(total))
    dt.print_log("  path: " .. image.path)
    dt.print_log("  filename: " .. image.filename)
    dt.print_log("  taken: " .. image.exif_datetime_taken)
    dt.print_toast(filename)
end

function storage_finalize(storage, image_table, extra_table)
    dt.print_log("finalize")
end

function storage_supported(storage, format)
    dt.print_log("supported: " .. format.plugin_name)
    return true
end

function storage_initialize(storage, format, images, high_quality, extra_data)
    dt.print_log("initialize")
    return {}
end

dt.register_storage("test_export", "Test Export",
    storage_store,
    storage_finalize,
    storage_supported,
    storage_initialize,
    dt.new_widget("box") {
        orientation = "horizontal",
        dt.new_widget("label") { label = "My Label" },
        dt.new_widget("file_chooser_button") {
            title = "My Title",
            is_directory = true,
        }
    })

Steps to reproduce

  1. Install script above.
  2. Run Darktable.
  3. Select one or two images.
  4. Export using "Test Export".
  5. Repeat export a few times.

Expected behavior

Should not crash

Logfile | Screenshot | Screencast

$ darktable
[New LWP 3546862]
[New LWP 3546864]
[New LWP 3546865]
[New LWP 3546866]
[New LWP 3546867]
[New LWP 3546868]
[New LWP 3546869]
[New LWP 3546870]
[New LWP 3546871]
[New LWP 3546872]
[New LWP 3546873]
[New LWP 3546874]
[New LWP 3546875]
[New LWP 3546876]
[New LWP 3546911]
[New LWP 3546925]
[New LWP 3546944]
[New LWP 3546964]
[New LWP 3546965]
[New LWP 3546966]
[New LWP 3546967]
[New LWP 3546968]
[New LWP 3546969]
[New LWP 3546970]
BFD: error: /usr/lib/debug/.build-id/b5/94dc721d75112eb9f2aa7a2c0ae957f373d962.debug(.debug_info) is too large (0x15ef54 bytes)

warning: Can't read data for section '.debug_info' in file '/usr/lib/debug/.build-id/b5/94dc721d75112eb9f2aa7a2c0ae957f373d962.debug'

warning: Section .debug_aranges in /usr/lib/debug/.build-id/b5/94dc721d75112eb9f2aa7a2c0ae957f373d962.debug entry at offset 0 debug_info_offset 0 does not exists, ignoring .debug_aranges.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38      ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.
warning: Currently logging to /tmp/darktable_bt_NUQDM2.txt.  Turn the logging off and on to make the new setting effective.
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fb6b38967ec in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb6b38421cf in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6b3842958 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb6b3842cef in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b3008495 in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#6  0x00007fb6b3f262fd in dt_gui_gtk_run () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#7  0x00005591a97560a0 in  ()
#8  0x00007fb6b3a4624a in __libc_start_call_main (main=main@entry=0x5591a9756070, argc=argc@entry=1, argv=argv@entry=0x7fff134256f8) at ../sysdeps/nptl/libc_start_call_main.h:58
#9  0x00007fb6b3a46305 in __libc_start_main_impl (main=0x5591a9756070, argc=1, argv=0x7fff134256f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff134256e8) at ../csu/libc-start.c:360
#10 0x00005591a97560f1 in  ()

=========

  Id   Target Id                                            Frame
* 1    Thread 0x7fb6aad62080 (LWP 3546861) "darktable"      syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  2    Thread 0x7fb6aa9ff6c0 (LWP 3546862) "gmain"          0x00007fb6b3b1b15f in __GI___poll (fds=0x5591a9becac0, nfds=2, timeout=6939) at ../sysdeps/unix/sysv/linux/poll.c:29
  3    Thread 0x7fb6a99fd6c0 (LWP 3546864) "gdbus"          0x00007fb6b3b1b15f in __GI___poll (fds=0x5591ada53170, nfds=7, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  4    Thread 0x7fb6a8ff46c0 (LWP 3546865) "worker 0"       __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
  5    Thread 0x7fb69bfff6c0 (LWP 3546866) "worker 1"       __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
  6    Thread 0x7fb69b7fe6c0 (LWP 3546867) "worker 2"       __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
  7    Thread 0x7fb693fff6c0 (LWP 3546868) "worker 3"       0x00007fb6b3af2b57 in __GI___wait4 (pid=3546986, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
  8    Thread 0x7fb69affd6c0 (LWP 3546869) "thumbs_update"  futex_wait (private=0, expected=2, futex_word=0x5591ade6f168) at ../sysdeps/nptl/futex-internal.h:146
  9    Thread 0x7fb69a7fc6c0 (LWP 3546870) "worker 5"       __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
  10   Thread 0x7fb699ffb6c0 (LWP 3546871) "kicker"         0x00007fb6b3aee485 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7fb699fec540, rem=rem@entry=0x7fb699fec540) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
  11   Thread 0x7fb6997fa6c0 (LWP 3546872) "worker res 0"   __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
  12   Thread 0x7fb698ff96c0 (LWP 3546873) "worker res 1"   __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
  13   Thread 0x7fb6937fe6c0 (LWP 3546874) "worker res 2"   __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
  14   Thread 0x7fb692ffd6c0 (LWP 3546875) "gphoto_update"  0x00007fb6b3aee485 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7fb692fee4d0, rem=0x7fb692fee4e0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
  15   Thread 0x7fb691bff6c0 (LWP 3546876) "worker 2"       __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fb67c224400) at ./nptl/futex-internal.c:57
  16   Thread 0x7fb60c04f6c0 (LWP 3546911) "lua thread"     0x00007fb6b3b1b15f in __GI___poll (fds=0x7fb64c001ca0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  17   Thread 0x7fb60b84e6c0 (LWP 3546925) "pool-darktable" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  18   Thread 0x7fb5fbfff6c0 (LWP 3546944) "dconf worker"   0x00007fb6b3b1b15f in __GI___poll (fds=0x5591ad9f2b20, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  19   Thread 0x7fb5fa5266c0 (LWP 3546964) "darktable"      0x00007fb6b433e64e in ?? () from /lib/x86_64-linux-gnu/libgomp.so.1
  20   Thread 0x7fb5fb7fe6c0 (LWP 3546965) "darktable"      0x00007fb6b433e64e in ?? () from /lib/x86_64-linux-gnu/libgomp.so.1
  21   Thread 0x7fb5fad276c0 (LWP 3546966) "darktable"      0x00007fb6b433e64e in ?? () from /lib/x86_64-linux-gnu/libgomp.so.1
  22   Thread 0x7fb5e210a6c0 (LWP 3546967) "darktable"      0x00007fb6b433e64e in ?? () from /lib/x86_64-linux-gnu/libgomp.so.1
  23   Thread 0x7fb5e19096c0 (LWP 3546968) "darktable"      0x00007fb6b433e64e in ?? () from /lib/x86_64-linux-gnu/libgomp.so.1
  24   Thread 0x7fb5e11086c0 (LWP 3546969) "darktable"      0x00007fb6b433e64e in ?? () from /lib/x86_64-linux-gnu/libgomp.so.1
  25   Thread 0x7fb5e09076c0 (LWP 3546970) "darktable"      0x00007fb6b433e64e in ?? () from /lib/x86_64-linux-gnu/libgomp.so.1

=========

Thread 25 (Thread 0x7fb5e09076c0 (LWP 3546970) "darktable"):
#0  0x00007fb6b433e64e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb6b433bd68 in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419133372096, -434063424088846199, -57480, 11, 140733516482320, 140419124981760, 473481054249930889, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 24 (Thread 0x7fb5e11086c0 (LWP 3546969) "darktable"):
#0  0x00007fb6b433e64e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb6b433bd68 in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419141764800, -434063424088846199, -57480, 11, 140733516482320, 140419133374464, 473484353321685129, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 23 (Thread 0x7fb5e19096c0 (LWP 3546968) "darktable"):
#0  0x00007fb6b433e64e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb6b433bd68 in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419150157504, -434063424088846199, -57480, 11, 140733516482320, 140419141767168, 473483254346928265, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 22 (Thread 0x7fb5e210a6c0 (LWP 3546967) "darktable"):
#0  0x00007fb6b433e64e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb6b433bd68 in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419158550208, -434063424088846199, -57480, 11, 140733516482320, 140419150159872, 473477757325660297, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 21 (Thread 0x7fb5fad276c0 (LWP 3546966) "darktable"):
#0  0x00007fb6b433e64e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb6b433bd68 in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419573905088, -434063424088846199, -57480, 11, 140733516482320, 140419565514752, 473458771959599241, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 20 (Thread 0x7fb5fb7fe6c0 (LWP 3546965) "darktable"):
#0  0x00007fb6b433e64e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb6b433bd68 in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419585271488, -434063424088846199, -57480, 11, 140733516482320, 140419576881152, 473462215986499721, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 19 (Thread 0x7fb5fa5266c0 (LWP 3546964) "darktable"):
#0  0x00007fb6b433e64e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb6b433bd68 in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419565512384, -434063424088846199, -57480, 11, 140733516482320, 140419557122048, 473459875229323401, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 18 (Thread 0x7fb5fbfff6c0 (LWP 3546944) "dconf worker"):
#0  0x00007fb6b3b1b15f in __GI___poll (fds=0x5591ad9f2b20, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007fb6b38429ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb6b3842acc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6885584bd in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007fb6b386ccfd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419593664192, -434063424088846199, -57480, 17, 140733516496608, 140419585273856, 473461129896644745, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 17 (Thread 0x7fb60b84e6c0 (LWP 3546925) "pool-darktable"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fb6b389750c in g_cond_wait_until () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb6b3810881 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6b3810e71 in g_async_queue_timeout_pop () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb6b386d57d in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b386ccfd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419854034624, -434063424088846199, -57480, 11, 140733516498608, 140419845644288, 474552081117728905, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 16 (Thread 0x7fb60c04f6c0 (LWP 3546911) "lua thread"):
#0  0x00007fb6b3b1b15f in __GI___poll (fds=0x7fb64c001ca0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007fb6b38429ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb6b3842cef in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6b3fa44f4 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#4  0x00007fb6b386ccfd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140419862427328, -434063424088846199, -57480, 2, 140733516480880, 140419854036992, 474564154807668873, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 15 (Thread 0x7fb691bff6c0 (LWP 3546876) "worker 2"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fb67c224400) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fb67c224400, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fb67c224400, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fb67c2243b0, cond=0x7fb67c2243d8) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb691bf0490, __canceltype = 538976288, __prev = 0x0}
        cbuffer = {wseq = 0, cond = 0x7fb67c2243d8, mutex = 0x7fb67c2243b0, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 0
        seq = 0
        private = 0
#4  ___pthread_cond_wait (cond=0x7fb67c2243d8, mutex=0x7fb67c2243b0) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb69232dcca in  () at /usr/lib/x86_64-linux-gnu/intel-opencl/libigdrcl.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422106052288, -434063424088846199, -57480, 22, 140422269561952, 140422097661952, 474222541698879625, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 14 (Thread 0x7fb692ffd6c0 (LWP 3546875) "gphoto_update"):
#0  0x00007fb6b3aee485 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7fb692fee4d0, rem=0x7fb692fee4e0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        r = <optimized out>
#1  0x00007fb6b3af2d93 in __GI___nanosleep (req=<optimized out>, rem=<optimized out>) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
        ret = <optimized out>
#2  0x00007fb6b386e77f in g_usleep () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6b3f9c38a in dt_update_cameras_thread () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#4  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422127015616, -434063424088846199, -57480, 11, 140733516485136, 140422118625280, 474215380914655369, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#5  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 13 (Thread 0x7fb6937fe6c0 (LWP 3546874) "worker res 2"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 1
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5591a9c11300, cond=0x5591a9c11350) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb6937ef4a0, __canceltype = 0, __prev = 0x0}
        cbuffer = {wseq = 1330, cond = 0x5591a9c11350, mutex = 0x5591a9c11300, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 1330
        seq = 665
        private = 0
#4  ___pthread_cond_wait (cond=0x5591a9c11350, mutex=0x5591a9c11300) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb6b3dbaf4d in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422135408320, -434063424088846199, -57480, 11, 140733516485088, 140422127017984, 474218679986409609, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 12 (Thread 0x7fb698ff96c0 (LWP 3546873) "worker res 1"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 1
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5591a9c11300, cond=0x5591a9c11350) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb698fea4a0, __canceltype = 0, __prev = 0x0}
        cbuffer = {wseq = 1324, cond = 0x5591a9c11350, mutex = 0x5591a9c11300, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 1324
        seq = 662
        private = 0
#4  ___pthread_cond_wait (cond=0x5591a9c11350, mutex=0x5591a9c11300) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb6b3dbaf4d in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422227662528, -434063424088846199, -57480, 11, 140733516485088, 140422219272192, 474237373294694537, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 11 (Thread 0x7fb6997fa6c0 (LWP 3546872) "worker res 0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 1
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5591a9c11300, cond=0x5591a9c11350) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb6997eb4a0, __canceltype = 538976288, __prev = 0x0}
        cbuffer = {wseq = 1326, cond = 0x5591a9c11350, mutex = 0x5591a9c11300, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 1326
        seq = 663
        private = 0
#4  ___pthread_cond_wait (cond=0x5591a9c11350, mutex=0x5591a9c11300) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb6b3dbaf4d in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422236055232, -434063424088846199, -57480, 11, 140733516485088, 140422227664896, 474240672366448777, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 10 (Thread 0x7fb699ffb6c0 (LWP 3546871) "kicker"):
#0  0x00007fb6b3aee485 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7fb699fec540, rem=rem@entry=0x7fb699fec540) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        r = <optimized out>
#1  0x00007fb6b3af2d93 in __GI___nanosleep (req=req@entry=0x7fb699fec540, rem=rem@entry=0x7fb699fec540) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
        ret = <optimized out>
#2  0x00007fb6b3af2cca in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
        save_errno = 0
        ts = {tv_sec = 1, tv_nsec = 525992493}
#3  0x00007fb6b3dbab4a in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#4  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422244447936, -434063424088846199, -57480, 11, 140733516485088, 140422236057600, 474239569096724617, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#5  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 9 (Thread 0x7fb69a7fc6c0 (LWP 3546870) "worker 5"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5591a9c11300, cond=0x5591a9c11350) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb69a7ed4d0, __canceltype = 2, __prev = 0x0}
        cbuffer = {wseq = 1334, cond = 0x5591a9c11350, mutex = 0x5591a9c11300, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 1334
        seq = 667
        private = 0
#4  ___pthread_cond_wait (cond=0x5591a9c11350, mutex=0x5591a9c11300) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb6b3dbc091 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422252840640, -434063424088846199, -57480, 11, 140733516485088, 140422244450304, 474234072075456649, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 8 (Thread 0x7fb69affd6c0 (LWP 3546869) "thumbs_update"):
#0  futex_wait (private=0, expected=2, futex_word=0x5591ade6f168) at ../sysdeps/nptl/futex-internal.h:146
        __ret = -512
        err = <optimized out>
#1  __GI___lll_lock_wait (futex=futex@entry=0x5591ade6f168, private=0) at ./nptl/lowlevellock.c:49
#2  0x00007fb6b3aab3c2 in lll_mutex_lock_optimized (mutex=0x5591ade6f168) at ./nptl/pthread_mutex_lock.c:48
        __futex = 0x5591ade6f168
        private = <optimized out>
        type = <optimized out>
        __PRETTY_FUNCTION__ = "___pthread_mutex_lock"
        id = <optimized out>
#3  ___pthread_mutex_lock (mutex=0x5591ade6f168) at ./nptl/pthread_mutex_lock.c:93
        type = <optimized out>
        __PRETTY_FUNCTION__ = "___pthread_mutex_lock"
        id = <optimized out>
#4  0x00007fb6b3dbab9a in dt_control_job_get_state () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#5  0x00007fb6b3dbc1ed in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422261233344, -434063424088846199, -57480, 11, 140733516485088, 140422252843008, 474232973100699785, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 7 (Thread 0x7fb693fff6c0 (LWP 3546868) "worker 3"):
#0  0x00007fb6b3af2b57 in __GI___wait4 (pid=3546986, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
        sc_ret = -512
        sc_cancel_oldtype = 0
#1  0x00007fb6b3da5980 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#2  0x00007fb6b3a5b050 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007fb6b386107e in g_slice_alloc () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb6b383df24 in g_list_append () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b383e61b in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fb6b3840ace in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007fb6b3840c0a in g_source_attach () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007fb6b3840f3e in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007fb6b3db7355 in dt_control_log () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#10 0x00007fb6b3dc0055 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#11 0x00007fb6b3dbb5f7 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#12 0x00007fb6b3dbc3c8 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#13 0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422143801024, -434063424088846199, -57480, 11, 140733516485088, 140422135410688, 474217593896554633, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#14 0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7fb69b7fe6c0 (LWP 3546867) "worker 2"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5591a9c11300, cond=0x5591a9c11350) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb69b7ef4d0, __canceltype = 2, __prev = 0x0}
        cbuffer = {wseq = 1336, cond = 0x5591a9c11350, mutex = 0x5591a9c11300, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 1336
        seq = 668
        private = 0
#4  ___pthread_cond_wait (cond=0x5591a9c11350, mutex=0x5591a9c11300) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb6b3dbc091 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422269626048, -434063424088846199, -57480, 11, 140733516485088, 140422261235712, 474236272172454025, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7fb69bfff6c0 (LWP 3546866) "worker 1"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5591a9c11300, cond=0x5591a9c11350) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb69bff04d0, __canceltype = 2, __prev = 0x0}
        cbuffer = {wseq = 1332, cond = 0x5591a9c11350, mutex = 0x5591a9c11300, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 1332
        seq = 666
        private = 0
#4  ___pthread_cond_wait (cond=0x5591a9c11350, mutex=0x5591a9c11300) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb6b3dbc091 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422278018752, -434063424088846199, -57480, 11, 140733516485088, 140422269628416, 474235186082599049, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7fb6a8ff46c0 (LWP 3546865) "worker 0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x5591a9c11378) at ./nptl/futex-internal.c:57
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 393
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007fb6b3aa4efb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5591a9c11378, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fb6b3aa7558 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5591a9c11300, cond=0x5591a9c11350) at ./nptl/pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7fb6b3aa72e0 <__condvar_cleanup_waiting>, __arg = 0x7fb6a8fe54d0, __canceltype = 0, __prev = 0x0}
        cbuffer = {wseq = 1328, cond = 0x5591a9c11350, mutex = 0x5591a9c11300, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        signals = <optimized out>
        result = 0
        wseq = 1328
        seq = 664
        private = 0
#4  ___pthread_cond_wait (cond=0x5591a9c11350, mutex=0x5591a9c11300) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fb6b3dbc091 in  () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#6  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422496077504, -434063424088846199, -57480, 11, 140733516485088, 140422487687168, 474202190533218441, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7fb6a99fd6c0 (LWP 3546864) "gdbus"):
#0  0x00007fb6b3b1b15f in __GI___poll (fds=0x5591ada53170, nfds=7, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007fb6b38429ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb6b3842cef in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6b2c168f6 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fb6b386ccfd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422506600128, -434063424088846199, -57480, 11, 140733516484832, 140422498209792, 474204660676284553, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7fb6aa9ff6c0 (LWP 3546862) "gmain"):
#0  0x00007fb6b3b1b15f in __GI___poll (fds=0x5591a9becac0, nfds=2, timeout=6939) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007fb6b38429ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb6b3842acc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6b3842b11 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb6b386ccfd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b3aa8134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140422523385536, -434063424088846199, -57480, 22, 140733516484336, 140422514995200, 474198077565161609, 474147662381437065}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007fb6b3b287dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7fb6aad62080 (LWP 3546861) "darktable"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fb6b38967ec in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb6b38421cf in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb6b3842958 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb6b3842cef in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb6b3008495 in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#6  0x00007fb6b3f262fd in dt_gui_gtk_run () at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#7  0x00005591a97560a0 in  ()
#8  0x00007fb6b3a4624a in __libc_start_call_main (main=main@entry=0x5591a9756070, argc=argc@entry=1, argv=argv@entry=0x7fff134256f8) at ../sysdeps/nptl/libc_start_call_main.h:58
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140733516502776, -434063424088715127, 0, 140733516502792, 94084101672376, 140422685450272, 434530402260078729, 474147713482870921}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7fff134256f8, 0x7fff134256f8}, data = {prev = 0x0, cleanup = 0x0, canceltype = 323114744}}}
        not_first_call = <optimized out>
#9  0x00007fb6b3a46305 in __libc_start_main_impl (main=0x5591a9756070, argc=1, argv=0x7fff134256f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff134256e8) at ../csu/libc-start.c:360
#10 0x00005591a97560f1 in  ()
[Inferior 1 (process 3546861) detached]
backtrace written to /tmp/darktable_bt_NUQDM2.txt
Segmentation fault

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

4.6.1

What OS are you using?

Linux

What is the version of your OS?

Debian 12

Describe your system?

No response

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

Intel Iris Xe

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

No response

wpferguson commented 4 months ago

run withdarktable -d lua and see where the dt.print_log statements stop. That's where the problem is in your script

EDIT:

The last line of the backtrace tells you the problem, Segmentation fault. You tried to access something that wasn't allocated.

It appears that you are trying to learn lua scripting for darktable. The best resource for how to is the existing scripts.

As the author of several thousand of these crashes I can tell you that it was a bug in my code every time.

wpferguson commented 4 months ago

Ran your script. Selected/tmp for the output directory. Selected 4 images and exported. Got message on the screen no image to export. You didn't handle the selected images and therefore when you tried to manipulate the non existing images darktable seg faulted.

You don't need initialize and finalize unless you are trying to do something tricky.

Look at contrib/gimp.lua for how to use the exporter and then access the exported images after export.

Look at https://github.com/wpferguson/extra-dt-lua-scripts/blob/master/postsharpen.lua for an example that uses initialize (I called it setup). contrib/EnfuseAdvanced uses initialize and finalize.

pozix604 commented 4 months ago

Hi @wpferguson. Thanks for looking into it.

What do you mean by "You didn't handle the selected images" ? Eventually, I want to filter the images list in initialize and so I started by simply returning an empty table, meaning that I don't want to export any of the images. So, I shouldn't have to handle any of them, right? I don't have any code to manipulate any of the images. My store function just prints out some debug information.

wpferguson commented 4 months ago

The exporter tried to export the empty list of images. In other words it tried to access something that didn't exist and therefore it seg faulted.

pozix604 commented 4 months ago

Does that mean that at least one image needs to be returned from initialize? I thought the intent of the table returned from initialize was to allow for filtering of the images, possibly the filtering of all of them.

The documentation says it is okay to return an empty table:

return - table or nil - The modified table of images to export or nil If nil (or nothing) is returned, the original list of images will be exported If a table of images is returned, that table will be used instead. The table can be empty. The images parameter can be modified and returned

There's something I'm not understanding but I don't know what.

wpferguson commented 4 months ago

I reproduced the crash on a single invocation. This occurs on windows, but so far not on linux. Now that it's reproducible I'll see if I can figure it out.

wpferguson commented 4 months ago

After hours of troubleshooting...

Windows seems more sensitive to it, so I may try troubleshooting there since I've narrowed it down.

pozix604 commented 4 months ago
  • the issue occurs randomly

  • The quicker I press the export button, the quicker it will happen. Pressing the export button 5 times in a couple of seconds almost always works

  • If I wait for the screen message to clean (approx 5 sec) before I press the export button again, then it needs 12 - 16 repetitions before it occurs again.

This is consistent with the behavior I see on Debian 12.

wpferguson commented 4 months ago

Same as #14803

github-actions[bot] commented 2 months ago

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.