Menu

#567 Linux crash

Future
open
None
7
2021-04-05
2020-11-13
David
No

I had the gtk-gnutella in background and i wasn't even interacting with it. Suddenly the gtkg window pops up without connections, no downloads... only searches (but not search results).

gtk-gnutella is now crashing.

I checked the crash logs and apparently it crashed several times during the night.

Attaching the logs.

4 Attachments

Discussion

  • David

    David - 2020-11-13

    After the GTKG crashed once more i tried to start it in the command line:

    demanuel@archlinux ~/.gtk-gnutella> gtk-gnutella
    20-11-13 13:05:35.157 (WARNING): cannot find symbols_load_from() in the loaded symbols
    20-11-13 13:05:35.157 (WARNING): garbage symbols, trying with pre-computed "/usr/lib/gtk-gnutella/gtk-gnutella.nm"
    20-11-13 13:05:35.276 (WARNING): Another gtk-gnutella supervisor is running as PID 2422783
    20-11-13 13:05:35.276 (MESSAGE): If PID 2422783 is not a gtk-gnutella process, run:
    20-11-13 13:05:35.276 (MESSAGE): rm /home/demanuel/.gtk-gnutella/gtk-gnutella-super.pid
    demanuel@archlinux ~/.gtk-gnutella [1]> ps xua | grep -i 2422783
    demanuel 2422783  0.2  0.0  42772 19256 ?        Sl   nov10  12:39 gtk-gnutella supervisor, 7 children launched
    demanuel 3022851  0.0  0.0   6340  2340 pts/3    S+   13:06   0:00 grep --color=auto -i 2422783
    demanuel@archlinux ~/.gtk-gnutella> ps xua | grep -i gtk-gnutella
    demanuel 2422783  0.2  0.0  42772 19256 ?        Sl   nov10  12:39 gtk-gnutella supervisor, 7 children launched
    demanuel 3018099  0.2  0.0  54888 23148 ?        Sl   12:58   0:01 gtk-gnutella --child
    demanuel 3025848  0.0  0.0   6348  2220 pts/3    S+   13:07   0:00 grep --color=auto -i gtk-gnutella
    demanuel@archlinux ~/.gtk-gnutella> 
    
     
  • Raphael Manfredi

    You have me puzzled. You are hitting an assertion failure that looks impossible. Reading the code where the assertion fails, and proofreading again the condition that would need to be present for that assertion to fail, I see no way this can happen. But it does...

    May I suggest two courses of action here:
    - install the binutils-dev package so that you get the BFD library and we can have stacktraces which include source code location.
    - go to the top of gtk-gnutella's sources and run:

    $ make clobber
    $ ./build.sh
    $ sudo cp src/gtk-gnutella /usr/bin/
    

    I've seen strange ("impossible") bugs disappear after a clean recompilation from scratch.

    Let me know what happens and, please, should it crashes again, include one crash log. I'm curious about the actual stack trace you will get because the one listed in the crash logs you included is not making sense: the hdestroy() routine cannot be called like that, and certainly not in sequence!

     
  • Raphael Manfredi

    • assigned_to: Raphael Manfredi
    • Priority: 5 --> 9
     
  • David

    David - 2020-11-14

    My distro (arch linux) doesn't have this package binutils-dev :-(

    https://www.archlinux.org/packages/?q=binutils

    I will recompile it again. Let's see if it improves.

     
  • Raphael Manfredi

    On Arch linux, it should be the binutils package. Try it to see if the BFD library is found by Configure (launched from build.sh).

     
  • David

    David - 2020-11-15

    I build it again, checked the output:

    Checking whether the BFD library is available... yes.

    And enabled the core dumps. I have the gtkg running now.

    I believe this incident can be downgraded as i don't have a repro case. I'll update it here next time it crashes.

     
  • Raphael Manfredi

    • status: open --> pending
    • Priority: 9 --> 3
     
  • Raphael Manfredi

    Waiting to see whether it happens again after a clean recompile.

     
  • David

    David - 2020-11-19

    Just crashed now.

    Logs attached:

     
  • Raphael Manfredi

    • status: pending --> open
    • Priority: 3 --> 7
     
  • Raphael Manfredi

    Unfortunately, your stack in the crash log is not correct, hence it is difficult for me to understand what is exactly going on. Did you strip your binary?

    Can you do a:

    $ file /usr/bin/gtk-gnutella
    

    to make sure it has debug_info and is not stripped. Also can you do a:

    $ ldd /usr/bin/gtk-gnutella
    

    to make sure it is indeed linked against the BFD library?

    Without a proper stack trace, I cannot investigate easily why this is happening.

     
  • David

    David - 2020-11-27
    demanuel@archlinux ~/Downloads> file /usr/bin/gtk-gnutella
    /usr/bin/gtk-gnutella: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=ac34a69a83443acca5d27591e89e78767d4addd5, for GNU/Linux 3.2.0, with debug_info, not stripped
    demanuel@archlinux ~/Downloads> ldd /usr/bin/gtk-gnutella
        linux-vdso.so.1 (0x00007ffc774fa000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00007f87b9a18000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00007f87b9962000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007f87b9939000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f87b9914000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f87b98c2000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f87b986a000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f87b9734000)
        libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f87b9665000)
        libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f87b9610000)
        libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007f87b9447000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f87b942d000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f87b9427000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f87b92df000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f87b92bd000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f87b90f4000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f87b90ef000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f87b90de000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f87b8f9d000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f87b8f92000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f87b8e66000)
        libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f87b8caa000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f87b8c8e000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f87b8c43000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f87b8c36000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f87b8c2f000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f87b8c1c000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f87b8c0f000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f87b8c03000)
        libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f87b8bfe000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f87b8bf9000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f87b8be2000)
        libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007f87b8bc3000)
        libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f87b8bb8000)
        libffi.so.7 => /usr/lib/libffi.so.7 (0x00007f87b8bac000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f87b8b3a000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f87b8a64000)
        libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f87b8a3f000)
        libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f87b898c000)
        libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f87b8857000)
        libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f87b8836000)
        libunistring.so.2 => /usr/lib/libunistring.so.2 (0x00007f87b86b4000)
        libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f87b869c000)
        libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007f87b865e000)
        libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007f87b8616000)
        libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f87b8575000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f87ba68f000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f87b854b000)
        libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f87b84a1000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f87b846a000)
        libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f87b8465000)
        libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f87b8455000)
        libmount.so.1 => /usr/lib/libmount.so.1 (0x00007f87b83f8000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f87b83de000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f87b83ad000)
        libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f87b83a3000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f87b8390000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007f87b8385000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f87b835d000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f87b8289000)
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f87b8267000)
        libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f87b8146000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f87b8141000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f87b8139000)
        libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007f87b80e6000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f87b80bf000)
    
     
  • Raphael Manfredi

    I am not seeing libbfd in that list... which means -lbfd was probably not passed to the linker and BFD suport probably not compiled in.

    Because you installed BFD after running Configure (through build.sh), you need to go back to the root source directory and run:

    make clobber
    ./build.sh
    

    again. Once the build is done, make sure BFD is indeed compiled in by running:

    ldd src/gtk-gnutella | grep bfd
    

    If you see libbfd in there, there you can then

     sudo cp src/gtk-gnutella /usr/bin/
    

    and wait for the crash, hoping we will get a properly decorated stack trace at crash time!

     
  • David

    David - 2020-12-06

    crashed again. Not sure if it's related as i ran out of space in the partition where i was saving the files.

    Attaching the logs

     
  • Raphael Manfredi

    The good news is that these are all crashing at the same place with the same assertion failure, and I have enough information now to know that the logic there is flawed: not the assertion, the logic! That's what we could call a bug :-)
    So now I simply need to get enough time to dive into the code and fix it. I will keep you posted when I have committed a fix on the "devel" branch.

     
  • Raphael Manfredi

    I have pushed commit a699adddb298cb67405bfce987ebb94ef92dbd82 on the "devel" branch and it should fix these particular crashes you are having in fi_pick_rarest_chunk(). Please let me know how it behaves for you.

    Note that these crashes have nothing to do with the ones you had when you opened this bug report: the assertion failure you originally had was in another piece of code, totally unrelated. Let's continue to track progress here anyway, as the original source of your crashes is still unknown.

     
  • David

    David - 2020-12-12

    Thanks for the explanation.

    Already updated. Let me run it for a while. Let's see if the issue happens again :-)

     
  • David

    David - 2021-01-02

    I can crash the latest version of gtk-gnutella:

    1- click "What's new?" button
    2- Change the default filter (i set it to video)
    3- Click again on the "What's new?" button.

    gtkg crashes

     
  • David

    David - 2021-01-03

    Now It crashed for no reason... Attaching log.

     
  • David

    David - 2021-01-18

    Crashed again with the latest master

     
  • David

    David - 2021-03-24

    Crashed again with the latest master

     
  • David

    David - 2021-03-27

    Another crash. By diff the files it looks like this is in a different place from the previous.

     
  • David

    David - 2021-04-05

    Crashed again. Assertion failed at src/lib/ripening.c:730

    EDIT: Just looked through the crash log files (compiled from master), and in 4 crashes 3 where in this exact place with the same reason.

     

    Last edit: David 2021-04-05

Log in to post a comment.