seg faults on unix with 0.9.5

Help
2007-07-03
2012-10-30
  • hi,

    we are facing permanent seg faults with version 0.9.5 of murmur on unix.

    any idea on tracing this back?

     
    • First, compile murmur with debug information.

      make debug

      then start it under gdb:
      gdb murmur
      (bla bla bla)
      set args <whatever arguments you normally use>
      run

      Once it crashes:

      bt

      And give me that :)

       
    • ok, won't take long ;-)

       
    • hmmm

      the result is this:

      (gdb) run
      Starting program: /data/murmur/murmur
      [Thread debugging using libthread_db enabled]
      [New Thread -1220551776 (LWP 11955)]
      [New Thread -1220576336 (LWP 11958)]
      [Thread -1220576336 (LWP 11958) exited]
      [New Thread -1228964944 (LWP 11959)]
      [Thread -1228964944 (LWP 11959) exited]
      Segmentation fault
      service:/data/murmur#

      but server is still running

       
      • Er. Doh. You need to use the '-fg' argument as well, or murmur will detach itself.

        Hm. Are you using dbus, btw?

         
    • ...continuing splords work:

      dbus daemon is running, but on murmur start we get: "Failed to connect to D-Bus session"

      >gdb --args murmur -fg
      ...
      Starting program: /data/murmur/murmur -fg
      [Thread debugging using libthread_db enabled]
      [New Thread -1221145696 (LWP 3249)]
      [New Thread -1221170256 (LWP 3250)]
      [Thread -1221170256 (LWP 3250) exited]
      [New Thread -1229558864 (LWP 3251)]
      [Thread -1229558864 (LWP 3251) exited]
      Segmentation fault
      service:/data/murmur# Failed to connect to D-Bus session
      Server listening on port 64738

      service:/data/murmur

      ...and back on the console again and murmur ist not running.
      It seems this segfault comes from gdb.

      Does this work for you?

       
      • How exactly are you launching gdb?

        On my machine, output is something like this:

        -bash-3.1$ gdb debug/murmur
        GNU gdb Red Hat Linux (6.5-16.el5rh)
        Copyright (C) 2006 Free Software Foundation, Inc.
        GDB is free software, covered by the GNU General Public License, and you are
        welcome to change it and/or distribute copies of it under certain conditions.
        Type "show copying" to see the conditions.
        There is absolutely no warranty for GDB. Type "show warranty" for details.
        This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/libthread_db.so.1".

        (gdb) set args -ini test.ini -fg
        (gdb) run
        Starting program: /mnt/has/users/Xtern/xeno/mumble/debug/murmur -ini test.ini -fg
        [Thread debugging using libthread_db enabled]
        [New Thread 46912510670512 (LWP 30565)]
        [New Thread 1084229952 (LWP 30568)]
        [New Thread 1094719808 (LWP 30569)]
        [Thread 1084229952 (LWP 30568) exited]
        [Thread 1094719808 (LWP 30569) exited]
        Server listening on port 8086
        [New Thread 1094719808 (LWP 30570)]
        Not registering server as public

        [and hangs here until I ctrl-c it]

        If GDB itself is segfaulting, there's something seriously wrong. What kind of distribution are you using?

         
        • It´s debian etch
          and the new murmur is really instable :-/

          service:/data/murmur/test# gdb murmur
          GNU gdb 6.4.90-debian
          Copyright (C) 2006 Free Software Foundation, Inc.
          GDB is free software, covered by the GNU General Public License, and you are
          welcome to change it and/or distribute copies of it under certain conditions.
          Type "show copying" to see the conditions.
          There is absolutely no warranty for GDB. Type "show warranty" for details.
          This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

          (gdb) set args -fg
          (gdb) run
          Starting program: /data/murmur/test/murmur -fg
          [Thread debugging using libthread_db enabled]
          [New Thread -1220953184 (LWP 26282)]
          [New Thread -1220977744 (LWP 26289)]
          [Thread -1220977744 (LWP 26289) exited]
          [New Thread -1229366352 (LWP 26290)]
          [Thread -1229366352 (LWP 26290) exited]
          Segmentation fault
          service:/data/murmur/test# Failed to connect to D-Bus session
          Server listening on port 64000

           
          • That actually IS gdb crashing. .. Never thought I'd see that again.

            If gdb doesn't work, there's not really that much I can do for remote debugging :(

             
            • ok... I compiled the latest gdb.
              Working now.

              Waiting for segfault... will not take long ;)

               
              • and here he is ;)

                .....
                Program received signal SIGSEGV, Segmentation fault.
                [Switching to Thread -1229116496 (LWP 1475)]
                0xb797d8c7 in g_slice_alloc () from /usr/lib/libglib-2.0.so.0
                (gdb) bt

                0 0xb797d8c7 in g_slice_alloc () from /usr/lib/libglib-2.0.so.0

                1 0xb797e852 in g_slist_prepend () from /usr/lib/libglib-2.0.so.0

                2 0xb7966717 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0

                3 0xb79697a6 in ?? () from /usr/lib/libglib-2.0.so.0

                4 0x080b8df0 in ?? ()

                5 0x00000000 in ?? ()

                 
                • There are no mumble-related symbols resolved in that backtrace. Are you sure you're debugging the debug build of mumble?

                   
                  • hmm yes?

                    -rwxr-xr-x 1 root root 4646358 Jul 3 14:05 murmur
                    -rwxr-xr-x 1 root root 354114 Jul 2 02:10 murmur.normal

                    4.6mb vs 350kb

                    Do you have a messenger?
                    If you are interested I can give you access to the machine.

                     
                    • Judging from the size, that's a debug build :)

                      Damn it :( That means the bug occurs somewhere either with a smashed stack or in some random unknown thread.

                      Yes, I'd appreciate machine access; this is definitively a new kind of bug that I've not seen before.

                      I'll send you my jabber by email.

                       
    • M^3
      M^3
      2007-07-09

      I tried the static build on my fedora core 4 server because of compilation errors that I couldn't figure out, but the static build gives me a segfault.
      Obviously I can't make a debug version if I can't compile it. I expect the segfault it is because it was compiled for a very different distro?

       
      • The static binary is built on Ubuntu 7.04. I've used on on RHEL5.. It could be the basic libc supplied with core4 is simply "too ancient".

        Does it even start before it segfaults?

        Could you do a 'strace -f murmur.x86 -ini whatever -fg', zip the output and email it to me? The static binary is supposed to "work anywhere" so this is something I have to fix.

         
    • M^3
      M^3
      2007-07-09

      These are the errors I am getting trying to compile, is this helpful??:

      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:1,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusargument.h:1:49: error: ../../tools/qdbus/src/qdbusargument.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:2,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusabstractadaptor.h:1:56: error: ../../tools/qdbus/src/qdbusabstractadaptor.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:3,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusabstractinterface.h:1:58: error: ../../tools/qdbus/src/qdbusabstractinterface.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:4,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusconnectioninterface.h:1:60: error: ../../tools/qdbus/src/qdbusconnectioninterface.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:5,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusserver.h:1:47: error: ../../tools/qdbus/src/qdbusserver.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:6,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusreply.h:1:46: error: ../../tools/qdbus/src/qdbusreply.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:7,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbuscontext.h:1:48: error: ../../tools/qdbus/src/qdbuscontext.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:8,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusinterface.h:1:50: error: ../../tools/qdbus/src/qdbusinterface.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:9,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusextratypes.h:1:51: error: ../../tools/qdbus/src/qdbusextratypes.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:10,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbuserror.h:1:46: error: ../../tools/qdbus/src/qdbuserror.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:11,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusmetatype.h:1:49: error: ../../tools/qdbus/src/qdbusmetatype.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:12,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusconnection.h:1:51: error: ../../tools/qdbus/src/qdbusconnection.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:13,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusmessage.h:1:48: error: ../../tools/qdbus/src/qdbusmessage.h: No such file or directory
      In file included from /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/QtDBus:14,
      from murmur_pch.h:7:
      /usr/local/Trolltech/Qt-4.3.0/include/QtDBus/qdbusmacros.h:1:47: error: ../../tools/qdbus/src/qdbusmacros.h: No such file or directory
      make[1]: [release/murmur.gch/c++] Error 1
      make[1]: Leaving directory `/home/nwnadmin/mumble-0.9.5/src/murmur'
      make:
      [release] Error 2

       
      • There is something very wrong with your Qt installation; it has copied links instead of installing the actual datafiles. How did you compile and install Qt?

         
        • M^3
          M^3
          2007-07-11

          I opened a terminal, did su, did ./configure, did ./make, did ./make install. The poor machine was building most of the day. It is only a dual P-II 450 machine with 384 (I think) MB memory and a 9 GB drive

           
          • For reference, here's the most recent configure line I used with Qt:

            -qt-sql-sqlite -debug-and-release -pch -no-qt3support -optimized-qmake -plugin-sql-mysql -plugin-sql-psql -nomake demos -nomake examples -qdbus

            If you are recompiling, start with
            rm -rf /usr/local/Trolltech/Qt-4.3.0

            .. or you will get trouble.