Help! Darktable Segfaulting. Linux Mint 19 Mate.


(Brian Innes) #1

I have no idea what is going on now with my Darktable install.

Whenever I try to launch it, it starts loading images into the light table, and then segfaults.

I am running linux mint 19 mate edition, with Darktable 2.4.4. It was working yesterday, now for some reason it is now segfaulting!

This is what pops up on the command line:

[brian@Escher ~]$ darktable
[defaults] found a 64-bit system with 16361312 kb ram and 4 cores (0 atom based)
[defaults] setting high quality defaults
free(): invalid pointer
Aborted (core dumped)

System info is here:
CPU: Quad core AMD A8-6600K APU with Radeon HD Graphics (-MCP-)
cache: 8192 KB
clock speeds: max: 3900 MHz 1: 2209 MHz 2: 2041 MHz 3: 1894 MHz
4: 1893 MHz
CPU Flags: 3dnowprefetch abm aes aperfmperf apic arat avx bmi1
clflush cmov cmp_legacy constant_tsc cpb cpuid cr8_legacy cx16 cx8
de decodeassists extapic extd_apicid f16c flushbyasid fma fma4 fpu
fxsr fxsr_opt ht hw_pstate ibs lahf_lm lbrv lm lwp mca mce
misalignsse mmx mmxext monitor msr mtrr nodeid_msr nonstop_tsc nopl
npt nrip_save nx osvw pae pat pausefilter pclmulqdq pdpe1gb
perfctr_core perfctr_nb pfthreshold pge pni popcnt pse pse36 rdtscp
rep_good sep skinit ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 svm
svm_lock syscall tbm tce topoext tsc tsc_scale vmcb_clean vme
vmmcall wdt xop xsave

I’m running Linux Mint 19 Tara Mate…

I have also tried deleting my darktable config folder at

~/.config/darktable/ but this does nothing.

Any suggestions?


(Mica) #2

Move your library.db to the desktop and try to launch. If it doesn’t launch, move it back and move data.db to the desktop and relaunch.


(Brian Innes) #3

Tried doing both those steps, unfortunately still segfaulting :frowning:

[brian@Escher ~]$ darktable
[defaults] found a 64-bit system with 16361312 kb ram and 4 cores (0 atom based)
[defaults] setting high quality defaults
free(): invalid pointer
Aborted (core dumped)


(Morgan Hardwood) #4

@Brian_Innes run it through GDB. Even if you don’t have access to a “debug” build, a regular “release” build might give more useful info than just “invalid pointer”. Follow these instructions, and just substitute RawTherapee for darktable:
http://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports#Step_by_step


(Brian Innes) #5

Here’s the output from GDB on Darktable:

[brian@Escher ~]$ gdb darktable
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from darktable...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/darktable 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe38c3700 (LWP 2455)]
[New Thread 0x7fffe30c2700 (LWP 2456)]
[New Thread 0x7fffe28c1700 (LWP 2457)]
[defaults] found a 64-bit system with 16361312 kb ram and 4 cores (0 atom based)
[defaults] setting high quality defaults
[New Thread 0x7fffe20c0700 (LWP 2458)]
[New Thread 0x7fffe18bf700 (LWP 2459)]
[New Thread 0x7fffe10be700 (LWP 2460)]
[New Thread 0x7fffe08bd700 (LWP 2461)]
[New Thread 0x7fffc3fff700 (LWP 2462)]
[New Thread 0x7fffc37fe700 (LWP 2463)]
[New Thread 0x7fffc2ffd700 (LWP 2464)]
[New Thread 0x7fffc27fc700 (LWP 2465)]
[New Thread 0x7fffc1ffb700 (LWP 2466)]
[New Thread 0x7fffc17fa700 (LWP 2467)]
[New Thread 0x7fffc0ff9700 (LWP 2468)]
[New Thread 0x7fff94eb5700 (LWP 2469)]
[Thread 0x7fff94eb5700 (LWP 2469) exited]
[New Thread 0x7fff94eb5700 (LWP 2470)]
[Thread 0x7fff94eb5700 (LWP 2470) exited]
[New Thread 0x7fff94eb5700 (LWP 2471)]
[Thread 0x7fff94eb5700 (LWP 2471) exited]
[New Thread 0x7fff94eb5700 (LWP 2472)]
[Thread 0x7fff94eb5700 (LWP 2472) exited]
[New Thread 0x7fff94eb5700 (LWP 2473)]
[New Thread 0x7fff8fb87700 (LWP 2474)]
[New Thread 0x7fff876b4700 (LWP 2475)]
[New Thread 0x7fff864ab700 (LWP 2476)]
[New Thread 0x7fff85caa700 (LWP 2477)]
[New Thread 0x7fff854a9700 (LWP 2478)]
[Thread 0x7fff876b4700 (LWP 2475) exited]
[Thread 0x7fffe30c2700 (LWP 2456) exited]
[New Thread 0x7fffe30c2700 (LWP 2479)]
[New Thread 0x7fff876b4700 (LWP 2480)]
[New Thread 0x7fff8e8d3700 (LWP 2481)]
[New Thread 0x7fff8d660700 (LWP 2482)]
[New Thread 0x7fff8cdde700 (LWP 2483)]
[New Thread 0x7fff86eb3700 (LWP 2484)]
[New Thread 0x7fff84ca8700 (LWP 2485)]
[New Thread 0x7fff748e3700 (LWP 2486)]
[New Thread 0x7fff8e0d2700 (LWP 2487)]
[New Thread 0x7fff738e1700 (LWP 2489)]
[New Thread 0x7fff740e2700 (LWP 2488)]
[New Thread 0x7fff66faf700 (LWP 2490)]
[New Thread 0x7fff677b0700 (LWP 2491)]
[New Thread 0x7fff667ae700 (LWP 2492)]
[New Thread 0x7fff5a6e7700 (LWP 2493)]
[New Thread 0x7fff59636700 (LWP 2494)]
free(): invalid pointer
[New Thread 0x7fff58e35700 (LWP 2495)]

