Code Monkey home page Code Monkey logo

duc's Introduction

Build Status Conda Version

Duc is a collection of tools for indexing, inspecting and visualizing disk usage. Duc maintains a database of accumulated sizes of directories of the file system, and allows you to query this database with some tools, or create fancy graphs showing you where your bytes are.

Check the Duc homepage for more information, documentation and news.

duc gui

duc's People

Contributors

baierjan avatar bkmgit avatar cinek810 avatar daduke avatar edospadoni avatar fuzzykiller avatar ghuls avatar gsanchietti avatar jbd avatar jwilk avatar l8gravely avatar mortenf avatar moskvax avatar np-hardass avatar piegamesde avatar rhpvorderman avatar rn-jlazic avatar simons-public avatar tretter avatar tzrlk avatar zevv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

duc's Issues

Problems building…

Hi, sorry to post this as a bug, but I couln't find any other forum.

I'm trying to build on Ubuntu, but already autoreconf fails. Every other time it is:

 $ autoreconf --install
configure.ac:39: warning: macro 'AM_DISABLE_STATIC' not found in library
configure.ac:40: warning: macro 'AM_PROG_LIBTOOL' not found in library
configure.ac:26: installing './compile'
configure.ac:23: installing './install-sh'
configure.ac:23: installing './missing'
lib/Makefile.am:3: error: Libtool library used but 'LIBTOOL' is undefined
lib/Makefile.am:3:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
lib/Makefile.am:3:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
lib/Makefile.am:3:   If 'LT_INIT' is in 'configure.ac', make sure
lib/Makefile.am:3:   its definition is in aclocal's search path.
autoreconf: automake failed with exit status: 1

and every other time it is:

$ autoreconf --install
configure.ac:39: warning: macro 'AM_DISABLE_STATIC' not found in library
configure.ac:40: warning: macro 'AM_PROG_LIBTOOL' not found in library
configure.ac:36: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:39: error: possibly undefined macro: AM_DISABLE_STATIC
configure.ac:40: error: possibly undefined macro: AM_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1

make failing on centos 6.5

I've run:

autoreconf --install
./configure
make

which fails. Here's the output:

Making all in duc
make[2]: Entering directory `/usr/src/duc/duc'
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I../lib -Wall -Werror -c graph.c
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I../lib -Wall -Werror -c index.c
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I../lib -Wall -Werror -c ls.c
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I../lib -Wall -Werror -c main.c
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I../lib -Wall -Werror -c info.c
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I../lib -Wall -Werror -c cgi.c
cc1: warnings being treated as errors
cgi.c: In function ‘cgi_main’:
cgi.c:329: error: implicit declaration of function ‘duc_pick_db_path’
cgi.c:329: error: assignment makes pointer from integer without a cast
make[2]: *** [cgi.o] Error 1
make[2]: Leaving directory `/usr/src/duc/duc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/duc'
make: *** [all] Error 2

Bus error

I'm running duc on a volume with 3.2T of data, and loads of files, and it eventually crashes with the message "Bus error".

Right before this I see the message "Skipping lost+found: Permission denied" but that might be a red-herring.

duc gui: extended arguments from commandline

feature request

it would be useful to have a way to pass all graphical options (eg, fuzzying, maxlevels, etc.) to the gui

  • either pass options from an environment variable as in DUCGUI="-some option --someother option"
  • or from the command line

PS.
I love the tool; I was actually using philesight some time ago, but I have to say duc improvements in usuability, speed and index size are impressive: keep on rocking!

Duc gui uses cwd() as default path

Stuart writes:

I find the use of CWD as the default path for the gui command to
be counter intuitive, especially for the case where the database only
contains a single directory that is other than CWD. How about making
the default gui path be first path in the database?

Handle global options

Some options are shared by all binaries, and should ideally be handled by libduc itself.

Plan is to change duc_new to accept pointers to argc and argv so it can scan the command line and parse options it understands.

int main(int argc, char **argv)
{
   duct *duc = duc_new(&argc, &argv);

   ...
}

Typical global options would be --database, --verbose, --quiet

Query multiple databases which indexed a different directory without specifying -d databasefilename on the commandline

I wrote a bash function to allow querying multiple databases (which indexed a different directory (actually fileserver)) to avoid the need to specify -d databasename on the command line.

It would be nice if duc would support something like this in the future by default.

Usage:
  # This will use the '/media/srv-01/duc/db/srv-01.duc.db' database.
  duce ls /media/srv-01

  # This will use the '/media/srv-03/duc/db/srv-03.duc.db' database.
  duce ls /media/srv-03/some/path

  # This will use the '/media/srv-03/duc/db/srv-03-more-often.duc.db' database.
  duce ls /media/srv-03/path/that/gets/indexed/more/often/something

Add this script to your .bashrc:

