Menu

#72 rodent hangs at startup because dbh can't lock it!

git
open
nobody
5
2015-02-01
2015-01-12
r004
No

I build rodent and its dependencies on a 64bit system with glib1.2.10 glibc2.20 gcc4.6.4.
All items were clone from the git repository and no errors were introduced during the build and install.
but when I issue rodent or (rodent-fm, ...) It hangs at start up and I get this in terminal :

  *** <dbh>: DBH: sdbh_lock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh-18939 (Connection timed out), proceeding on
*** <dbh>: DBH: sdbh_lock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh-18939 (Connection timed out), proceeding on
*** <dbh>: DBH: sdbh_lock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh-18939 (Connection timed out), proceeding on
...
..
.

Can't use rodent because of it.

Discussion

  • r004

    r004 - 2015-01-13
    *** <dbh>: DBH: sdbh_lock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    *** <dbh>: DBH: sdbh_unlock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    *** <dbh>: DBH: sdbh_lock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    *** <dbh>: DBH: sdbh_unlock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    *** <dbh>: DBH: sdbh_lock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    *** <dbh>: DBH: sdbh_unlock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    *** <dbh>: DBH: sdbh_lock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    *** <dbh>: DBH: sdbh_unlock() unable to unlock semaphore for /home/r004/.cache/rfm/dbh/mime.sfx.cache64.dbh (Connection timed out), proceeding on timeout...
    
     
  • Edscott Wilson Garcia

    Seems like you have a stale named semaphore. In Linux, named semaphores are in /dev/shm and have the prefix "sem". You can also see active semaphores with the command "ipcs -s".
    libdbh uses semaphores to avoid multiprocess access collisions, and they are created and destroyed on the fly. You should see them appear and dissappear. But if one remains, then it is stale. ¿Do you have any stale semaphores? ¿What happens if you remove them with rm?

     
  • r004

    r004 - 2015-01-13

    As you can see the list is empty and i tried it over and over and as fast and slow .

     ipcs -s
    
    ------ Semaphore Arrays --------
    key        semid      owner      perms      nsems
    

    my fstab

    /dev/sda2   /       ext4    noatime     0 1
    
    # swap
    /dev/sda4   none        swap    sw  0 0
    
    
    proc            /proc       proc    nosuid,noexec,nodev 0 0
    devpts          /dev/pts    devpts  noexec,nosuid,gid=tty,mode=0620 0 0
    # shared memory
    shm         /dev/shm    tmpfs   size=64m    0 0
    devtmpfs        /dev        devtmpfs    mode=0775,nosuid    0 0
    tmp
    

    So I am out of ideas. Please advise me on how to proceed.
    Thanks

     

    Last edit: r004 2015-01-13
  • r004

    r004 - 2015-01-14

    after a reboot my /dev/shm was empty and I issued rodent command in terminal. the same error and rodent-fm hanged.
    after that ls /dev/shm showed:

    total 24K
    drwxrwxrwt  2 root root   80 Jan 14 07:34 .
    drwxr-xr-x 15 root root 3.6K Jan 14 06:54 ..
    -rwx------  1 r004 r004  20K Jan 14 07:34 1000-rfm-3.15.0a
    -rw-------  1 r004 r004   12 Jan 14 07:34 2056-4327858
    
     
  • Edscott Wilson Garcia

    Ok. Apparently the problem is not with the semaphore from libdbh. To find out where rodent-fm is hanging, please configure both librfm and rodent-fm with the option "--with-core". Recompile and install and run. Once the process hangs, do a "kill -SEGV pid" where pid is the process id. This should appear in the title bar, separated from the path with a dash. The final "C" in the title bar indicates that core dumps are enabled.

    This will terminate the hanged process and dump a "core" file in your home dir. Then do a "gdb rodent-fm core" to load the core file with the GNU debugger. At the gdb> prompt, type "where" or "bt". This will show us where the deadlock occurs and make a fix possible.

     
  • r004

    r004 - 2015-01-18

    I installed a basic gdb from my linux own package manager (I don't know if the options we needed are selected for gdb install like expat and ... . if we need gdb to build with special option please tell me and I provide all the options I can select for gdb install here and you point out what we want.)

    Reading symbols from rodent-fm...done.
    [New LWP 1943]
    [New LWP 1950]
    [New LWP 1955]
    [New LWP 1957]
    [New LWP 1958]
    [New LWP 1966]
    [New LWP 1964]
    [New LWP 1968]
    [New LWP 1967]
    [New LWP 1956]
    [New LWP 1954]
    [New LWP 1963]
    [New LWP 1951]
    [New LWP 1965]
    
    warning: Could not load shared library symbols for linux-vdso.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    
    warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/libthread_db.so.1".
    Core was generated by `rodent'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00007fd8e00580ec in __lll_lock_wait () from /lib/libpthread.so.0
    (gdb) bt
    #0  0x00007fd8e00580ec in __lll_lock_wait () from /lib/libpthread.so.0
    #1  0x00007fd8e0053393 in pthread_mutex_lock () from /lib/libpthread.so.0
    #2  0x00007fd8e0590347 in g_rec_mutex_lock ()
       from /usr/lib/../lib/libglib-2.0.so.0
    #3  0x00007fd8e12a7261 in g_module_symbol ()
       from /usr/lib/../lib/libgmodule-2.0.so.0
    #4  0x00007fd8e76e86e6 in rfm_natural (
        librarydir=0x7fd8e76f453d "/usr/lib/rfm/rmodules", 
        module_name=0x7fd8e76f4537 "icons", n=0x7fd8c8020c90, 
        function_id=0x7fd8e76f4508 "mime_icon_get_filename_from_id")
        at ../../primary/primary-modules.c:367
    #5  0x00007fd8e76e9980 in rfm_find_in_pixbuf_hash (
        key=0x7fd8c8020c90 "xffm/stock_go-last", size=20)
        at ../../primary/primary-icons-hash.i:226
    #6  0x00007fd8e76eb9c3 in get_pixbuf (key=0x7fd8c8020c90 "xffm/stock_go-last", 
        size=20, replace_pixbuf=0) at ../../primary/primary-icons.i:824
    #7  0x00007fd8e76ee8a6 in get_pixbuf_f (data=0x7fffd83f0970)
        at ../../primary/primary-icons.c:1244
    #8  0x00007fd8e76d40ec in main_context_function_f (data=0x7fffd83f0900)
        at ../../primary/primary.c:190
    #9  0x00007fd8e76d41e6 in rfm_context_function (
        function=0x7fd8e76ee863 <get_pixbuf_f>, function_data=0x7fffd83f0970)
        at ../../primary/primary.c:217
    ---Type <return> to continue, or q <return> to quit---
    #21 0x00007fd8e76d40ec in main_context_function_f (data=0x7fffd83f0d80)
        at ../../primary/primary.c:190
    #22 0x00007fd8e76d41e6 in rfm_context_function (
        function=0x7fd8e76e6bdd <dialog_run_response_f>, function_data=0x1500270)
        at ../../primary/primary.c:217
    #23 0x00007fd8e76e6c26 in rfm_dialog_run_response (dialog=0x1500270)
        at ../../primary/primary-misc.c:2631
    #24 0x00007fd8e76df780 in confirm_f (data=0x7fffd83f0f70)
        at ../../primary/primary-misc.i:224
    #25 0x00007fd8e76d40ec in main_context_function_f (data=0x7fffd83f0ee0)
        at ../../primary/primary.c:190
    #26 0x00007fd8e76d41e6 in rfm_context_function (
        function=0x7fd8e76df6b7 <confirm_f>, function_data=0x7fffd83f0f70)
        at ../../primary/primary.c:217
    #27 0x00007fd8e76e6c7f in rfm_confirm (widgets_p=0x0, type=-1, 
        text=0x14dad30 "<b>Welcome!</b>\n\nWelcome to <i>Rodent  (xffm-5.3.14.6)</i>\n\n\nIcon Theme Specification: Elite\n\n...\n\n\nSettings saved to '/home/r004/.config/rfm/rfm-3.15.0a'\n\n", action_false=0x0, action_true=0x0)
        at ../../primary/primary-misc.c:2653
    #28 0x0000000000403f25 in welcome (data=0x0) at ../../src/rodent.c:489
    #29 0x00007fd8e053e306 in g_idle_dispatch ()
       from /usr/lib/../lib/libglib-2.0.so.0
    #30 0x00007fd8e053ba1d in g_main_dispatch ()
    
       from /usr/lib/../lib/libglib-2.0.so.0
    #31 0x00007fd8e053c77a in g_main_context_dispatch ()
       from /usr/lib/../lib/libglib-2.0.so.0
    #32 0x00007fd8e053c96a in g_main_context_iterate ()
       from /usr/lib/../lib/libglib-2.0.so.0
    #33 0x00007fd8e053cd93 in g_main_loop_run ()
       from /usr/lib/../lib/libglib-2.0.so.0
    #34 0x00007fd8e74aad8d in rodent_main_loop ()
        at ../../rodent/rodent_population.c:37
    #35 0x000000000040453c in main (argc=1, argv=0x11cbb40)
        at ../../src/rodent.c:71
    
     

    Last edit: r004 2015-01-18
  • Edscott Wilson Garcia

    Please provide information regarding Linux distro and version so I may try and reproduce the problem. The above traceback apparently indicate some issue with the gmodule library.

     

Log in to post a comment.

MongoDB Logo MongoDB