#555 menu-cache 4.1 segfault

None
closed-fixed
menu-cache (19)
7
2014-09-04
2012-11-22
Pierre Ferry
No

Bug in menu-cache/menu-cached on archlinux 64 bits with openbox and menu-cache 4.1:

When i run test (see attachment) in console with ~/cache/menus/ empty; it is ok but the second time, test don't return and print :

WARNING **: removed previous socket file /tmp/.menu-cached-:0-pierre

Also in messages.log, there is:

localhost kernel: [17807.047651] menu-cached[1928]: segfault at 100000007 ip 00007fc663cbc9b2 sp 00007ffffdca9310 error 4 in libc-2.16.so[7fc663c43000+19d000]

Discussion

  • Pierre Ferry
    Pierre Ferry
    2012-11-22

    test

     
    Attachments
  • Pierre Ferry
    Pierre Ferry
    2012-11-23

    with env LD_DEBUG=files ./test, i get:

    ./test: error: symbol lookup error: undefined symbol: gtk_widget_device_is_shadowed (fatal)

     
  • I'm sorry but I cannot reproduce the bug, it works fine for me for long enough time already.
    If you could gather the coredump file, I would like to get backtrace for the crash.
    Thank you very much.

     
  • Pierre Ferry
    Pierre Ferry
    2012-11-28

    coredump

     
    Attachments
  • Pierre Ferry
    Pierre Ferry
    2012-11-28

    Thank you for your help and sorry for the delay:
    I have found it necessary to replace in menucached.c, chdir ("/") by chdir (<my home>)
    for the coredump file is generated

     
  • Pierre Ferry
    Pierre Ferry
    2012-11-29

    My glibc is glibc 2.16.0-5

     
  • I'm sorry but I cannot open your core file, anyway it's bound to your binaries and as soon they are built on your system the core file is near useless.
    I would ask you to open it in GDB, do 'bt full', and quote the output somewhere. Thank you in advance.

     
  • Pierre Ferry
    Pierre Ferry
    2012-12-03

    in menucache.c line 1335 before the line
    "if((rc == ECONNREFUSED || rc == ENOENT) && retries == 0)", i add
    DEBUG("PIERRE: rc: %d, retries:%d\n",rc,retries);

    1) env G_MESSAGES_DEBUG=all ./test -->
    ** (process:1467): DEBUG: cache file_name = /home/pierre/.cache/menus/bf5d022c6989ba373d2689d08a5bc909
    ** (process:1467): DEBUG: PIERRE: rc: 2, retries:0

    ** (process:1467): DEBUG: no running server found, starting it
    ** (process:1467): DEBUG: server line: REL:bf5d022c6989ba373d2689d08a5bc909

    ** (process:1467): DEBUG: server ask us to reload cache: bf5d022c6989ba373d2689d08a5bc909
    ** (process:1467): DEBUG: RELOAD!

    2) env G_MESSAGES_DEBUG=all ./test -->
    ** (process:1471): DEBUG: cache file_name = /home/pierre/.cache/menus/bf5d022c6989ba373d2689d08a5bc909
    ** (process:1471): DEBUG: IO error 25, try to re-connect.
    ** (process:1471): DEBUG: PIERRE: rc: 111, retries:0

    ** (process:1471): DEBUG: no running server found, starting it

    ** (process:1474): WARNING **: removed previous socket file /tmp/.menu-cached-:0-pierre
    ** (process:1471): DEBUG: successfully restart server.
    re-register menus.
    ^C

    and then goto 1) !

    see also my attached file btfull.txt

    And thanks.

     
  • Pierre Ferry
    Pierre Ferry
    2012-12-03

     
    Attachments
  • Pierre Ferry
    Pierre Ferry
    2012-12-04

    i have run my test program with git version of menu-cache and it segfault always.

    on my archlinux 64 bits, i have compiled menu-cache 4.1 with :
    ./configure --prefix=/home/pierre/Projets/C/menu-cache32 --libdir='${prefix}' --libexecdir='${prefix}' --includedir='${prefix}' --disable-static --disable-silent-rules --build=i686-pc-linux-gnu "CFLAGS=-m32" "LDFLAGS=-m32"

    then, i compiled test.c with:
    LIBS= `pkg-config --libs gobject-2.0` -l:/home/pierre/Projets/C/menu-cache32/libmenu-cache.so
    CFLAGS+= -m32 -Wall -g `pkg-config --cflags /home/pierre/Projets/C/menu-cache32/pkgconfig/libmenu-cache.pc`
    LDFLAGS+= -m32 -Wl,-rpath -Wl,/home/pierre/Projets/C/menu-cache32

    file test:
    test: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x3a2945f12f533f698d16b58966c3b8d313cd3f96, not stripped
    ldd test:
    linux-gate.so.1 (0xf772b000)
    libgobject-2.0.so.0 => /usr/lib32/libgobject-2.0.so.0 (0xf76bb000)
    libglib-2.0.so.0 => /usr/lib32/libglib-2.0.so.0 (0xf75c0000)
    libmenu-cache.so.2 => /home/pierre/Projets/C/menu-cache32/libmenu-cache.so.2 (0xf75b9000)
    libc.so.6 => /usr/lib32/libc.so.6 (0xf740f000)
    libgthread-2.0.so.0 => /usr/lib32/libgthread-2.0.so.0 (0xf740b000)
    libpcre.so.1 => /usr/lib32/libpcre.so.1 (0xf73a7000)
    libpthread.so.0 => /usr/lib32/libpthread.so.0 (0xf738c000)
    librt.so.1 => /usr/lib32/librt.so.1 (0xf7383000)
    libffi.so.6 => /usr/lib32/libffi.so.6 (0xf737c000)
    libgio-2.0.so.0 => /usr/lib32/libgio-2.0.so.0 (0xf721e000)
    /lib/ld-linux.so.2 (0xf772c000)
    libgmodule-2.0.so.0 => /usr/lib32/libgmodule-2.0.so.0 (0xf7219000)
    libdl.so.2 => /usr/lib32/libdl.so.2 (0xf7214000)
    libz.so.1 => /usr/lib32/libz.so.1 (0xf71fd000)
    libresolv.so.2 => /usr/lib32/libresolv.so.2 (0xf71e5000)

    and, this time, NO SEGFAULT.

    hopes that this can help you.

    Thanks.

     
  • Hong Hao
    Hong Hao
    2013-01-23

    No one hitting this bug? I have this issue on two linux desktop.

     
    • assigned_to: nobody --> lstranger
    • priority: 5 --> 7
     
  • Your backtrace file contains not much info unfortunately but at least it contains some hints where to dig. I'll try to find a problem. Thank you vary much and I'm sorry for such big delay, I just missed the bug.

     
  • I've got a patch from Laurentiu Palcu so I hope this is fixed by latest commit into GIT. Test it when it's possible for you and I would be glad if you could tell if the problem was solved. Thank you very much.

     
    • status: open --> pending-fixed
     
    • status: pending-fixed --> closed-fixed
    • Group: --> -