vkdt devel diary

Wow that was superquick!
this time I’m able to install it with sudo apt install but I have this error after running it:

(base) 19:36:29 aadm@psion:~/Videos$ vkdt
*** buffer overflow detected ***: terminated
Aborted (core dumped)

I tried also vkdt-cli, same error…

heya,

your requests are not unreasonable.

  • scaling font size is very easy if it’s just a setting in ~/.config/vkdt/config.rc read on startup. i can add that.
  • zooming light table mode i can very quickly add too, but unlike darktable i don’t keep a multiresolution cache of the thumbnails, these are something fixed and will pixelate quite badly if you zoom too much. zooming out might be a useful feature on its own though.

dspy is added automatically. no user wiring required:


(i’m on 4k too, cropped the video from the top left corner hence the fonts look so cramped)

re:tooltips: i was thinking maybe i should extract these from the parameter description in the readme.md in the module directory.

1 Like

hm that sounds bad. i don’t have this issue here. also the address sanitizer is happy so i don’t see an obvious error here.

did you also install the debug symbols package? and are you comfortable running it through gdb?

i.e.

gdb vkdt
r
bt
bt full
thread apply all bt full

and post the output somewhere?

Many thanks for your reply on the GUI thing !

Oh, btw I just did a git clone and recompiled.
And I get a reproducible crash :
image

Test case:

  • open any folder
  • double click on any image
  • click on Tweak all tab (right hand side pane)
  • expand the “pick 01” module
    it crashes

FYI…
GLLM

404?

but i can confirm this crash. will investigate.

woops, Spectacle copied the local path instead of the clipboard :slightly_smiling_face:
updated

fix pushed, thanks for reporting. i will cost suse a fortune in electricity tonight, rebuilding all the time.

1 Like

I don’t know what that means sorry!

Also about gdb, not comfortable either but it’s available on the computer so I simply run the sequence of commands you wrote, here’s the output hidden below:

gdb log
(base) 21:19:46 aadm@psion:~/Videos$ gdb vkdt
GNU gdb (Ubuntu 10.1-2ubuntu2) 10.1.90.20210411-git
Copyright (C) 2021 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:
<https://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 vkdt...
(No debugging symbols found in vkdt)

(gdb) r
Starting program: /usr/bin/vkdt 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
*** buffer overflow detected ***: terminated

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007ffff77b2864 in __GI_abort () at abort.c:79
#2  0x00007ffff7815736 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff793a953 "*** %s ***: terminated\n")
    at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff78b43fa in __GI___fortify_fail (msg=msg@entry=0x7ffff793a8f9 "buffer overflow detected") at fortify_fail.c:26
#4  0x00007ffff78b2c96 in __GI___chk_fail () at chk_fail.c:28
#5  0x00007ffff78b3268 in __realpath_chk (buf=<optimized out>, resolved=<optimized out>, resolvedlen=<optimized out>)
    at realpath_chk.c:29
#6  0x0000555555608c7b in ?? ()
#7  0x000055555555e0b3 in ?? ()
#8  0x00007ffff77b4565 in __libc_start_main (main=0x55555555de60, argc=1, argv=0x7fffffffdd28, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd18) at ../csu/libc-start.c:332
#9  0x000055555555e6ae in ?? ()

(gdb) bt full
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
        set = {__val = {0 <repeats 16 times>}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x00007ffff77b2864 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0 <repeats 16 times>}}, 
          sa_flags = 0, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff7815736 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff793a953 "*** %s ***: terminated\n")
    at ../sysdeps/posix/libc_fatal.c:155
        ap = {{gp_offset = 24, fp_offset = 0, overflow_arg_area = 0x7fffffffc1b0, reg_save_area = 0x7fffffffc140}}
        fd = <optimized out>
        list = <optimized out>
        nlist = <optimized out>
        cp = <optimized out>
#3  0x00007ffff78b43fa in __GI___fortify_fail (msg=msg@entry=0x7ffff793a8f9 "buffer overflow detected") at fortify_fail.c:26
No locals.
#4  0x00007ffff78b2c96 in __GI___chk_fail () at chk_fail.c:28
No locals.
#5  0x00007ffff78b3268 in __realpath_chk (buf=<optimized out>, resolved=<optimized out>, resolvedlen=<optimized out>)
    at realpath_chk.c:29