Thread 6 "worker 1" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe18bf700 (LWP 2459)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) 

No idea what any of this means!


(Glenn Butcher) #6

When you get to that (gdb) prompt at the end, type bt, then enter. That’ll show the programmers where the segfault is happening.

Edit: ‘default’ to ‘segfault’, danged phone autospell. Of note is that it turned ‘programmers’ into ‘prisoners’ … :smile:


(Brian Innes) #7

Well, here is the result of bt command in gdb:

(gdb) bt
#0  0x00007ffff7505e97 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff7507801 in __GI_abort () at abort.c:79
#2  0x00007ffff7550897 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff767db9a "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff755790a in malloc_printerr (str=str@entry=0x7ffff767bd88 "free(): invalid pointer") at malloc.c:5350
#4  0x00007ffff755ee1c in _int_free (have_lock=0, p=0x7fffc006a2b0, av=0x7ffff78b2c40 <main_arena>) at malloc.c:4157
#5  0x00007ffff755ee1c in __GI___libc_free (mem=0x7fffc006a2c0)
    at malloc.c:3124
#6  0x00007fff97d7920d in  ()
    at /usr/lib/x86_64-linux-gnu/darktable/plugins/libatrous.so
#7  0x00007fff97d79774 in process_sse2 ()
    at /usr/lib/x86_64-linux-gnu/darktable/plugins/libatrous.so
#8  0x00007ffff79dcd62 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#9  0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#10 0x00007ffff79dc8c2 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#11 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
---Type <return> to continue, or q <return> to quit---
#12 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#13 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#14 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#15 0x00007ffff79dc8c2 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#16 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#17 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#18 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#19 0x00007ffff79dc8c2 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#20 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#21 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#22 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#23 0x00007ffff79dc790 in  ()
---Type <return> to continue, or q <return> to quit---
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#24 0x00007ffff79dc8c2 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#25 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#26 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#27 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#28 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#29 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#30 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#31 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#32 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#33 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#34 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
---Type <return> to continue, or q <return> to quit---
#35 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#36 0x00007ffff79dc790 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#37 0x00007ffff79dc8c2 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#38 0x00007ffff79e1185 in dt_dev_pixelpipe_process ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#39 0x00007ffff7978070 in dt_imageio_export_with_flags ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#40 0x00007ffff7996dff in dt_mipmap_cache_get_with_caller ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#41 0x00007ffff79bf86f in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#42 0x00007ffff79b7eed in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#43 0x00007ffff79b89d8 in  ()
    at /usr/bin/../lib/x86_64-linux-gnu/darktable/libdarktable.so
#44 0x00007ffff72af6db in start_thread (arg=0x7fffe08bd700)
    at pthread_create.c:463
#45 0x00007ffff75e888f in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

(Glenn Butcher) #8

I’m not a darktable programmer (prisoner?), but it looks like line #6 is the ‘money line’…


(Brian Innes) #9

Curiously, Darktable only seems to segfault when I open a particular folder of images…

So as a test, I re-imported that set of images from the camera memory card, into a new folder, and darktable opened it without any problems. So perhaps it has been a corrupt .xmp file or something?

–edit-- although darktable seems to be now working, the lighttable is very very sluggish now for some reason…


#10

I wonder if it has to do with the presence of a file that is unreadable or unusual. I faintly recall having a problem when a certain type of PNG or GIF is in the folder. Unsure of the details or whether it was with dt; I cannot seem to find the post.


(Brian Innes) #11

@afre, so far so good, no more crashes with darktable. So perhaps it was a corrupt file or something?