# Enhanced duc function (a better name is welcome).
duce () {
    # Link indexed paths with database filenames.
    local -A pathname_to_db_array;

    # START: Adapt the paths to your configuration.
    pathname_to_db_array['/media/srv-01']='/media/srv-01/duc/db/srv-01.duc.db';
    pathname_to_db_array['/media/srv-02']='/media/srv-02/duc/db/srv-02.duc.db';
    pathname_to_db_array['/media/srv-03']='/media/srv-03/duc/db/srv-03.duc.db';
    pathname_to_db_array['/media/srv-03/path/that/gets/indexed/more/often']='/media/srv-03/duc/db/srv-03-more-often.duc.db';
    # END: Adapt the paths to your configuration.

    if [ ${#@} -ge 1 ] ; then
        local command="${1}";

        local -i parse_path=0;

        case "${command}" in
            help)  duc ${@};
                   return $?;;
            info)  duc ${@};
                   return $?;;
            index) duc ${@};
                   return $?;;
            gui)   parse_path=1;;
            ls)    parse_path=1;;
            graph) parse_path=1;;
            xml)   parse_path=1;;
            *)     duc help;
                   return $?;
        esac

        if [ ${parse_path} -eq 1 ] ; then
            local arg='';
            local path='';
            local absolute_path='';
            local pathname_key='';
            local suffix_path='';
            local -i length_suffix_path=999999999;
            local db_filename='';

            for arg in ${@:2} ; do
                # Last variable can be the path, so save it.
                path=${arg};
            done;

            if [ ! -e "${path}" ] ; then
                # If the last variable is not a path, or does not exist,
                # use the current working directory.
                path="${PWD}";
            fi

            # Get absolute path.
            absolute_path=$(realpath -s "${path}");

            # Check if the absolute path starts with one of the paths used as keys in the pathname_to_db_array.
            for pathname_key in "${!pathname_to_db_array[@]}" ; do
                suffix_path="${absolute_path#"${pathname_key}"}";

                if [ "${suffix_path}" != "${absolute_path}" ] ; then
                    # Take the key value of pathname_to_db array that has the longest match with the absolute path name.
                    if [ ${length_suffix_path} -gt ${#suffix_path} ] ; then
                        length_suffix_path=${#suffix_path};
                        db_filename="${pathname_to_db_array["${pathname_key}"]}";
                    fi
                fi
            done

            if [ -z "${db_filename}" ] ; then
                # If the database filename was empty, the absolute path did not start with any of the pathnames in pathname_to_db_array. 
                duc ${@};
                return $?;
            elif [ -f "${db_filename}" ] ; then
                # The best database for the provided path was found.
                duc ${command} -d "${db_filename}" "${@:2}";
                return $?;
            else
                printf 'Error: database filename "%s" does not exist.\n' "${db_filename}" > /dev/stderr;
                return 1;
            fi
        fi
    else
        # Display help when no arguments are given.
        duc help;
        return $?;
    fi
}

Enhancement: allow keeping symlink name as root directory

It would be useful in my case that duc doesn't resolve symlinks of the root index directory.

# Index directory which is a symlink.
#  /media/my_symlink_dir points to /media/data.
duc index /media/my_symlink_dir

The duc database will display /media/data as root dir.

At least in the commandline version of realpath, you can do the following:

$ realpath /media/my_symlink_dir
/media/data

$ realpath -s /media/my_symlink_dir
/media/my_symlink_dir

$ realpath -s /./media/../media/my_symlink_dir
/media/my_symlink_dir

I have /media/data directories on different NFS servers, which I want to index locally, but I want the path names that are visible start with /media/server_name instead of /media/data (I know this /media/server_name already works when you have the symlink, but it is not displayed).

Unable to view subfolders on some mounts

nsteicke@media ~ $ rm .duc.db
nsteicke@media ~ $ duc index -v /store/
Writing to database "/home/nsteicke/.duc.db"
Skipping titan.a.e_2000: Permission denied
Skipping _UNPACK_Dredd.2012.1080p.BluRay.x264-SPARKS: Permission denied
Skipping kikis.delivery.service_1989: Permission denied
Skipping howls.moving.castle_2004: Permission denied
Indexed 44252 files and 1568 directories, (9.7TB total) in 0.09 secs.
nsteicke@media ~ $ duc
duc duc.debug
nsteicke@media ~ $ duc gui
Path /home/nsteicke not found in database
Requested path not found
nsteicke@media ~ $ duc gui /store/
ERROR: Could not open display
nsteicke@media ~ $ duc ls /store/
9.5T video
85.1G Game of Thrones
48.1G temp
20.0G Thief
9.2G books
4.3G Audio
1010.5M proxmox
592.4M FreeLancer
222.0M template
222.0M debian-7.6.0-amd64-netinst.iso
1.6M avcon2013.tar.bz2
427 advancedsettings.xml
212 backward.sh
204 benchmark.sh
0 virtuals
0 dump
nsteicke@media ~ $ duc ls /store/video/
Key 7fff00000001/0 not found in database
Requested path not found

Per user filtering

At work I have to monitor files that differ on a per-user basis, so it would be nice to produce graphs that are limited to a single user and / or use the data to produce a graph that showed the percentage of the disk space used by a specific user. This way I could send users graphs of the disk usage limited to their user.

The basic use case is I want to have a cron job that sends out an e-mail to each user telling them how much disk they are using as a percentage in a pie chart with all users listed, and below that another graph that shows them where their specific user's disk usage is concentrated in, which is a normal duc graph filtered for their user. The user could tell from the first graph whether they needed to take action, then from the second graph they could figure out where big files were if they wanted to delete them.

Shared libraries not found after installing

Running sudo make install is not enough to be able to run duc afterwards:

$ ./configure
...

$ make
...

$ sudo make install
Making install in lib
make[1]: Entering directory `/software/duc/duc-git/lib'
make[2]: Entering directory `/software/duc/duc-git/lib'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libduc.la libduc-graph.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libduc.so.1.0.0 /usr/local/lib/libduc.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libduc.so.1.0.0 libduc.so.1 || { rm -f libduc.so.1 && ln -s libduc.so.1.0.0 libduc.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libduc.so.1.0.0 libduc.so || { rm -f libduc.so && ln -s libduc.so.1.0.0 libduc.so; }; })
libtool: install: /usr/bin/install -c .libs/libduc.lai /usr/local/lib/libduc.la
libtool: install: /usr/bin/install -c .libs/libduc-graph.so.1.0.0 /usr/local/lib/libduc-graph.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libduc-graph.so.1.0.0 libduc-graph.so.1 || { rm -f libduc-graph.so.1 && ln -s libduc-graph.so.1.0.0 libduc-graph.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libduc-graph.so.1.0.0 libduc-graph.so || { rm -f libduc-graph.so && ln -s libduc-graph.so.1.0.0 libduc-graph.so; }; })
libtool: install: /usr/bin/install -c .libs/libduc-graph.lai /usr/local/lib/libduc-graph.la
libtool: install: /usr/bin/install -c .libs/libduc.a /usr/local/lib/libduc.a
libtool: install: chmod 644 /usr/local/lib/libduc.a
libtool: install: ranlib /usr/local/lib/libduc.a
libtool: install: /usr/bin/install -c .libs/libduc-graph.a /usr/local/lib/libduc-graph.a
libtool: install: chmod 644 /usr/local/lib/libduc-graph.a
libtool: install: ranlib /usr/local/lib/libduc-graph.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/software/duc/duc-git/lib'
make[1]: Leaving directory `/software/duc/duc-git/lib'
Making install in duc
make[1]: Entering directory `/software/duc/duc-git/duc'
make[2]: Entering directory `/software/duc/duc-git/duc'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
  /bin/sh ../libtool   --mode=install /usr/bin/install -c duc duc.debug '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/duc /usr/local/bin/duc
libtool: install: /usr/bin/install -c duc.debug /usr/local/bin/duc.debug
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/software/duc/duc-git/duc'
make[1]: Leaving directory `/software/duc/duc-git/duc'
make[1]: Entering directory `/software/duc/duc-git'
make[2]: Entering directory `/software/duc/duc-git'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/software/duc/duc-git'
make[1]: Leaving directory `/software/duc/duc-git'

$ duc
duc: error while loading shared libraries: libduc.so.1: cannot open shared object file: No such file or directory

$ sudo ldconfig

$ duc
usage: duc <cmd> [options] [args]

Available cmds:
  help      : Show help
  info      : Dump database info
  index     : Index filesystem
  gui       : Graphical interface
  ls        : List directory
  graph     : Draw graph
  xml       : Dump XML output
  cgi       : CGI interface

So the sudo ldconfig command might be worth to add to the Makefile or the README (not sure what is the most correct way of doing this).

Do we need -skip option? To semi-match the -x one filesystem option?

When scanning Netapp NFS filesystems, we want to make sure we don't descend into .snapshot directories, since they aren't useful to track at all, and can give horrible DB size and performance issues.

Doing a scan now to see if -x works to skip them or not already... more when I know more.
John

Should 'duc index' force over-writing of existing DB or not?

I've just pushed a new branch, force_index which updates the index command to have a -f option (or --force) so that when you try to index using a corrupted DB (or out of version) it will pass in the BDBOTRUNC mode flag to tokyocabinet. Didn't touch sqlite stuff.

This could be merged in easily to master, but I wanted to double check my thinking here. Doing this by default would be bad when you just have a version mis-match of the DB, but ok if it's corrupt. Like when I tried to open an old philesight DB. So making the user force the overright seems like the only sane default.

AT_NO_AUTOMOUNT invalid prior to Linux 2.6.38

duc built against commit dbf7154 on Debian 6.0.9 (squeeze). Works fine on my Debian 7.5 (wheezy) box.

% duc index /data/test
Error statting foo: Invalid argument
Error statting bar: Invalid argument
Error statting baz: Invalid argument

"test" contains only the three files.

From strace:

newfstatat(4, "foo", 0x7fff0e412cd0, AT_SYMLINK_NOFOLLOW|0x800) = -1 EINVAL (Invalid argument)

Testing shows that AT_NO_AUTOMOUNT (the 0x800 value) is not recognized here, even though it's defined in bits/fcntl.h. The manpage for fstatat() confirms this... on squeeze it lists AT_SYMLINK_NOFOLLOW as the only valid option, while on wheezy, it lists both of these as valid and notes that AT_NO_AUTOMOUNT is only available since Linux 2.6.38. squeeze is running 2.6.32.

If I knew how to test for this, I'd write you a patch, but I've never had to write portable C and I'm into territory I don't have time to learn right now.

make error

Hi,

when I try to make duc I get this error:

make
make all-recursive
make[1]: Entering directory /tmp/duc-master' Making all in lib make[2]: Entering directory/tmp/duc-master/lib'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c -o libduc_la-duc.lo test -f 'duc.c' || echo './'duc.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c duc.c -fPIC -DPIC -o .libs/libduc_la-duc.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c duc.c -o libduc_la-duc.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c -o libduc_la-index.lo test -f 'index.c' || echo './'index.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c index.c -fPIC -DPIC -o .libs/libduc_la-index.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c index.c -o libduc_la-index.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c -o libduc_la-dir.lo test -f 'dir.c' || echo './'dir.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -c dir.c -fPIC -DPIC -o .libs/libduc_la-dir.o
cc1: warnings being treated as errors
dir.c: In function ‘duc_dir_limit’:
dir.c:130: error: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘off_t’
make[2]: *** [libduc_la-dir.lo] Fehler 1
make[2]: Leaving directory /tmp/duc-master/lib' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory/tmp/duc-master'
make: *** [all] Fehler 2

Are there any hints for a solution ?

Best regards

Martin

Certain directories can not be listed

For a certain directory, I can't list the subdirectories (Requested path not found)

$ duc ls -d /tmp/duc/db/lcb1.duc.db /media/data2/lcb/archives/
Reading /tmp/duc/db/lcb1.duc.db
 16.1T i-cisTarget-webserver
230.8G DME-MAC-0026.sparsebundle
 16.6G cisTargetX2-webserver
  6.1G backup_esat
  1.4G cisTargetX-webserver-LNG
  6.0K .DS_Store
  4.0K ._.DS_Store

$ duc ls -d /tmp/duc/db/lcb1.duc.db /media/data2/lcb/archives/i-cisTarget-webserver/
Reading /tmp/duc/db/lcb1.duc.db
Requested path not found

$ duc ls -d /tmp/duc/db/lcb1.duc.db /media/data2/lcb/archives/DME-MAC-0026.sparsebundle/
Reading /tmp/duc/db/lcb1.duc.db
Requested path not found

$ duc ls -d /tmp/duc/db/lcb1.duc.db /media/data2/lcb/archives/cisTargetX2-webserver/
Reading /tmp/duc/db/lcb1.duc.db
Requested path not found

$ duc ls -d /tmp/duc/db/lcb1.duc.db /media/data2/lcb/archives/backup_esat/
Reading /tmp/duc/db/lcb1.duc.db
Requested path not found

$ duc ls -d /tmp/duc/db/lcb1.duc.db /media/data2/lcb/archives/cisTargetX-webserver-LNG/

I discovered this problem by using the CGI interface.

In the plot of the /media/data2/lcb/archives/ directory, it shows the name of i-cisTarget-webserver and a subdirectory of it properly, but when I click on this directory, I get a segfault:

[Tue Jun 03 16:42:35 2014] [error] [client 10.35.70.124] Premature end of script headers: duc-lcb1.cgi
*** glibc detected *** /usr/local/bin/duc: free(): invalid pointer: 0x00007f3a6851d988 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f3a681e2b96]
/usr/local/lib/libduc.so.1(duc_dir_close+0x29)[0x7f3a69148df8]
/usr/local/bin/duc[0x403feb]
/usr/local/bin/duc[0x4030ed]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f3a6818576d]
/usr/local/bin/duc[0x401fb9]
======= Memory map: ========
00400000-00407000 r-xp 00000000 fc:01 10094046                           /usr/local/bin/duc
00606000-00607000 r--p 00006000 fc:01 10094046                           /usr/local/bin/duc
00607000-00608000 rw-p 00007000 fc:01 10094046                           /usr/local/bin/duc
021c5000-021ff000 rw-p 00000000 00:00 0                                  [heap]
7f3a64994000-7f3a649a9000 r-xp 00000000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3a649a9000-7f3a64ba8000 ---p 00015000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3a64ba8000-7f3a64ba9000 r--p 00014000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3a64ba9000-7f3a64baa000 rw-p 00015000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3a64baa000-7f3a64baf000 r-xp 00000000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f3a64baf000-7f3a64dae000 ---p 00005000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f3a64dae000-7f3a64daf000 r--p 00004000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f3a64daf000-7f3a64db0000 rw-p 00005000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f3a64db0000-7f3a64db2000 r-xp 00000000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f3a64db2000-7f3a64fb1000 ---p 00002000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f3a64fb1000-7f3a64fb2000 r--p 00001000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f3a64fb2000-7f3a64fb3000 rw-p 00002000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f3a64fb3000-7f3a64fda000 r-xp 00000000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f3a64fda000-7f3a651da000 ---p 00027000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f3a651da000-7f3a651dc000 r--p 00027000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f3a651dc000-7f3a651dd000 rw-p 00029000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f3a651dd000-7f3a651e4000 r-xp 00000000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f3a651e4000-7f3a653e3000 ---p 00007000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f3a653e3000-7f3a653e4000 r--p 00006000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f3a653e4000-7f3a653e5000 rw-p 00007000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f3a653e5000-7f3a65421000 r-xp 00000000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f3a65421000-7f3a65620000 ---p 0003c000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f3a65620000-7f3a65621000 r--p 0003b000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f3a65621000-7f3a65622000 rw-p 0003c000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f3a65622000-7f3a65629000 r-xp 00000000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f3a65629000-7f3a65828000 ---p 00007000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f3a65828000-7f3a65829000 r--p 00006000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f3a65829000-7f3a6582a000 rw-p 00007000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f3a6582a000-7f3a6582d000 r-xp 00000000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f3a6582d000-7f3a65a2c000 ---p 00003000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f3a65a2c000-7f3a65a2d000 r--p 00002000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f3a65a2d000-7f3a65a2e000 rw-p 00003000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f3a65a2e000-7f3a65a3d000 r-xp 00000000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f3a65a3d000-7f3a65c3c000 ---p 0000f000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f3a65c3c000-7f3a65c3d000 r--p 0000e000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f3a65c3d000-7f3a65c3e000 rw-p 0000f000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f3a65c3e000-7f3a65c40000 r-xp 00000000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f3a65c40000-7f3a65e40000 ---p 00002000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f3a65e40000-7f3a65e41000 r--p 00002000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f3a65e41000-7f3a65e42000 rw-p 00003000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f3a65e42000-7f3a65e58000 r-xp 00000000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f3a65e58000-7f3a66057000 ---p 00016000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f3a66057000-7f3a66058000 r--p 00015000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f3a66058000-7f3a66059000 rw-p 00016000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f3a66059000-7f3a66062000 r-xp 00000000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f3a66062000-7f3a66261000 ---p 00009000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f3a66261000-7f3a66262000 r--p 00008000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f3a66262000-7f3a66263000 rw-p 00009000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f3a66263000-7f3a66280000 r-xp 00000000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f3a66280000-7f3a6647f000 ---p 0001d000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f3a6647f000-7f3a66480000 r--p 0001c000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f3a66480000-7f3a66481000 rw-p 0001d000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f3a66481000-7f3a66489000 r-xp 00000000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f3a66489000-7f3a66689000 ---p 00008000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f3a66689000-7f3a6668a000 r--p 00008000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f3a6668a000-7f3a6668b000 rw-p 00009000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f3a6668b000-7f3a6668d000 r-xp 00000000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f3a6668d000-7f3a6688c000 ---p 00002000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f3a6688c000-7f3a6688d000 r--p 00001000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f3a6688d000-7f3a6688e000 rw-p 00002000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f3a6688e000-7f3a668b4000 r-xp 00000000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f3a668b4000-7f3a66ab4000 ---p 00026000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f3a66ab4000-7f3a66ab5000 r--p 00026000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f3a66ab5000-7f3a66ab6000 rw-p 00027000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f3a66ab6000-7f3a66b46000 r-xp 00000000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f3a66b46000-7f3a66d45000 ---p 00090000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f3a66d45000-7f3a66d4c000 r--p 0008f000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f3a66d4c000-7f3a66d4d000 rw-p 00096000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f3a66d4d000-7f3a66d81000 r-xp 00000000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f3a66d81000-7f3a66f81000 ---p 00034000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f3a66f81000-7f3a66f82000 r--p 00034000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f3a66f82000-7f3a66f83000 rw-p 00035000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f3a66f83000-7f3a67019000 r-xp 00000000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f3a67019000-7f3a67218000 ---p 00096000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f3a67218000-7f3a6721e000 r--p 00095000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f3a6721e000-7f3a6721f000 rw-p 0009b000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f3a6721f000-7f3a67248000 r-xp 00000000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f3a67248000-7f3a67447000 ---p 00029000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f3a67447000-7f3a67448000 r--p 00028000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f3a67448000-7f3a67449000 rw-p 00029000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f3a67449000-7f3a6753b000 r-xp 00000000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f3a6753b000-7f3a6773b000 ---p 000f2000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f3a6773b000-7f3a6773c000 r--p 000f2000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f3a6773c000-7f3a6773d000 rw-p 000f3000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f3a6773d000-7f3a6773e000 rw-p 00000000 00:00 0 
7f3a6773e000-7f3a6778b000 r-xp 00000000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f3a6778b000-7f3a6798b000 ---p 0004d000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f3a6798b000-7f3a6798c000 r--p 0004d000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f3a6798c000-7f3a6798d000 rw-p 0004e000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f3a6798d000-7f3a679d3000 r-xp 00000000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f3a679d3000-7f3a67bd3000 ---p 00046000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f3a67bd3000-7f3a67bd5000 r--p 00046000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f3a67bd5000-7f3a67bd6000 rw-p 00048000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f3a67bd6000-7f3a67cd1000 r-xp 00000000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f3a67cd1000-7f3a67ed0000 ---p 000fb000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f3a67ed0000-7f3a67ed1000 r--p 000fa000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f3a67ed1000-7f3a67ed2000 rw-p 000fb000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f3a67ed2000-7f3a67f62000 r-xp 00000000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f3a67f62000-7f3a68161000 ---p 00090000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f3a68161000-7f3a68162000 r--p 0008f000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f3a68162000-7f3a68164000 rw-p 00090000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f3a68164000-7f3a68319000 r-xp 00000000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f3a68319000-7f3a68519000 ---p 001b5000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f3a68519000-7f3a6851d000 r--p 001b5000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f3a6851d000-7f3a6851f000 rw-p 001b9000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f3a6851f000-7f3a68524000 rw-p 00000000 00:00 0 
7f3a68524000-7f3a6853c000 r-xp 00000000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f3a6853c000-7f3a6873b000 ---p 00018000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f3a6873b000-7f3a6873c000 r--p 00017000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f3a6873c000-7f3a6873d000 rw-p 00018000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f3a6873d000-7f3a68741000 rw-p 00000000 00:00 0 
7f3a68741000-7f3a68871000 r-xp 00000000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f3a68871000-7f3a68a71000 ---p 00130000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f3a68a71000-7f3a68a72000 r--p 00130000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f3a68a72000-7f3a68a76000 rw-p 00131000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f3a68a76000-7f3a68b2f000 r-xp 00000000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f3a68b2f000-7f3a68d2e000 ---p 000b9000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f3a68d2e000-7f3a68d30000 r--p 000b8000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f3a68d30000-7f3a68d31000 rw-p 000ba000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f3a68d31000-7f3a68d34000 rw-p 00000000 00:00 0 
7f3a68d34000-7f3a68d3f000 r-xp 00000000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f3a68d3f000-7f3a68f3e000 ---p 0000b000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f3a68f3e000-7f3a68f3f000 r--p 0000a000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f3a68f3f000-7f3a68f40000 rw-p 0000b000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f3a68f40000-7f3a68f44000 r-xp 00000000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f3a68f44000-7f3a69143000 ---p 00004000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f3a69143000-7f3a69144000 r--p 00003000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f3a69144000-7f3a69145000 rw-p 00004000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f3a69145000-7f3a6914c000 r-xp 00000000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f3a6914c000-7f3a6934b000 ---p 00007000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f3a6934b000-7f3a6934c000 r--p 00006000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f3a6934c000-7f3a6934d000 rw-p 00007000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f3a6934d000-7f3a6936f000 r-xp 00000000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7f3a6952e000-7f3a69530000 rw-p 00000000 00:00 0 
7f3a69530000-7f3a69551000 r--s 00000000 fc:01 1310767                    /tmp/duc/db/lcb1.duc.db
7f3a69551000-7f3a6955f000 rw-p 00000000 00:00 0 
7f3a6956d000-7f3a6956f000 rw-p 00000000 00:00 0 
7f3a6956f000-7f3a69570000 r--p 00022000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7f3a69570000-7f3a69572000 rw-p 00023000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7fff7169c000-7fff716bd000 rw-p 00000000 00:00 0                          [stack]
7fff716cb000-7fff716cc000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
/usr/lib/cgi-bin/duc-lcb1.cgi: line 10:  9389 Aborted                 (core dumped) /usr/local/bin/duc cgi -d "${database_dir}/${share_name}.duc.db"
*** glibc detected *** /usr/local/bin/duc: double free or corruption (!prev): 0x0000000001b69790 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7fe3016cbb96]
/usr/local/lib/libduc.so.1(duc_dir_close+0x29)[0x7fe302631df8]
/usr/local/bin/duc[0x403feb]
/usr/local/bin/duc[0x4030ed]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fe30166e76d]
/usr/local/bin/duc[0x401fb9]
======= Memory map: ========
00400000-00407000 r-xp 00000000 fc:01 10094046                           /usr/local/bin/duc
00606000-00607000 r--p 00006000 fc:01 10094046                           /usr/local/bin/duc
00607000-00608000 rw-p 00007000 fc:01 10094046                           /usr/local/bin/duc
01b4c000-01da3000 rw-p 00000000 00:00 0                                  [heap]
7fe2fde7d000-7fe2fde92000 r-xp 00000000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fe2fde92000-7fe2fe091000 ---p 00015000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fe2fe091000-7fe2fe092000 r--p 00014000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fe2fe092000-7fe2fe093000 rw-p 00015000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fe2fe093000-7fe2fe098000 r-xp 00000000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7fe2fe098000-7fe2fe297000 ---p 00005000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7fe2fe297000-7fe2fe298000 r--p 00004000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7fe2fe298000-7fe2fe299000 rw-p 00005000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7fe2fe299000-7fe2fe29b000 r-xp 00000000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7fe2fe29b000-7fe2fe49a000 ---p 00002000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7fe2fe49a000-7fe2fe49b000 r--p 00001000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7fe2fe49b000-7fe2fe49c000 rw-p 00002000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7fe2fe49c000-7fe2fe4c3000 r-xp 00000000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7fe2fe4c3000-7fe2fe6c3000 ---p 00027000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7fe2fe6c3000-7fe2fe6c5000 r--p 00027000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7fe2fe6c5000-7fe2fe6c6000 rw-p 00029000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7fe2fe6c6000-7fe2fe6cd000 r-xp 00000000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7fe2fe6cd000-7fe2fe8cc000 ---p 00007000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7fe2fe8cc000-7fe2fe8cd000 r--p 00006000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7fe2fe8cd000-7fe2fe8ce000 rw-p 00007000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7fe2fe8ce000-7fe2fe90a000 r-xp 00000000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7fe2fe90a000-7fe2feb09000 ---p 0003c000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7fe2feb09000-7fe2feb0a000 r--p 0003b000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7fe2feb0a000-7fe2feb0b000 rw-p 0003c000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7fe2feb0b000-7fe2feb12000 r-xp 00000000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7fe2feb12000-7fe2fed11000 ---p 00007000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7fe2fed11000-7fe2fed12000 r--p 00006000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7fe2fed12000-7fe2fed13000 rw-p 00007000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7fe2fed13000-7fe2fed16000 r-xp 00000000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7fe2fed16000-7fe2fef15000 ---p 00003000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7fe2fef15000-7fe2fef16000 r--p 00002000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7fe2fef16000-7fe2fef17000 rw-p 00003000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7fe2fef17000-7fe2fef26000 r-xp 00000000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7fe2fef26000-7fe2ff125000 ---p 0000f000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7fe2ff125000-7fe2ff126000 r--p 0000e000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7fe2ff126000-7fe2ff127000 rw-p 0000f000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7fe2ff127000-7fe2ff129000 r-xp 00000000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7fe2ff129000-7fe2ff329000 ---p 00002000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7fe2ff329000-7fe2ff32a000 r--p 00002000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7fe2ff32a000-7fe2ff32b000 rw-p 00003000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7fe2ff32b000-7fe2ff341000 r-xp 00000000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fe2ff341000-7fe2ff540000 ---p 00016000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fe2ff540000-7fe2ff541000 r--p 00015000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fe2ff541000-7fe2ff542000 rw-p 00016000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fe2ff542000-7fe2ff54b000 r-xp 00000000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7fe2ff54b000-7fe2ff74a000 ---p 00009000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7fe2ff74a000-7fe2ff74b000 r--p 00008000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7fe2ff74b000-7fe2ff74c000 rw-p 00009000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7fe2ff74c000-7fe2ff769000 r-xp 00000000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7fe2ff769000-7fe2ff968000 ---p 0001d000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7fe2ff968000-7fe2ff969000 r--p 0001c000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7fe2ff969000-7fe2ff96a000 rw-p 0001d000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7fe2ff96a000-7fe2ff972000 r-xp 00000000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7fe2ff972000-7fe2ffb72000 ---p 00008000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7fe2ffb72000-7fe2ffb73000 r--p 00008000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7fe2ffb73000-7fe2ffb74000 rw-p 00009000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7fe2ffb74000-7fe2ffb76000 r-xp 00000000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7fe2ffb76000-7fe2ffd75000 ---p 00002000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7fe2ffd75000-7fe2ffd76000 r--p 00001000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7fe2ffd76000-7fe2ffd77000 rw-p 00002000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7fe2ffd77000-7fe2ffd9d000 r-xp 00000000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7fe2ffd9d000-7fe2fff9d000 ---p 00026000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7fe2fff9d000-7fe2fff9e000 r--p 00026000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7fe2fff9e000-7fe2fff9f000 rw-p 00027000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7fe2fff9f000-7fe30002f000 r-xp 00000000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7fe30002f000-7fe30022e000 ---p 00090000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7fe30022e000-7fe300235000 r--p 0008f000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7fe300235000-7fe300236000 rw-p 00096000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7fe300236000-7fe30026a000 r-xp 00000000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7fe30026a000-7fe30046a000 ---p 00034000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7fe30046a000-7fe30046b000 r--p 00034000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7fe30046b000-7fe30046c000 rw-p 00035000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7fe30046c000-7fe300502000 r-xp 00000000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7fe300502000-7fe300701000 ---p 00096000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7fe300701000-7fe300707000 r--p 00095000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7fe300707000-7fe300708000 rw-p 0009b000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7fe300708000-7fe300731000 r-xp 00000000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7fe300731000-7fe300930000 ---p 00029000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7fe300930000-7fe300931000 r--p 00028000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7fe300931000-7fe300932000 rw-p 00029000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7fe300932000-7fe300a24000 r-xp 00000000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7fe300a24000-7fe300c24000 ---p 000f2000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7fe300c24000-7fe300c25000 r--p 000f2000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7fe300c25000-7fe300c26000 rw-p 000f3000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7fe300c26000-7fe300c27000 rw-p 00000000 00:00 0 
7fe300c27000-7fe300c74000 r-xp 00000000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7fe300c74000-7fe300e74000 ---p 0004d000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7fe300e74000-7fe300e75000 r--p 0004d000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7fe300e75000-7fe300e76000 rw-p 0004e000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7fe300e76000-7fe300ebc000 r-xp 00000000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7fe300ebc000-7fe3010bc000 ---p 00046000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7fe3010bc000-7fe3010be000 r--p 00046000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7fe3010be000-7fe3010bf000 rw-p 00048000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7fe3010bf000-7fe3011ba000 r-xp 00000000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7fe3011ba000-7fe3013b9000 ---p 000fb000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7fe3013b9000-7fe3013ba000 r--p 000fa000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7fe3013ba000-7fe3013bb000 rw-p 000fb000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7fe3013bb000-7fe30144b000 r-xp 00000000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7fe30144b000-7fe30164a000 ---p 00090000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7fe30164a000-7fe30164b000 r--p 0008f000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7fe30164b000-7fe30164d000 rw-p 00090000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7fe30164d000-7fe301802000 r-xp 00000000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7fe301802000-7fe301a02000 ---p 001b5000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7fe301a02000-7fe301a06000 r--p 001b5000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7fe301a06000-7fe301a08000 rw-p 001b9000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7fe301a08000-7fe301a0d000 rw-p 00000000 00:00 0 
7fe301a0d000-7fe301a25000 r-xp 00000000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7fe301a25000-7fe301c24000 ---p 00018000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7fe301c24000-7fe301c25000 r--p 00017000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7fe301c25000-7fe301c26000 rw-p 00018000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7fe301c26000-7fe301c2a000 rw-p 00000000 00:00 0 
7fe301c2a000-7fe301d5a000 r-xp 00000000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7fe301d5a000-7fe301f5a000 ---p 00130000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7fe301f5a000-7fe301f5b000 r--p 00130000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7fe301f5b000-7fe301f5f000 rw-p 00131000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7fe301f5f000-7fe302018000 r-xp 00000000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7fe302018000-7fe302217000 ---p 000b9000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7fe302217000-7fe302219000 r--p 000b8000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7fe302219000-7fe30221a000 rw-p 000ba000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7fe30221a000-7fe30221d000 rw-p 00000000 00:00 0 
7fe30221d000-7fe302228000 r-xp 00000000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7fe302228000-7fe302427000 ---p 0000b000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7fe302427000-7fe302428000 r--p 0000a000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7fe302428000-7fe302429000 rw-p 0000b000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7fe302429000-7fe30242d000 r-xp 00000000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7fe30242d000-7fe30262c000 ---p 00004000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7fe30262c000-7fe30262d000 r--p 00003000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7fe30262d000-7fe30262e000 rw-p 00004000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7fe30262e000-7fe302635000 r-xp 00000000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7fe302635000-7fe302834000 ---p 00007000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7fe302834000-7fe302835000 r--p 00006000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7fe302835000-7fe302836000 rw-p 00007000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7fe302836000-7fe302858000 r-xp 00000000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7fe302a18000-7fe302a19000 rw-p 00000000 00:00 0 
7fe302a19000-7fe302a3a000 r--s 00000000 fc:01 1310767                    /tmp/duc/db/lcb1.duc.db
7fe302a3a000-7fe302a48000 rw-p 00000000 00:00 0 
7fe302a55000-7fe302a58000 rw-p 00000000 00:00 0 
7fe302a58000-7fe302a59000 r--p 00022000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7fe302a59000-7fe302a5b000 rw-p 00023000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7fff2ef93000-7fff2efb4000 rw-p 00000000 00:00 0                          [stack]
7fff2efff000-7fff2f000000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
/usr/lib/cgi-bin/duc-lcb1.cgi: line 10:  9394 Aborted                 (core dumped) /usr/local/bin/duc cgi -d "${database_dir}/${share_name}.duc.db"
*** glibc detected *** /usr/local/bin/duc: double free or corruption (!prev): 0x0000000001df5b90 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f01c1819b96]
/usr/local/lib/libduc.so.1(duc_dir_close+0x8f)[0x7f01c277fe5e]
/usr/local/bin/duc[0x403feb]
/usr/local/bin/duc[0x4030ed]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f01c17bc76d]
/usr/local/bin/duc[0x401fb9]
======= Memory map: ========
00400000-00407000 r-xp 00000000 fc:01 10094046                           /usr/local/bin/duc
00606000-00607000 r--p 00006000 fc:01 10094046                           /usr/local/bin/duc
00607000-00608000 rw-p 00007000 fc:01 10094046                           /usr/local/bin/duc
01de4000-02033000 rw-p 00000000 00:00 0                                  [heap]
7f01bdfcb000-7f01bdfe0000 r-xp 00000000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f01bdfe0000-7f01be1df000 ---p 00015000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f01be1df000-7f01be1e0000 r--p 00014000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f01be1e0000-7f01be1e1000 rw-p 00015000 fc:01 7340076                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f01be1e1000-7f01be1e6000 r-xp 00000000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f01be1e6000-7f01be3e5000 ---p 00005000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f01be3e5000-7f01be3e6000 r--p 00004000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f01be3e6000-7f01be3e7000 rw-p 00005000 fc:01 9971423                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f01be3e7000-7f01be3e9000 r-xp 00000000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f01be3e9000-7f01be5e8000 ---p 00002000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f01be5e8000-7f01be5e9000 r--p 00001000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f01be5e9000-7f01be5ea000 rw-p 00002000 fc:01 9971421                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f01be5ea000-7f01be611000 r-xp 00000000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f01be611000-7f01be811000 ---p 00027000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f01be811000-7f01be813000 r--p 00027000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f01be813000-7f01be814000 rw-p 00029000 fc:01 7340201                    /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7f01be814000-7f01be81b000 r-xp 00000000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f01be81b000-7f01bea1a000 ---p 00007000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f01bea1a000-7f01bea1b000 r--p 00006000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f01bea1b000-7f01bea1c000 rw-p 00007000 fc:01 7340070                    /lib/x86_64-linux-gnu/librt-2.15.so
7f01bea1c000-7f01bea58000 r-xp 00000000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f01bea58000-7f01bec57000 ---p 0003c000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f01bec57000-7f01bec58000 r--p 0003b000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f01bec58000-7f01bec59000 rw-p 0003c000 fc:01 7340119                    /lib/x86_64-linux-gnu/libpcre.so.3.12.1
7f01bec59000-7f01bec60000 r-xp 00000000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f01bec60000-7f01bee5f000 ---p 00007000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f01bee5f000-7f01bee60000 r--p 00006000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f01bee60000-7f01bee61000 rw-p 00007000 fc:01 9962917                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.0
7f01bee61000-7f01bee64000 r-xp 00000000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f01bee64000-7f01bf063000 ---p 00003000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f01bf063000-7f01bf064000 r--p 00002000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f01bf064000-7f01bf065000 rw-p 00003000 fc:01 9964937                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4
7f01bf065000-7f01bf074000 r-xp 00000000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f01bf074000-7f01bf273000 ---p 0000f000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f01bf273000-7f01bf274000 r--p 0000e000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f01bf274000-7f01bf275000 rw-p 0000f000 fc:01 7340037                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f01bf275000-7f01bf277000 r-xp 00000000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f01bf277000-7f01bf477000 ---p 00002000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f01bf477000-7f01bf478000 r--p 00002000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f01bf478000-7f01bf479000 rw-p 00003000 fc:01 7340207                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f01bf479000-7f01bf48f000 r-xp 00000000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f01bf48f000-7f01bf68e000 ---p 00016000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f01bf68e000-7f01bf68f000 r--p 00015000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f01bf68f000-7f01bf690000 rw-p 00016000 fc:01 7340260                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f01bf690000-7f01bf699000 r-xp 00000000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f01bf699000-7f01bf898000 ---p 00009000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f01bf898000-7f01bf899000 r--p 00008000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f01bf899000-7f01bf89a000 rw-p 00009000 fc:01 9966203                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f01bf89a000-7f01bf8b7000 r-xp 00000000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f01bf8b7000-7f01bfab6000 ---p 0001d000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f01bfab6000-7f01bfab7000 r--p 0001c000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f01bfab7000-7f01bfab8000 rw-p 0001d000 fc:01 9966146                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f01bfab8000-7f01bfac0000 r-xp 00000000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f01bfac0000-7f01bfcc0000 ---p 00008000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f01bfcc0000-7f01bfcc1000 r--p 00008000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f01bfcc1000-7f01bfcc2000 rw-p 00009000 fc:01 9966196                    /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
7f01bfcc2000-7f01bfcc4000 r-xp 00000000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f01bfcc4000-7f01bfec3000 ---p 00002000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f01bfec3000-7f01bfec4000 r--p 00001000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f01bfec4000-7f01bfec5000 rw-p 00002000 fc:01 9966199                    /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
7f01bfec5000-7f01bfeeb000 r-xp 00000000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f01bfeeb000-7f01c00eb000 ---p 00026000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f01c00eb000-7f01c00ec000 r--p 00026000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f01c00ec000-7f01c00ed000 rw-p 00027000 fc:01 7340092                    /lib/x86_64-linux-gnu/libpng12.so.0.46.0
7f01c00ed000-7f01c017d000 r-xp 00000000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f01c017d000-7f01c037c000 ---p 00090000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f01c037c000-7f01c0383000 r--p 0008f000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f01c0383000-7f01c0384000 rw-p 00096000 fc:01 9966873                    /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.30.2
7f01c0384000-7f01c03b8000 r-xp 00000000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f01c03b8000-7f01c05b8000 ---p 00034000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f01c05b8000-7f01c05b9000 r--p 00034000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f01c05b9000-7f01c05ba000 rw-p 00035000 fc:01 9975110                    /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4
7f01c05ba000-7f01c0650000 r-xp 00000000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f01c0650000-7f01c084f000 ---p 00096000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f01c084f000-7f01c0855000 r--p 00095000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f01c0855000-7f01c0856000 rw-p 0009b000 fc:01 9966186                    /usr/lib/x86_64-linux-gnu/libfreetype.so.6.8.0
7f01c0856000-7f01c087f000 r-xp 00000000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f01c087f000-7f01c0a7e000 ---p 00029000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f01c0a7e000-7f01c0a7f000 r--p 00028000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f01c0a7f000-7f01c0a80000 rw-p 00029000 fc:01 9965364                    /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3000.0
7f01c0a80000-7f01c0b72000 r-xp 00000000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f01c0b72000-7f01c0d72000 ---p 000f2000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f01c0d72000-7f01c0d73000 r--p 000f2000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f01c0d73000-7f01c0d74000 rw-p 000f3000 fc:01 7340131                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4
7f01c0d74000-7f01c0d75000 rw-p 00000000 00:00 0 
7f01c0d75000-7f01c0dc2000 r-xp 00000000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f01c0dc2000-7f01c0fc2000 ---p 0004d000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f01c0fc2000-7f01c0fc3000 r--p 0004d000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f01c0fc3000-7f01c0fc4000 rw-p 0004e000 fc:01 9964943                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3200.4
7f01c0fc4000-7f01c100a000 r-xp 00000000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f01c100a000-7f01c120a000 ---p 00046000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f01c120a000-7f01c120c000 r--p 00046000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f01c120c000-7f01c120d000 rw-p 00048000 fc:01 9965368                    /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3000.0
7f01c120d000-7f01c1308000 r-xp 00000000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f01c1308000-7f01c1507000 ---p 000fb000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f01c1507000-7f01c1508000 r--p 000fa000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f01c1508000-7f01c1509000 rw-p 000fb000 fc:01 7340088                    /lib/x86_64-linux-gnu/libm-2.15.so
7f01c1509000-7f01c1599000 r-xp 00000000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f01c1599000-7f01c1798000 ---p 00090000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f01c1798000-7f01c1799000 r--p 0008f000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f01c1799000-7f01c179b000 rw-p 00090000 fc:01 9978713                    /usr/lib/libtokyocabinet.so.8.27.0
7f01c179b000-7f01c1950000 r-xp 00000000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f01c1950000-7f01c1b50000 ---p 001b5000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f01c1b50000-7f01c1b54000 r--p 001b5000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f01c1b54000-7f01c1b56000 rw-p 001b9000 fc:01 7340058                    /lib/x86_64-linux-gnu/libc-2.15.so
7f01c1b56000-7f01c1b5b000 rw-p 00000000 00:00 0 
7f01c1b5b000-7f01c1b73000 r-xp 00000000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f01c1b73000-7f01c1d72000 ---p 00018000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f01c1d72000-7f01c1d73000 r--p 00017000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f01c1d73000-7f01c1d74000 rw-p 00018000 fc:01 7340078                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f01c1d74000-7f01c1d78000 rw-p 00000000 00:00 0 
7f01c1d78000-7f01c1ea8000 r-xp 00000000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f01c1ea8000-7f01c20a8000 ---p 00130000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f01c20a8000-7f01c20a9000 r--p 00130000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f01c20a9000-7f01c20ad000 rw-p 00131000 fc:01 9963690                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f01c20ad000-7f01c2166000 r-xp 00000000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f01c2166000-7f01c2365000 ---p 000b9000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f01c2365000-7f01c2367000 r--p 000b8000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f01c2367000-7f01c2368000 rw-p 000ba000 fc:01 9975118                    /usr/lib/x86_64-linux-gnu/libcairo.so.2.11000.2
7f01c2368000-7f01c236b000 rw-p 00000000 00:00 0 
7f01c236b000-7f01c2376000 r-xp 00000000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f01c2376000-7f01c2575000 ---p 0000b000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f01c2575000-7f01c2576000 r--p 0000a000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f01c2576000-7f01c2577000 rw-p 0000b000 fc:01 9965370                    /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3000.0
7f01c2577000-7f01c257b000 r-xp 00000000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f01c257b000-7f01c277a000 ---p 00004000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f01c277a000-7f01c277b000 r--p 00003000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f01c277b000-7f01c277c000 rw-p 00004000 fc:01 10094041                   /usr/local/lib/libduc-graph.so.1.0.0
7f01c277c000-7f01c2783000 r-xp 00000000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f01c2783000-7f01c2982000 ---p 00007000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f01c2982000-7f01c2983000 r--p 00006000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f01c2983000-7f01c2984000 rw-p 00007000 fc:01 10094037                   /usr/local/lib/libduc.so.1.0.0
7f01c2984000-7f01c29a6000 r-xp 00000000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7f01c2b66000-7f01c2b67000 rw-p 00000000 00:00 0 
7f01c2b67000-7f01c2b88000 r--s 00000000 fc:01 1310767                    /tmp/duc/db/lcb1.duc.db
7f01c2b88000-7f01c2b96000 rw-p 00000000 00:00 0 
7f01c2ba3000-7f01c2ba6000 rw-p 00000000 00:00 0 
7f01c2ba6000-7f01c2ba7000 r--p 00022000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7f01c2ba7000-7f01c2ba9000 rw-p 00023000 fc:01 7340090                    /lib/x86_64-linux-gnu/ld-2.15.so
7ffff5125000-7ffff5146000 rw-p 00000000 00:00 0                          [stack]
7ffff514d000-7ffff514e000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
/usr/lib/cgi-bin/duc-lcb1.cgi: line 10:  9399 Aborted                 (core dumped) /usr/local/bin/duc cgi -d "${database_dir}/${share_name}.duc.db"
Requested path not found
[Tue Jun 03 16:48:29 2014] [error] [client 10.35.70.124] Premature end of script headers: duc-lcb1.cgi, referer: http://example.com/cgi-bin/duc-lcb1.cgi?cmd=index&path=/media/data2/lcb/archives&?293,202

Non-unix platform support?

The core Duc code (libduc + text-only duc tools) compile pretty much clean with the mingw win32 and android-ndk compilers. Supporting these platforms would require some extra work though:

  • tokyocabinet is not quite portable. Adding a sqlite3 backend would be usable on both windows and android
  • the cairo/pango frontend is portable to both windows and android, but pulls in a lot of external dependencies. Rewriting the graph drawing with native toolkits would probably be not a lot of work.

If anyone is seriously interested in a port to either platform, let me know and I'll see what I can do.

Stale CGI processes

Stuart wrote:

The only interesting issue I have found so far is that in cgi mode I am ending up
with leaked duc processes running under Apache on e.g., with only a relatively
small amount of clicking on a fairly large database file (356M) I currently have,

We need to investigate if, when and why the cgi child processes keep lingering around.

duc gui: extended information on mouse hovering

feature request

it would be useful to display extended information as a tooltip while hovering the mouse over a region, in particular:

  • the folder name
  • the folder total size
  • the total number of files

this is already somehow possible (since, once you click over the same region, then you go to that folder; which means that the information is already fairly accessible). however, I had a look at the code and have no idea how this could be implemented in practice

PS.
I love the tool. this is a small suggestion to make it even more lovely

featurerequest: overall graph of multiple datasets in a database

Or support indexing on multiple given filesystems, like :
duc index -x / /data /someothermount

If I do :
duc index -x /
duc index -x /data
dux index -x /someothermount
I get a database with multilpe datasets and no option to make a combined graph of them.

opening old philesight format DB gives useless error

When testing duc performance by comparing with an old philesight format DB, I forgot to change into a new directory and did:

duc index -d data121.db /data/data121
Error opening database: Database not found
Database not found

There's two problems here:

  1. No filename listed, which I'll fix in another patch.
  2. It's not that the database isn't found, it's just not a correct format that tokyocabinet can understand.

CGI testing

I've spun up a simple CGI script and it's working well on my RHEL5.6 Apache server. It's even working while the database is being used to index a new filesystem. Seems to work well, and the graph build times are good compared to philesight. I'm going to hack in some timing reporting to the code, so you can run the CGI with -v to get verbose performance numbers.

drwx--x--x permissions cause further size analysis to fail

I am running duc, and when I try and run it over a directory that has a sub-directory with the following permissions:

drwx--x--x

in a directory I do not have ownership for. I will get error messages like the following (changed a bit from original file names):

Writing to junk.duc
Skipping dir0: Permission denied
Error statting dir1: No such file or directory
Error statting dir2: No such file or directory
Error statting file1.cc: No such file or directory
....[Ed. Errors continue for various directories / files that were analyzed after the one with the bad permissions.]

When I generate the graph, it seems to not analyze any of the files after the directory with these permissions. I can't zip up an example due to file size / company policies, but could probably recreate a smaller scale version of this. If you need more complete instructions to reproduce the issue let me know, and I will try and come up with something more complete.

Handling library dependencies for different tools.

I've started with a (basic) X11 gui for browsing the database; this uses the same graph generating code as the CGI, but draws into a X11 window instead.

This adds another dependency to the tool: X11. I guess X11 will soon prove insufficient so I'll have to move to GTK or QT.

I'm not sure if all these dependencies are a good thing: typical users might only want to have a command line client to browse the file system, and will not be happy with all the dependencies that are pulled in (cairo, pango, X).

A solution would be to split up the software in separate components which will be built depending on the available options detected by autoconf.

The tools would be split up into multiple command line tools instead of one. For convenience a wrapper tool 'duc' could be made that does nothing but invoke the
proper sub-binary.

The libraries would change from static to shared (.a to .so), and split into multiple parts: one for the core functionality of indexing and querying, and one for generating the cairo graphs.

Complete list of compontents with their dependencies:

  • libduc.so: tokyocabinet
  • libduc-graph.so: cairo pango
  • duc-index: libduc
  • duc-ls: libduc
  • duc-info: libduc
  • duc-draw: libduc-graph
  • duc-cgi: libduc-graph
  • duc-gui: libduc-graph X11

This looks all very complex, but in practice not much would change: building the software is still a simple ./configure && make && sudo make install.

Any opinions?

Feature req: Support counting files/per dir?

One possible feature would be to also count the number of files per directory and offer the ability to report on file counts and generate graphs showing that data as well. Honestly haven't looked into the code to see if that data is counted already or not. This would be analgous to the 'df -i' output to show number of inodes in a filesystem.

duc ls -d /some/data.db doesn't show root path

If I come across an unknown duc DB, how do I tell what the top of the tree is using:

du ls -d some.db

I think it would make sense to default to the root as given by the

du info -d some.db

under the principle of least surprise.

John

Duc calculates file size, not disk usage

At this time Duc indexes file sizes, but not he actual disk usage like du and df. This is confusing for some users because the numbers differ, and for some users calculating disk usage instead of file size is Just The Right Thing To Do.

I see two obvious solutions:

  • The indexer gets an option so at index time the user chooses to count either file size or disk usage
  • The indexer keeps track of both, and the user chooses at display time which to show.

Any feedback welcome.

Failure to index 15TB drive

Hello,

I am running duc on an NFS mountpoint of a 15TB filesystem on Ubuntu 12.04 server with the following options:
duc index /path/to/mount

After running for several hours, duc appears to be no longer indexing. If I strace the process, I see the following being printed over and over:

pread(3, "\260\0\0\t\0\264\0!\363Q\3\206\4\230\n9b37\205\227kL\34U\24\200g\226\n\224\1"..., 256, 198681088) = 256
pread(3, "\260\0\0\t\0\264\0!\363Q\3\206\4\230\n9b37\205\227kL\34U\24\200g\226\n\224\1"..., 256, 198681088) = 256

Also the duc database has not been modified for several hours, which also leads me to believe that it is no longer actively indexing.

Note that this filesystem does contain a large number of hardlinks. Is there any other information I can provide to help diagnose why duc appears to be stuck indexing?

Thanks!

Interactive mouseover labels in gui

The gui pie chart display is good, but could be improved with a little subtle visual feedback on the mouseovers...something like a slight shift in color when you mouseover a section to indicate that it's clickable. Also, right now some sections of the pie display their directory names, but the smaller ones don't... might be helpful to display the directory name of a section somewhere when it's mouseoverd, so you can see what you're about to click on or what the file name is.

Remove incorrect path

It might be that I didn't find the right command but I can't seem to be able to remove a wrongly indexed path:

$ duc index /trwtwet
Skipping /trwtwet: No such file or directory
Indexed 0 files and 0 directories, (0B total) in 0.00 secs.

$ duc info
  2015-02-02 13:21:01  244.6G /data/audio
  2015-02-02 13:19:55       0 /trwtwet

Is there a way to remove that path from the database? Other than removing and reindexing everything else?

Cheers

How to handle hard links?

What would be the proper way to handle counting size with hard links?

Double counting hard links:

  • pro: simple implementation
  • pro: shows where the data is
  • con: totals do not add up

Single counting of hard links:

  • pro: totals add up
  • con: big files show up in one place, but not in the other.
  • con: slower indexing and more memory usage because a list of visited inodes must be kept.

Featurerequest: using duc-database on nfsmounts, bindmounts ...

This is my problem
SrvA:# duc index --database /foo/workdir

SrvB with nfsmount SrvA:/foo/workdir /bar/work/SrvA
SrvB:#duc ls --database /bar/work/SrvA /bar/work/SrvA

How could i manage to use the database i generated on SrvA on SrvB in a relative way?

Missing old philesight options

Hi guys!

Thanks for duc it is looking good now that I've got it up and running on cent 6.5 but I have an issue/feature request.

Our old philesight command line used a couple switches that don't seem to exist with duc.
--skip /this/directory/entirely
--only-dirs

I tried to use -e /this/directory/entirely but it failed. I'm now trying -e entirely (the name of the folder) hoping that does the trick.

The only dirs option was nice though.

Query for access times

Hi,

i am wondering if it is possible to query the db for files ordered by access time.

Requesting feedback on visual style.

I'm trying some things to restyle the graph look to show more relevant info at the glance of an eye.

Below is one of my tests with the following properties:

  • colors of sections now depend on the relative section size to the other sections in the same level. The smallest is always green, the biggest is always red. This makes it easier to find the hotspots. Downside is that the color palette has been reduced from full scale to only red/orange/yellow/green, which is esthetically less pleasing.
  • I'd like to be able to differentiate between files and directories in the graph. In the graph below files are simply desaturated, while directories have colors. Any other ideas are welcome.

newcolors

Show more info after building index

it would be nice to see it telling us some more info, like which DB it put the data into, and how long it took. Maybe also convert the bytes into more human readable output too.

Is it time for a config file?

Duc has a lot of options already, and it seems that there is some functionality that people would like to save.

It might be time to get started with implementing a configuration file with default settings and preferences. The configuration file should be optional if possible, but if it is found the settings should be used if applicable.

Some things that should go in there:

  • database path
  • verbose operation / debugging
  • default path to start from 'duc gui' tool, etc

I propose a simple format with different sections, one for each duc subcommand, and one with global options. I guess it will be flexible enough if the config file simple uses the exact same options as the command line, so everything will be unambigious and self-documenting.

For example:

[global]

database-path=/var/duc/duc.db
verbose

[index]

hide-files
maxdepth=5

[ls]

graph
human-readable
recursive

Configuration files are searched in different paths, and settings are overruled be subsequent files found. Search order:

  • .duc.conf
  • ~/.duc.conf
  • /etc/duc.conf

The only thing that has to be defined is a way to cancel options which were found earlier. The vim-way should do; simple prepend 'no-' to a setting to cancel it.

no-hide-files
no-recursive

Does the above make sense?

No configure file

Thanks for making duc. I got it working on ubuntu 14.04 and it works sweet, big improvement from philesight, which was the best thing out there...

However, when I downloaded the zip file and tried to do ./configure, make, etc like the Readme said, it didn't work...there is no configure file. I first had to run libtoolize, then automake --add-missing, the autoreconf -v -f ...THEN I was able to run ./configure, make, sudo make install, sudo ldconfig. So possibly the docs should be updated.

Update README with installation of libtool package

Installing autoconf is not enough (on at least on Ubuntu 12.04) for running autoreconf --install:

$ autoreconf --install
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196.
configure.ac:39: warning: macro `AM_DISABLE_STATIC' not found in library
configure.ac:40: warning: macro `AM_PROG_LIBTOOL' not found in library
configure.ac:36: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:39: error: possibly undefined macro: AM_DISABLE_STATIC
configure.ac:40: error: possibly undefined macro: AM_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1

After installing the libtool package, autoreconf --install works fine.

Can the README be updated?

Ubuntu/Debian: 
$ sudo apt-get install autoconf libtool

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.