No locals.
#6  0x0000555555608c7b in ?? ()
No symbol table info available.
#7  0x000055555555e0b3 in ?? ()
No symbol table info available.
#8  0x00007ffff77b4565 in __libc_start_main (main=0x55555555de60, argc=1, argv=0x7fffffffdd28, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd18) at ../csu/libc-start.c:332
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {93824993094768, 8704678170830302187, 93824992274048, 0, 0, 0, 
                -8704678169867719701, -8704661638783177749}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x1, 0x7fffffffdd28}, 
            data = {prev = 0x0, cleanup = 0x0, canceltype = 1}}}
        not_first_call = <optimized out>
#9  0x000055555555e6ae in ?? ()
No symbol table info available.

(gdb) thread apply all bt full

Thread 1 (Thread 0x7ffff7560740 (LWP 263758) "vkdt"):
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
        set = {__val = {0 <repeats 16 times>}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x00007ffff77b2864 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff7815736 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff793a953 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
        ap = {{gp_offset = 24, fp_offset = 0, overflow_arg_area = 0x7fffffffc1b0, reg_save_area = 0x7fffffffc140}}
        fd = <optimized out>
        list = <optimized out>
        nlist = <optimized out>
        cp = <optimized out>
#3  0x00007ffff78b43fa in __GI___fortify_fail (msg=msg@entry=0x7ffff793a8f9 "buffer overflow detected") at fortify_fail.c:26
No locals.
#4  0x00007ffff78b2c96 in __GI___chk_fail () at chk_fail.c:28
No locals.
#5  0x00007ffff78b3268 in __realpath_chk (buf=<optimized out>, resolved=<optimized out>, resolvedlen=<optimized out>) at realpath_chk.c:29
No locals.
#6  0x0000555555608c7b in ?? ()
No symbol table info available.
#7  0x000055555555e0b3 in ?? ()
No symbol table info available.
#8  0x00007ffff77b4565 in __libc_start_main (main=0x55555555de60, argc=1, argv=0x7fffffffdd28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd18) at ../csu/libc-start.c:332
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {93824993094768, 8704678170830302187, 93824992274048, 0, 0, 0, -8704678169867719701, -8704661638783177749}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x1, 0x7fffffffdd28}, data = {prev = 0x0, cleanup = 0x0, canceltype = 1}}}
        not_first_call = <optimized out>
#9  0x000055555555e6ae in ?? ()
No symbol table info available.

FIx is working. Thanks.

Hi,

first of all, thank you for the interesting project.

I installed vkdt (vkdt_0~git1639162520.473484b-0_amd64.deb) , but it doesn’t run on my Ubuntu Studio 21.10.
The Terminal says,

*** buffer overflow detected ***: terminated
Aborted (core dumped)

Can you fix it?

How are you trying to start vkdt? What kind of files are you tryint to open?
What kind of hardware/driver are you using?

thanks, i think that helps… i blindly “fixed” something that may or may not be related to your issue. it seems realpath on ubuntu has some slightly different semantics than it has here. new packages should be on the way, let me know if that changed anything at all (if not i’ll poke around some more).

please see above.

simply through the terminal
$ vkdt

My system is…
Operating System: Ubuntu Studio 21.10
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-19-lowlatency (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 2600 Six-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1660 SUPER/PCIe/SSE2

i was referring to the package with debug symbols, (on the 21.04 page)[https://build.opensuse.org/package/binaries/graphics:darktable:master/vkdt/xUbuntu_21.04] the one that’s called vkdt-dbgsym_0~git1639162520.473484b-0_amd64.ddeb. but i haven’t tried whether that actually works. it would replace a few ??? by actual function names in your gdb trace.

That’s strange. I have the same video card. Some days ago I compiled vkdt successfully on Lubuntu 21.10. I could even check the deb since I should still have that system on a pendrive.

have you tried to start vkdt like this:

vkdt /directory/that/contains/photos/

or

vkdt /directory/that/contains/photos/rawfile.raw

… also i just pushed another thing that may address some ubuntu issues. it seems they just always call __realpath_chk which requires PATH_MAX bytes whether it’s necessary or not. i don’t have any means to reproduce/test it though.

Got that one yesterday as well, didnt report as I didnt know what triggered it !
This was before the fix for pick 01 you did yesterday.
Will attempt again on my side.

Edit:

  • cannot reproduce again, vkdt does not crash anymore with the B&W pics folder I used y’day … maybe it’s a side benefit of another fix
  • I am on Ubuntu 21.10 and I don’t use a .deb, I compile vkdt myself

Thanks

Anyway, I can confirm, the Ubuntu 21.10 package is broken. Just tested on Lubuntu 21.10, I get the same buffer overflow output as @shinoryo

… but is that vkdt_0~git1639222333.6f231d5-0_amd64.deb, i.e. the most recent one that just finished building a couple minutes ago?